Comments

You can check my video editorials of Count Winning Subarrays and Tree Cut Xor if needed

On BledDestKotlin Heroes 11 Announcement, 20 months ago
0

After the entire contest, I realized there is only one sheep in problem D LOL :(

+1

You can check my video editorials of D, E and F if you have any doubts

You can check my video editorials of D, E, and F here

You can check video editorials of E and G here

You can check out video editorials of C, D, E, F if you are stuck

You can check my video editorials for D and E

0

If you need video explanations of C, D, E and F, you can check my video editorials here

You can check my video editorial

Hey all, found the issue. The issue happens when you have some connected components having the same value, and if the first node is connected to N, the later nodes will not have proper dp value. Now if some of the later nodes have longer paths we will not be counting them. Providing one test case related to that.

Spoiler

To solve this as mentioned by Swishy123 we have to merge the same nodes, I have used DSU, you can check my Accepted code

If we are only traversing v[j]>v[i] then its kind of traversing a dag only, if we are traversing v[j]=v[i] the value of dp[i] wont change right? What could be the issue then

But the value of dp[i] will not change if I move to the same color vertices. Am I missing something, can you point out one such case?

Why normal dfs with dp will not work for E if we only jump to node j from i if a[j]>=a[i]. My code for ref. Can anyone point out why is it failing?

Anyone having problems with E and F can check out my video editorials

Thanks for the reply found out that deleting from an empty set was the issue. Though I did not except a TLE for that, if got RE then would have thought in that direction

I checked both of your submissions (You and the comment above) but did not find any significant differences than my implementation, dont know whats the issue

Thank you

Thanks got it now. It was the case for handling empty sets for M=1, never thought of it as was not expecting TLE because of that. Thanks again

Got TLE on E using 2 multisets, anyone got AC with this approach please share their solution

You can check out my video editorial of the first 2 problems if you want

You can check my video editorial of A and B if you have any confusion

You can check my video editorials of D and F if you want. I will upload E in a while

Yes I will upload Edit: D uploaded

Can check out my video editorials of D,E and F if you have any doubt

+3

You can check out my solution videos if you want

Is there anything in any other CP platform which you like/liked and want to implement in Codeforces or have already implemented?

Anybody has an edge case for D getting 14 out of 15 AC and 1 WA :(

I have tried to explain the first 3 problems here. Anyone having difficulty with these 3 problems can try it out.

On Guwanch1C++, Python or Java, 4 years ago
+19

It fully depends on what you are doing. For CP C++ would be the best, for ML its python and Java for Web/App.

I think all the plagiarism related things you can comment in this blog

You can check it here

As this is the last problem of the contest. Can they just delete the problem from the problemset and recalculate the scores?

Just a doubt if the path is something like

A: 1 ->2 ->3 -> 4
B: 1 ->3 ->4 -> 2 

Now |i-j| in A is 3 and in B is 5. But if we think all Cij in A costs D-1 and in B costs 0. The total cost will be 6D-3 and 5D in A and B respectively.
I know these are not cycles and if we connect the last edge results will be different. But I want to know why for path and for cycle this is functioning differently??

On pedastrian57Is it right?, 4 years ago
+19

Yes, you are right
But alt are involving their ratings in the contest too.
You might argue an 1800 sending his 1400 alt in a contest will affect the rating
But we cant change it I feel. To stop alts only 1 way to do is some ID verification for registration and I feel it would take long time for CP platforms to use ID verification.
And we should try whatever is possible to make it fair.

I used to think set operators like |(Union),&(Intersection) in python has O(1) time complexity.

On 404foundCodeforces Tracker "MyCF", 4 years ago
0

Nice Website
1 small suggestion.

Spoiler

mr_practice001 I think the testcases of The One Where Joey Dates Rachel is weak. This AC solution is giving output as -1 for the testcase

1
3 4
000
0010

The answer should be 2

Top 500+80 will qualify for the elimination. So the top 500 out of those 580 will get T-shirt!! Does not seem right for me

I have realized that after seeing your comment, LOL

CodeChef_admin Will the top 500 of this round get T-shirts?

2 998244352 998244353

The answer should be 0 for this but your code will print 1. Same thing happened with mine then I check if M is multiple of 998244353 answer should be 0

Would be stuck on C if the clarification had not come. I was finding if K rank is possible or not instead of top K. Happened with someone else?

On QuirklessWeird question, 5 years ago
+8
On divyanshchoukse443Hi guys, , 5 years ago
+12
  1. What you have written in the title, write it in the body of the blog
  2. Give the problem Link

They have made Long Challenge unrated for the same reason.
So why are they conducting long challenges again for qualification, is this a joke or what!!

I think not always e.g.

N=3 K=2  X=[1, 1, 5]

Here the answer is 2.
I think we have to build K subsets from X such that sum of the minimum subset is maximized. I think we have to do binary search on the answer

Will you make others' solutions visible?

I think this tc should be added in E
4 4
...*
...*
*...
....
The correct output should be 1 according to the editorial , but some solutions (including tourist) is giving ans as 2

But it is not optimization . How can you know your code will get FST after getting pretest passed in 125 ms where limit is 2000 ms . Why will u optimise ur solution in this case?

On i.eCodeforces Round #669, 6 years ago
0

I am not blaming them . I just want to say they should check if the python solution is getting accepted with a considerable margin . If not they can just increase the time limit by some milisecond . 1 to 1.5 or something like that.

On i.eCodeforces Round #669, 6 years ago
-29

In today problem C I have submitted O(n) solution in pypy3 it got TLE in tc 6 . Again I have submitted almost same solution and got an AC in 997 ms . I have seen most of the pypy3 codes getting execution time above 900 ms .
But then I have coded it in c++ as it may get TLE again in the systests and got AC in around 300 ms. This is not only today that I have faced this kind of problem , I generally switch to C++ in case of any problem involving recursion . But how may I know that an O(n) can also get TLE .
So to all the respected problem setters please check if the python solution is accepted with a considerable margin or just increase the time limit.

Ohh I have not noticed that sorry...

I think it can be done with binary search on the length of the pattern

l=0
r=len(s)
ans=len(s)
while l<=r:
    mid=l+(r-l)//2
    if can(mid):
       r=mid-1
       ans=mid
    else:
        l=mid+1
return ans

You can easily write can function in O(n)

Is there anyone whose same solution for div2C get TLE in python but get accepted in c++ ?

0

You mean in the explanation??

+3

Where it is mentioned in problem D that we can increase or decrease one element in an operation more than once?? I mean a[i]-m*x or a[i]+m*x is possible for m>1 also in one single operation????

But I used a set of only 3 elements :(

Hey can you look into my code too please

Please someone answer why my code for div2 B 68280267 is getting TLE , though my complexity is O(n^2(k+log(n))

On JatanaCodeforces Round #612, 6 years ago
+1

So please[submission:68273655] tell me why my code in O(N**2K) getting TLE 68273655

My submission for C giving WA. Someone please help!! Edit:: I think I got my mistake..

Same , very sad , a map could do the work

Can anyone please explain what is map of vectors ?? Because most of the solutions of Problem D were done with it..