Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Comments
+22

I was not sure that my solution is correct and my implementation is correct. So I inserted some assertions in my code. But I accidentally did a wrong assertion. So you can see that I got some REs in my contest submissions. And then I replaced those assertions with exit(0) so I got WA. Then I realized that my assertions was wrong. As soon as I finished to erase them, the contest ended.

+15

This is my last Div2 Round. But I was late in submitting E1 about 10 seconds so I missed the last chance to win in Div2. QAQ so sad....

I solved Div1C at 01:59:36, but Codeforces was down at that time... This is my first time to solve Div1C during a contest... QAQ

+9

The first letter of the second word of the problems' name are "aeiou", and prepositions are also different. Interesting name ~ :).

On niyaznigmatulCodeforces Round #402, 7 years ago
+6

That's also my fault. I have updated my comment in order to prevent from misunderstanding.

On niyaznigmatulCodeforces Round #402, 7 years ago
0

I mean that, the problem's name is "起床困难综合征". You can submit the problem on this website. http://uoj.ac/problem/2

On niyaznigmatulCodeforces Round #402, 7 years ago
+17

I believe that a large number of chinese can solve Div2E, for a similar problem has appeared in NOI2014. The similar problem's chinese name is "起床困难综合征", you can find it on many websites. NOI is olympics in infomatics in China. Sorry for poor english.

On niyaznigmatulCodeforces Round #402, 7 years ago
+8

I think so. It cost me too much time.

0

I am also curious about this.

0

My friends and I have a better solution which is easier understood for Div2E/Div1C. We can make the problem reversed. The solution is also bitmask dp. We can start from the state (0,0), which means we cost no red tokens and blue tokens at first. And then we can buy one cards each time, whose cost is ( max( red_cost[i]-red_left, 0 ), max( blue_cost[i]-blue_left, 0 ) ), while i is the card we are ready to buy and red_left means how many red cards we haven't bought except i. We say a state (a,b) is better than another state (a2,b2) when max(a,b) < max(a2,b2). But my program has a little bug and I could not find it until 2 minutes after the contest. QAQ.

Yes,you are right.My solution is wrong.Thank you very much.

There's also a similar but easier solution.That is using Kruskal to build a MST.The weight between two vertices is 3 if they are s and t,and the weight is 1 if one of them is s,and the weight is 2 if one of them is t,and the weight is 0 if they are not s and t.Then you can use Kruskal as usual with the limit of ds and dt.But when I finished coding this problem,the contest had been over. :(

PS:This solution is a wrong one.But I cannot delete this comment.:(