Problem A :
1,2,3,4,.......n is an intutive and easy answer.
Difficulty: 5/10 for a A
Problem B
Search the whole matrix a on 2x2 small grids and keep changing the values accordingly till i=0,n-1. j=0,m-1. In the end you will check if the two matrices are now equal or not.
Difficulty: 9/10 for a B
Problem C
There are nine cases totally ABC, ACB, BAC, BCA, CAB, CBA now check for each case seprately and apply binary search to find the lower bound for total_sum/3. Implementation is kinda tough.
Difficulty: 8/10 for a C
Problem D
Just count number of inversions using merge sort/segment tree. If (count1-count2)%2==0 YES else NO. Corner case: check if a & b are a permutation of each other or not.
Difficulty: 5/10 for a D
Why didn't you give the contest yourself?
He probably did on an alt
stop capping
My thoughts on first div2 where i solved 4 probs:
A: very easy, just noticed that if you add a number to its multiple its always still gonna be a multiple of the original number
B: medium, I didn't get it at first glance and moved on, but when i came back and used some paper i got a general idea and implemented
C: medium difficulty but bad for me: no binary search needed, literally just brute force, for all the diff possible orders, just add until the temp sum is greater than the goal
D: easy for a D, just observation, no tree needed, just a simple map
I got hacked once using map, is it safe?
if you used unordered_map, its not safe check this: https://mirror.codeforces.com/blog/entry/62393
normal map is fine, I use it a lot cuz idk how to use seg trees or mrege sort yet
use
std::map
notstd::unordered_map
gotcha thanks Jbi KuR222
thanks for editorial