Comments
+23
0

Because worst case time complexity for unordered map is in order of n.

+3

Because worst case time complexity of unordered map in order of n . Solve it by using map

0

Use map instead and then try your luck

In F , I used the brute force concept and my run time complexity was O(n^3*m^2). How to solve it with larger constraints ?

i don't think that there will be much system failures . Pretest almost cover the test cases set.

Rain may affect the later part of the game. The match will start at the usual time without any interruption.

+29

Seeing the score distribution , i guess it is (speed + implementation) contest.

0

maybe due to the use of remove function. I was doing the same at first attempt .

Finally updated correctly

Hey .. I was ranked 28 on the leaderboard and a 2nd year college student in India . Am I eligible of getting topcoder t-shirt .. do I have a chance to attend the finals too as I am from Jaipur only..

Suppose you got 10 segments of 0's and k=3. Now pick segment {1,2,3} first then {2,3,4} then {3,4,5} and so on and calculate the maximum length subsegment of 1's. This is the optimal way to do it.

It was a good implementation question. I stored all the segments of consecutive 0's in an vector and after doing this iteratively pick consecutive k segments of 0's and make them 1 and then check the answer . this is a greedy approach for this. Link to my submission https://atcoder.jp/contests/abc124/submissions/4954185 Hope it helps

Thanks .. got it now

can anybody help me in knowing why my solution to div2 d is giving wrong answer on pretest 6. sol link : https://mirror.codeforces.com/contest/1138/submission/51026146 Thanks in advance

In div2 B in some test cases input says 100 n and 100 m but the input given was 5 n and varying m . My code is giving wrong answers on those types of cases. Please look upon it.