### liouzhou_101's blog

By liouzhou_101, 8 months ago,

Hello, Codeforces!

I'm very glad to invite you to my contest Codeforces Round #700 (Div. 1) and Codeforces Round #700 (Div. 2), which will be held on Feb/07/2021 17:35 (Moscow time). In both divisions, you will be given 6 problems and 2 hours 15 minutes to solve them. One of these problems is interactive, please see the guide of interactive problems if you are not familiar with it.

I would like to thank:

I have tried my best to write clear problem statements and make strong pretests. I hope you like the problems and enjoy the round.

Click here for those who are interested in the joke of rejecting problems:

The anti-traditional score distribution (yes, very early, that's why we call it anti-traditional; I love early score distributions!) is given as follows:

• Div. 1: $500 - (750 + 750) - 1500 - 2250 - 4000$

• Div. 2: $500 - 1000 - 1500 - (1500 + 1500) - 3000$

UPD: Editorial is out.

UPD1: We are sorry for the issue with the problem D2B and for D2C=D1A turning out to be well-known. Constraints for D2B were changed from $10^9$ to $10^6$ and all submissions which didn't get AC during the contest were rejudged.

We apologize once again and thank you for your participation.

UPD2 Congratulations to the winners:

Div 1:

1. Petr

2. A.K.E.E.

3. ko_osaga

4. Isonan

5. Benq

Also congratulations to hos.lyric (the only contestant who solved E during contest time!)

Div 2:

1. 5002ryx

2. AlanChen

3. whx1003

4. zkou

5. Ritos__

• +230

 » 8 months ago, # |   +212 As the author of rejected problems the date of this round, I hope you will enjoy it.
•  » » 8 months ago, # ^ | ← Rev. 2 →   -63 Can I ask a question? Why are you not on the list of authors? I think you should be on the list of authors regardless of whether your question is selected.(To be honest, as far as I know, the passing rate of questions under the antontrygub review is very low. If only the question is selected can be included in the list of authors, then many people may be unwilling to set the title. Because it takes a lot of time to set up questions, and in the end, your questions may not be selected at all, so you get nothing. This is unreasonable at all, and it will also cause authors to lose enthusiasm for setting problems.)
•  » » 8 months ago, # ^ | ← Rev. 2 →   -156 As a one having negative contribution, I can bet this round will be hard
•  » » » 8 months ago, # ^ |   +2 you are cursed
 » 8 months ago, # | ← Rev. 3 →   +27 As a tester I must say problems are really interesting and well written and please notice unusual solving time. Good luck to all...
 » 8 months ago, # | ← Rev. 3 →   -29 (1500 + 1500) means that there are subtasks?? Since every time when subtasks are there, then author mentions it...but this time they haven't mentioned
•  » » 8 months ago, # ^ |   +59 Yes, they are subtasks. But they are different problems, too. Surprise?
•  » » » 8 months ago, # ^ |   0 Yaa really surprised since haven't seen that before...amazing work by you :)
•  » » » » 8 months ago, # ^ |   +6 Am I the only one who doesn't understand what this means? Correct me if I am wrong, but is it that the two subtasks will be about the same problem, but perhaps, they would ask us to compute different things?
•  » » » 8 months ago, # ^ |   +111
•  » » » » 8 months ago, # ^ |   +20
 » 8 months ago, # |   +300 At first, I got excited about subtasks because of the $+$ sign, but then I realized that they won't change my score, it will still be $500-(750+750)-1500-2250-4000=-8750$
•  » » 8 months ago, # ^ | ← Rev. 3 →   -60 Jokes aside but what does 750+750 mean? Could you please tell?
•  » » 8 months ago, # ^ |   -53 What the Fish!! I was only asking something because I am seeing this thing for the first time and the post doesn't tell what that is. Hate this community! I won't comment or take part in any discussion. Fuck you all :( Fucking rude asses here.
•  » » » 8 months ago, # ^ |   -30 What the Fish!! Fuck you all lol SpoilerRead the comments first
•  » » » » 8 months ago, # ^ |   0 Fish* you all
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   -56 Whatever y'all say. Idc if you agree with me that people here are more into memes rather than sharing knowledge. I simply asked what 750+750 means and people thought I was trying a taunt on the guy, I guess. What a silly childish community it grew into LMAO. Have fun stroking downvote button here too as if that would change anything in my life except for making my point strong :) I just downvoted all comments here lol. Suck it up. Its cool lol
•  » » » » » 8 months ago, # ^ |   -8 Have fun stroking downvote button here too as if that would change anything in my life except for making my point strong :) Look who's acting decent all of a sudden lol. Why'd you assume I downvoted you in the first place? I simply asked what 750+750 means and people thought I was trying a taunt on the guy just admit you didn't read the previous comments.
•  » » » » » » 8 months ago, # ^ | ← Rev. 2 →   -44 I don't care anymore. my contributions were positive and I was thinking of writing articles on CF to give back to the community. But now fuck it! People are stupid. Better to just make your way out and climb up in life. And no, why would I read previous comments? I expect that info in the article itself. Downvoted that too.
•  » » » » » » » 8 months ago, # ^ |   0 my contributions were positive and I was thinking of writing articles on CF to give back to the community. Oh No! This shouldn't be happening. I upvoted you. Please write the blog soon.
•  » » » » » » » » 8 months ago, # ^ |   -42 Lol you see the trend here? People upvote positive voted comments and downvote negative-voted comments. I downvoted yours and you got 7 downvotes. Enjoy :D It's fun playing with children here lol. Such childish people.
•  » » » » » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 I don't know who's the salty kid here lol. Did you even look at my contribution before?
•  » » » » » » » » » 8 months ago, # ^ |   0 Bro u have to use long long int to store his number of accounts :')
•  » » » » » » » » » 8 months ago, # ^ |   0 his?
•  » » » » » 8 months ago, # ^ |   0 i feel u dude power grid is down i had to write on my phone and the the comments are useless like me today
•  » » » » » » 8 months ago, # ^ |   +4 People are making alt profiles to troll. Never expected this shit on one of the biggest coding platforms in the world. Codeforces really needs to put some effort in improving the community morally or I will just give up on discussion or blog posts. Seriously shitty people have become the larger part of the community.
•  » » » 8 months ago, # ^ |   +1 Seriously, you are mad because people downvoted you for asking a question which was already asked before. What's so hard with admitting it? Stop being so childish.
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   0 but don't you see that first comment related to doubt is also downvoted?Edit: I was referring to comment of samay var(cause someone said same comment has been asked earlier)
•  » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 Yes, it was downvoted because it was already asked before (see?). Instead of commenting asking for what it means he could have just looked at previous rounds with that same parentheses and he would find out. Same thing with the first guy. I also think it is in the help section.
•  » » » » » » 8 months ago, # ^ |   +3 There is a lot of stuff written in this post which can be found in previous rounds posts, why to put it there? Dude, you seriously believe someone new should dig into previous posts to make sense of this post? You must be smoking something.
•  » » » » » » » 8 months ago, # ^ |   +3 Ok, so, you don't need to look in the previous rounds, I just found a very useful tool that can answer almost all your questions, specially the most common ones like the one you made! Link: google
•  » » » » » » » » 8 months ago, # ^ |   0 You must be trolling around. Are you even reading yourself what you are writing? Do you know what is an article/post? Well! I wasn't in your school, but my English teacher never taught me to write an article which implicitly needs reader to look for external references to make sense.
•  » » » » » » » » » 8 months ago, # ^ |   0 Your teacher is wrong then. Also, apparently, you've never read an article before. When writting an article you assume the reader knows the basics. You won't start a math article by defining sum.Besides that, it is an announcment, not an article. If you want to know how a round works, you need to research a bit. What is the ICPC format? What does penalty mean? How do problem scores decay? etc.
•  » » » » » » » » » 7 months ago, # ^ |   0 aLT AcCOuNt
•  » » » 8 months ago, # ^ |   +3 Agree. I can't understand what's wrong with your comment.
•  » » » 8 months ago, # ^ |   +8
 » 8 months ago, # | ← Rev. 2 →   +42 What a special weekend! Codeforces Round 700 and Topcoder SRM 800! :D Kudos to both Codeforces & Topcoder.EDIT — It's SRM 799.
•  » » 8 months ago, # ^ |   +6 And there is the Quora Programming Challenge.
 » 8 months ago, # |   +46 As a tester, I hope you will participate in and enjoy the interesting round!
 » 8 months ago, # | ← Rev. 2 →   0 For testing every color is there except grey:)
 » 8 months ago, # |   0 Codeforces Round 700 and Topcoder SRM 799!That's really great.
 » 8 months ago, # |   +29 Codeforces Round # 700, this is a special milestone.
•  » » 8 months ago, # ^ |   0 Yes round #700 a benchmark set by codeforces. kudos to the team and competitive enthusiasts.
 » 8 months ago, # |   -45 Anyone here who read anti-traditional as anti-national?
 » 8 months ago, # |   -59 Chinese round! Indians should boycott it lol.
 » 8 months ago, # | ← Rev. 2 →   -143 What a Sweet AdHoc/MathForces round! SpoilerI suggest everyone to quit solving after C.
•  » » 8 months ago, # ^ |   +1 This round is anti-traditional not only in its score distribution, but also in its style. I think it will not be a Chinese-style or a antontrygubO_o-style round hopefully, but an interesting and surprising round. As you can see in this comment, we have subtasks but they are considered to be different problems.
•  » » » 8 months ago, # ^ |   -8 but I like antontrygubO_o-style rounds :/
•  » » » » 8 months ago, # ^ |   +8 Yes, I like them too. I mean to eliminate our prejudices and stereotypes.
•  » » » » » 8 months ago, # ^ | ← Rev. 2 →   +4 Some problemsetters don't take easy problems seriously. One very popular opinion is that the D2A-B problems are just stupid implementation exercises intended for beginners to learn how to code. Hope this round disproves it?Yes, It does.
•  » » » » » 8 months ago, # ^ |   0 You're really man of your word orz!!
•  » » » 8 months ago, # ^ |   -36 I feel seg tree vibes.
 » 8 months ago, # |   -14 GoraGoraGOra
 » 8 months ago, # |   -46 I am 1990 now, and I hope that tomorrow I can take a master. Can you give me some advice on how I should solve problems: solve B2 or solve B1 first and then think about B2?
•  » » 8 months ago, # ^ |   -46 Bro till then give me some advice on how I should solve problems to become expert :)
•  » » » 8 months ago, # ^ |   -28 Bro till then give me some advice on how I should solve problems to become specialist:)
•  » » » » 8 months ago, # ^ |   -32 Same advice but you should try to solve B tasks :) Look my previous comment
•  » » » » » 8 months ago, # ^ |   -32 I just asked it for the meme :(
•  » » » 8 months ago, # ^ |   -26 Idk dude, may be I can say that you should try to solve C tasks, they are not so hard as you think. It is always one or two simple thoughts that give you solve. May be you can scroll all rounds from now and try to solve C tasks?
•  » » 8 months ago, # ^ |   -37 Why this comment is downvoted? :(
•  » » » 8 months ago, # ^ |   -23 DW! It'll be at least 30 votes after You've reached master. why?I assume it's kinda like asking for hints.
 » 8 months ago, # |   +206
 » 8 months ago, # |   +61 woow, score distribution is announced so early! I appreciate it!
•  » » 8 months ago, # ^ |   +84 Thank you! It's glad to see you also like early score distributions.
 » 8 months ago, # |   -10 notice the duration
 » 8 months ago, # |   +7 Wow colourful testers!!!
•  » » 8 months ago, # ^ | ← Rev. 2 →   -21 Thanks for updating the constraints.
 » 8 months ago, # |   +9 I see there is a pupil tester as well. Can anyone tell how to contribute to Codeforces as a tester?
 » 8 months ago, # |   0 Will there be interactive ques in div2 also??
•  » » 8 months ago, # ^ |   0 Yeah,E no problem will be interactive I guess
 » 8 months ago, # |   -36 No oneLiterally No one First few comments downvoted as usual
 » 8 months ago, # |   -65 If you saw your comment downvoted recently, that was me :)
•  » » 8 months ago, # ^ | ← Rev. 2 →   +56
•  » » » 8 months ago, # ^ |   -9 After the contest,Rating: My turn
•  » » 8 months ago, # ^ |   0 Lol, apparently you think you are a supreme being because someone downvoted your comment. Useless comments like the one you just made and the other making a repeated question get downvoted. Think twice before commenting. Stop spamming.
•  » » » 8 months ago, # ^ |   0 At least he doesn't make an alt for trolling someone
•  » » » 8 months ago, # ^ |   0 My comment to understand the post is useless. Yeah right, your comments are so useful, I am getting nirvana after reading them.
•  » » » » 8 months ago, # ^ |   0 At least my comment is explaining that, if you you don't want to get downvoted, you should be more careful when commenting. Your comment is just crying about being downvoted.
 » 8 months ago, # |   -53 Can anyone tell me how to get upvotes without telling me how to get upvotes?
•  » » 8 months ago, # ^ |   0 I just learned how to tell somebody to fish himself without actually doing so, see some comments above ;)
•  » » 8 months ago, # ^ |   0 It's simple. just write only useful comments ;)
•  » » 8 months ago, # ^ |   +18 Do what 1-gon does.
 » 8 months ago, # |   0 Thank you liouzhou_101 for preparing Div.2 contest
 » 8 months ago, # |   0 Extra 15 minutes. Looks like an interesting round to me. Good luck and high rating to all.
 » 8 months ago, # |   0 there are three expected rating in this round for me.....ratng<1535 or (rating>=1535 and rating<1600) or rating>=1600....Pray for me
 » 8 months ago, # |   0 Waiting for One-Liner 'A'.
 » 8 months ago, # |   0 anyone know a good video or any blog to solve interective problemss? please share after contest..this is my first time solving interective problems..
 » 8 months ago, # |   +2 Wrong answer on pretest 6. :(
•  » » 8 months ago, # ^ |   0 sad
 » 8 months ago, # |   0 You suck Great Hero
 » 8 months ago, # |   +4 long queue again? :(
 » 8 months ago, # |   +4 i literally fucked up in the today's contest who else also fucked up his contest today !! stucked on B ; C --> Interactive don't know how to solve Interactive problems D--> Wrong answer on pretest 6 !!
•  » » 8 months ago, # ^ |   0 LOL..same for me!!!
•  » » 8 months ago, # ^ |   +1 i fucked up as usual no thing new
 » 8 months ago, # |   0 Div2B WA on pretest 2 gang wya ;-;
 » 8 months ago, # |   +1 I have a one question..if i get wrong submission in one question ..then will it decrease 50 point from total point or from particular question.?
•  » » 8 months ago, # ^ |   0 from that question ig
•  » » 8 months ago, # ^ |   0 If in future you submit and it accepted then from total score-time taken-(total wrong submission)*50
 » 8 months ago, # |   0 those who are getting wa on Btc2 make some noissseeeeeeeee!!!!!!!!
 » 8 months ago, # |   +20 I'm sorry, but we're heading for no pretests at all? Why is C (div 1) only 5 pretests, taking into account that there are 2 samples? The round is still going on, and I don't know if my solve will fall, but it's still unpleasant...
 » 8 months ago, # |   +6 what are the chances that div2 b has weak pretests.
•  » » 8 months ago, # ^ |   +3 I am worried about pretests of C :/
•  » » » 8 months ago, # ^ |   0 me too :D, passed pretests on the first try, but I have a feeling that it will fail system testing
•  » » » 8 months ago, # ^ |   0 The same dude, I did some stupidity there and don't know why the hell it passed.
 » 8 months ago, # |   +18 .
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 one of the given tc is1000 1000 4200 300 400 5001000 1000 1000 1000but you may try this one also (descending order)1000 1000 4500 400 300 2001000 1000 1000 1000
•  » » 8 months ago, # ^ |   +4 Div 2 D -> WA on pretest 6 :(
•  » » » 8 months ago, # ^ |   +5 Try this tc61 1 3 2 1 1
•  » » » » 8 months ago, # ^ |   +1 Yeah I have thought of this case. But I messed up the code. Thanks for the testcase
•  » » 8 months ago, # ^ |   +5 Still better than failed sys tests. T_T
•  » » 8 months ago, # ^ |   0 Let's abolish the pretests and make everything like Topcoder's.
 » 8 months ago, # |   0 this is the 100th time I WA for writing the wrong variable XD why do I keep doing this mistake?
 » 8 months ago, # |   +29 Contest is anti-traditional because WA on pretest 6 not 2
•  » » 8 months ago, # ^ |   0 I'm curious about the testcase
•  » » 8 months ago, # ^ |   0 consider 1 1 2 3 4 5 1 1 2 3 4 1 1 ans will be 1 2 3 4 1 2 3 1 ==8 1 5 1 4 1 ==5total ans = 8+5 =13
•  » » » 8 months ago, # ^ |   0 No,this is not the correct testcase. My code gives 13 as the ans yet WA on testcase 6.
•  » » » » 8 months ago, # ^ |   +7 Try this tc61 1 3 2 1 1or41 2 1 1
•  » » 8 months ago, # ^ |   0 WA on 2 was not required , it was in samples .
 » 8 months ago, # |   0 For those who want test cases of Div 2 B -(order of monsters matters)here is(just like TC3 but in descending order) — 1 1000 1000 4 500 400 300 200 1000 1000 1000 1000 answer should be "YES"basically we have to sort the monsters in ascending order (first attacking power and if attacking power same them by their health )....so that hero kill small monsters first and then kill the large monster and himself dies(if possible).
•  » » 8 months ago, # ^ |   0 My solution : 106824402
•  » » » 8 months ago, # ^ |   0 I am getting right answer for your provided tc, but still WA on submission https://codeforces.com/contest/1480/submission/106834906 plz help
•  » » 8 months ago, # ^ |   0 can i know how can i upsolve the question I left in the contest unsolved. i again visited the the contest page but its not showing any submit option.
•  » » » 8 months ago, # ^ |   0 Wait for the system testing to get over. It will get over within 10-15 mions , then you can upsolve the problems
•  » » » 8 months ago, # ^ |   0 During system checking,you can't submit .
 » 8 months ago, # |   +7 Video solution to problem C: https://youtu.be/AgJrby-pShU
 » 8 months ago, # |   +6 How to solve C?
•  » » 8 months ago, # ^ |   +22
•  » » » 8 months ago, # ^ |   +4 Not fair man, now I wish I had just googled it
•  » » » » 8 months ago, # ^ |   -11 Sad for You. That's a very standard problem for binary search.
•  » » » 8 months ago, # ^ | ← Rev. 2 →   +11 Oh No !! Atleast problem setters shouldn't copy the same question from the most popular website for ds and algo. This round should be unrated for those who feel that they are at a loss because they did not search on the internet for the solution. MikeMirzayanov liouzhou_101 please look into it. This is unfair!!
 » 8 months ago, # | ← Rev. 3 →   0 Beacause of the long queue I didn't get to finish E in time :(. Here is my solution to E: Put an edge 1->2 with cost 1For every node put edges such that the lengths of the paths ending with him are in the interval [1, 2 ^ (n — 2)]. By that I mean:1->n cost 12->n cost 13->n cost 2i->n cost 2 ^ (i — 2)Now simply use as many of these power of 2 intervals to build the interval [L, R]. I wa'd because of the long queue and a dumb error :(
•  » » 8 months ago, # ^ |   +9 Kaun ho BC tum log. Kahan se aate ho?
 » 8 months ago, # |   +9 Those who are getting WA on pretest-6 for DIV2D. Try this 8 2 2 0 2 0 1 2 2 Ans = 8Two possible segments are 2 0 2 0 2 2 1 2 
•  » » 8 months ago, # ^ |   +9 Works for me, but still failed on pretest-6
•  » » » 8 months ago, # ^ |   +3 Same. this is the one that got mine 11 1 1 2 1 7 1 1 9 1 4 7 Answer is apparently 10
•  » » » » 8 months ago, # ^ |   0 Nah, this works for me, too. 106837601Can somebody explain the greedy, what is the logic that works?
•  » » » » » 8 months ago, # ^ |   0 Code#include const int N = (int) 1e5; int arr[N]; int main() { std::ios_base::sync_with_stdio(0); std::cin.tie(0); int n, cnt = 0; std::cin >> n; for(int i = 0; i < n; i++) std::cin >> arr[i]; int i = 0, j, pre = 0; while(i < n) { j = i; while(i < n && arr[i] == arr[j]) i++; cnt++; if(i - j > 1) { if(pre != arr[j]) cnt++; pre = arr[j]; } } std::cout << cnt << '\n'; } Didn't test it yet.
•  » » » » 8 months ago, # ^ |   0 This is it!
•  » » » » 7 months ago, # ^ |   0 Thanks mate, this worked for me.
•  » » 8 months ago, # ^ |   +8 The idea is there, but there is a > 0 in the constraint.
•  » » » 8 months ago, # ^ |   0 T_T
 » 8 months ago, # |   0 I wonder if anyone got more WA than me:)
 » 8 months ago, # |   +28
•  » » 8 months ago, # ^ |   0 Oh so should it be done in log_2(n) asks??I implemented a ternary search instead hope it also passes system test :(
 » 8 months ago, # |   0 What is pretest 4 in Div1 C?
 » 8 months ago, # |   +8 "Wrong ans on pretest #6" I guess I saw/read this line max number of times :|
 » 8 months ago, # |   0 One of the best contests I have seen in a while and I am saying this because this is one of the few contests where I was stuck to my laptop for solving D1, D2 until the very end. And, they didn't seem unsolvable which they usually do.Thanks for these brilliant problems, authorsMuch kudos to you liouzhou_101
 » 8 months ago, # |   +139 How about setting E to be $4 \cdot 10^8$ points?
 » 8 months ago, # |   0 The problem with B pretest 2 is that you have to sort the monsters based on their attack power increasingly so that you fight monsters with low attack power first.
•  » » 8 months ago, # ^ |   0 You need only the monster with max attack power last, sorting of the others is not necessary.
•  » » » 8 months ago, # ^ |   0 I followed this idea but I got pretest 2 wrong? 106807055
•  » » » » 8 months ago, # ^ |   0 The health points of hero are good enough if it is positive before the last fight, ie can be sub zero after last fight. I think you do not consider this correctly in the code.
 » 8 months ago, # |   +11 Was $N log^2 N$ with persistent trees supposed to fail on D (I know it can also be done with parallel binary, but I'm curious for the persistent tree solution)?
 » 8 months ago, # |   0 It's so sad when you find a $\mathcal{O}(n\ \text{polylog}\ n)$ solution to a problem and it's too slow QAQIs there a $\mathcal{O}(n \log^2 n)$ algorithm to D or are you supposed to make $\mathcal{O}(n \log^3 n)$ fit TL?
•  » » 8 months ago, # ^ |   0 See below.
•  » » 8 months ago, # ^ |   0 Not every $n \log^2 n$ fits anyway.
•  » » 8 months ago, # ^ |   +37 You can also do $O(NlogN)$ with persistent segment trees.
 » 8 months ago, # | ← Rev. 2 →   0 proublm D1 try this 13 2 2 2 2 2 2 4 5 3 2 2 2 2 answer is 7
•  » » 8 months ago, # ^ |   +5 worked for me, but still wrong answer on pretest:6
•  » » 8 months ago, # ^ |   +4 I think correct ans is 8
 » 8 months ago, # |   0 LOL ,, I thought that i cant solve that problem c so i jumped to problem D1...you know getting WA in pretest 6 in question d1...i get back to problem c and guess what my all pretest passed(2 min remaining clutch)..hope it will pass system test!!.. I took help from here :https://codeforces.com/blog/entry/45307
 » 8 months ago, # |   +9 My code for div1D: almost 300 lines! Short explanation: First off, let's denote $B_{v,a}$ — number of values $a$ on the path from $0$ to $v$ inclusive. Look at the value $a_l$ in LCM(u, v); if it's inside $[l, r]$, we want to check if $B_{v,a_l} = B_{u,a_l}$, and otherwise, we want to check if $B_{v,i} = B_{u,i}$ for some $i \in [l, r]$ different from $a_l$. We can turn that into uniform queries: check if the claim "$B_{v,i} \neq B_{u,i}$ for some $i \in [l, r]$" is true/false. They can be used to solve the problem through binary search. How do we answer a set of such queries? We can't remember $B$, but we can traverse the tree using DFS and update a common array to get rows of $B$. Let's hash subarrays of $B$. We need to support 2 operations: update a value to get the current row of $B$ and get the hash of some subarray of this row. It can be done with a Fenwick tree.
•  » » 8 months ago, # ^ |   0 I skipped C for D.got this solution quite fast.but couldn't debug in time :(
 » 8 months ago, # |   +12 If you are still figuring test cases that break your solution for div2D1 Spoiler7 2 2 1 2 1 2 2 7 2 2 1 3 1 2 2 8 2 2 1 3 2 1 2 2 8 2 2 1 2 3 1 2 2 9 2 2 1 2 3 2 1 2 2 
•  » » 8 months ago, # ^ |   +4 What are the correct answers?
 » 8 months ago, # |   +1 How do you solve D2D? Asking both for first and second version. Thanks.
 » 8 months ago, # |   -75 fuck you son of the bitches!!!!!
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 too much saltalso nice submission history
•  » » 8 months ago, # ^ |   0 this guy got 18 WA in B !!
•  » » » 8 months ago, # ^ |   0 He was on his way to create a milestone.
•  » » » 7 months ago, # ^ |   0 it was pure bullshit:)))
 » 8 months ago, # | ← Rev. 4 →   0 In the last 3 minutes I got AC on div2 D1.I edited it to convert for D2. Submitted when 2 seconds were left but cf didn't accept it saying the contest is over. If my D2 passes now Imma gonna cry ! my d2 lolCode to D2EDIT: The div2 D2 I couldn't submit was correct. Also my C failed system tests coz I binary searched on both halves and therefore exceeded the number of queries. Life can make you happy and sad at the same time.
 » 8 months ago, # |   +37 Could someone from the testing team please tell me why the verdict for this dataset in Div2 problem B is "YES". 1 1 1000000000 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 I used it for hacking. But apparently the accepted verdict is "YES.
•  » » 8 months ago, # ^ |   +12 Thanks for pointing this problem out! Your comment deserved much more upvotes. And thanks for testing team for their response.
 » 8 months ago, # |   0 Very nice problems !!!
•  » » 8 months ago, # ^ |   +6 Yeah and bbye rating for me :(
 » 8 months ago, # |   -18 I wonder why was pure bruteforce solution containing 10^9 operations was not getting challenged in Div2 B. Unnecessarily I got two unsuccessful hacking attempts. liouzhou_101 & MikeMirzayanov please check this as many such solutions will wrongly get accepted.Here is the java based input generator I used for hacking that solution: public class InputGenerator { public static void main(String[] args) throws Exception { System.out.println(1); System.out.println("1 1000000000 100000"); int n=100000; for(int i=1;i
•  » » 8 months ago, # ^ |   +1 You should have created $10^5$ tests each containing $n = 1$ with $A = 1$ and $B = 10^9$ and $a = 1$ and $b = 10^9$
•  » » » 8 months ago, # ^ |   -26 But if I am not wrong, 10^9 shouldn't also have passed.
•  » » » » 8 months ago, # ^ |   +8 $10^9$ could possibly be done with $2$ seconds since the loop does not contain complex operations.
•  » » » » » 8 months ago, # ^ |   -18 Or maybe its because of compiler optimizations.
•  » » » » 8 months ago, # ^ |   0 It somehow passes. I also tried to hack in same way, but with n=1 (note that n>1 is obsolete in your test!), and t = 1. Two unsuccessful attempts. But one took 0.5s, another 1.5s, so I slightly increased a number of test cases accordingly to make hacks successful.
 » 8 months ago, # |   0 I got something unexpected for this hack: I believe it generates a valid test, but I got Validator 'validator.exe' returns exit code 3 [FAIL Expected integer, but "/**" found (stdin, line 1)] close Could you check what's going on?
•  » » 8 months ago, # ^ |   +12 Oh, sorry never mind. I guess I submitted the source code as the test instead of as the generator.
•  » » » 8 months ago, # ^ |   0 I made the same mistake and got invalid input and later realized that I submitted in the manual input instead of the generator. I lost my chance to make the first successful hack in my life.
 » 8 months ago, # |   +8 Whats the hack case you guys using for div1A/div2C?
•  » » 8 months ago, # ^ |   0 $n=1$, I believe
•  » » » 8 months ago, # ^ |   +20 Congrats on red!
•  » » 8 months ago, # ^ |   +1 100 99 98 ... 2 1 101 102 ... 199 200Many solutions checking for first and last 50 elements have passed the (weak)pretests
 » 8 months ago, # |   0 I registered for the contest but I couldn't attend because of a sudden meeting :(Does my ranking go down?
•  » » 8 months ago, # ^ |   +2 No if you submitted nothing.
•  » » 8 months ago, # ^ |   +2 No
 » 8 months ago, # | ← Rev. 3 →   -19 liouzhou_101 I request you to reduce the full score of Div2C. There are almost 4 times more submissions on this Problem compared to Div2D1 which also has the same score. This is unfair for the people who solved Div2D1 and not Div2C (and i believe they deserve more credit). Moreover Div2C was easily found with a simple google search as well here
•  » » 8 months ago, # ^ |   0 That would be unfair to people like me who solved it by myself . Also such instances have occurred in contests before. The folks who are searching the solution on google at are loss themselves. They can not do the same in future contests.
 » 8 months ago, # | ← Rev. 8 →   -8 g
 » 8 months ago, # |   +3 Div2 D2 pretest 6?
 » 8 months ago, # |   0 Why is this solution in problem Div2.D1 incorrect? https://codeforces.com/contest/1480/submission/106825810
•  » » 8 months ago, # ^ | ← Rev. 3 →   +3 10 3 1 1 3 1 4 1 1 2 3 The answer should be 9 but yours is 10.
 » 8 months ago, # | ← Rev. 2 →   +2 Why brute force is passing the pretests for DIV 2 C?
•  » » 8 months ago, # ^ |   0 system tests??
•  » » 8 months ago, # ^ |   0 FST incoming
 » 8 months ago, # |   +9 I think problem Div1A/Div2C has appeared in leetcode or in some FAANG interview, because I saw and solved the absolutely same problem before
•  » » 8 months ago, # ^ |   0 It's a spinoff to finding a peak of an array. It's the first problem in the MIT algo course on YT, so porbably not the best D2C problem out there.
•  » » 8 months ago, # ^ |   0
 » 8 months ago, # |   0 D1 pretest 6 ? Div 1.
•  » » 8 months ago, # ^ |   +3 try 11 1 2 5 1 1 5 1 1 5 1 1 answer should be 9
•  » » 8 months ago, # ^ |   +6 try 82 2 2 3 4 2 2 2answer:6
•  » » » 8 months ago, # ^ |   0 ok this one doesnt worked for me. I figured out that its a dp problem and solved it too, but the limits were too large to memoize. NVM, lets see in the editorial.
•  » » 8 months ago, # ^ |   0 You mean Div.2? (I assume from your submission history)The test case that saved me was this:6 3 3 4 8 3 3Notice that you have to put 8 in a different array than 4 so that you can take both next 3s. Solution spoilerThus you have to check 1 index ahead each time.Well we will see if this is the solution if I get the problem.
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 try 8 1 2 3 3 4 5 3 3 ans: 8
•  » » 8 months ago, # ^ |   0 both tests work for me but WA on pretest 6 anyway
 » 8 months ago, # |   +2 What was your approach in C?? I was thinking of this approach "use Binary Search to find 1"
•  » » 8 months ago, # ^ |   0 Binary search doesnt work in an unsorted array.
•  » » 8 months ago, # ^ | ← Rev. 2 →   +1 i did binary search on range. If your current mid is not the answer then either either $a[mid-1] < a[mid]$, in that case reduce $r (r = mid-1)$, else if $a[mid+1] < a[mid]$, then increase $l (l = mid+1)$.
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 Observation: for subarray ${a[l...r]}$, if ${a[l] > a[l+1]}$ and ${a[r-1] < a[r]}$, then there must exist at least one local min between $l$ and $r$. The implementation is as how I_love_Kim_Dahyun described it before.
 » 8 months ago, # |   +6 I think n=1 is not present in pretest of d2c.
 » 8 months ago, # | ← Rev. 2 →   0 Div2C might have the worst pretests ever lol Brute force passes pretests and querying "? 0" also passes
•  » » 8 months ago, # ^ |   0 No, brute force solutions will fail system tests. Pretests were just weak.
 » 8 months ago, # |   0 Now is the time to see if the pretests were actually strong. Examples where things can go wrong (solution spoilers you have been warned):Like in problem C div. 2, if you had like an if statement where you did the O(n) solution for n <= 100, and then you did the O(log(n)) solution, and the pretests are all with n <= 100.Or if like in D you got the pretests because you noticed that you have to look 1 index ahead each time and enhance your greedy so it will actually work, but actually there was some other case that you did not consider and that case is not in the pretests.We will see.
•  » » 8 months ago, # ^ |   0 I think it's not strong anymore
•  » » 8 months ago, # ^ |   0 I think I'm going to FST...
 » 8 months ago, # |   0 Anyone with randomised solution for div2 C?
•  » » 8 months ago, # ^ |   0 Sadly Yes!
•  » » 8 months ago, # ^ | ← Rev. 2 →   0 I just asked random indices and it is going to fst.
 » 8 months ago, # | ← Rev. 2 →   -9 Problems were amazing! Thank You
•  » » 8 months ago, # ^ |   +1 In my opinion, Div 1 A was pretty much hackable and solution was found online. Div 1 B/B2 each is different so that is like 3 problems in Div 1 as a starter which are all ad-hoc/greedy. Though, I didn't see rest of round. I was already stressed from Div 1 A after seeing that my initial solution a simple test got it WA. So I submitted a second solution which also will FST(Fail System Testing). I left B2 just for A as I couldn't risk losing both(and sadly, I lost both). Though, I don't know about the rest of the problems but they might be good.
•  » » » 8 months ago, # ^ |   +13 My solution for B2 needs only three lines changed from my B1 solution, just going from a range-max to a range-min segment tree (2 lines) and fixing a silly bug in that segment tree (1 line, issue can't be triggered in B1). I'm guessing from the other comments that this was overkill, but I wasn't confident in any of the greedy strategy ideas I came up with for either version.
•  » » » » 8 months ago, # ^ |   0 Woah, that is nice and neat. I solved B1 greedy maybe that is why.
 » 8 months ago, # |   +70 I submitted D at the very last minute, and i waited until as it kept in queue until the contest was over, then waited long and at last I found:TLE on pretest 51.Disappointing:(
 » 8 months ago, # |   +34 What's the intended solution to F? I misread $n \leq 4 \times 10^8$ as $n \leq 4 \times 10^9$, so this is my fault, but I strongly believe giving such high constraints on $n$ is unnecessary.BTW, if we can get a large factorial in $O(x)$, we can get the potential function in $O(x)$. I tried to squeeze it by embedding pre-calculated factorials but failed because of the code length limit. So Sad.
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 Looking through the editorial, I feel that the author had any linear-time solution and didn't expected it to pass. The limits are not glorious anyway. (Reminds me the GP 2hr before the contest)
 » 8 months ago, # |   +5 Codeforces = constructive and speed forces Change my mind:/
 » 8 months ago, # | ← Rev. 4 →   -47 I'm not quite sure I understand the error in my solution to Div2 B.My approach: Calculate the "total damage" that each monster does (i.e. take into account the number of hits that each monster needs to be killed by the hero, and in turn calculate the damage that the monster does in those many hits). Sort by the total damage (smaller to bigger) Next, see if all but the last monster can be killed in such a way that the hero survives For the last monster, consider a special case. If it needs x hits by the hero to be killed then see if the hero survives at least x-1 attacks from the monster. Any suggestions on what could be wrong with this?Code
•  » » 8 months ago, # ^ |   -10 Why the downvotes?
•  » » » 8 months ago, # ^ |   +8 That's a useless question — no one is going to tell, nor should you care.:)
•  » » » » 8 months ago, # ^ |   0 Well, it helps to know the sentiment of the forum and work on ones netiquette :) Also, if it doesn't matter, then why have the concept of contribution at all? I imagine it exists to build a community, but the way it's structured here is quite flawed (shouldn't likes and dislikes be treated separately?)Anyhow, my best guess is that my first version had a language-fueled meme about me having a tough time with problem B, and I later replaced that with a question about the same problem that I was genuinely curious about. Not sure why that would offend people, but I assume that I will never find out.. :)
•  » » » » » 8 months ago, # ^ | ← Rev. 2 →   0 More importantly, the original revision of your comment was conveying annoyance with the verdict rather than desire to learn what was wrong with your approach.
•  » » » » » » 8 months ago, # ^ |   0 Duh. I didn't realize that's how it came across — a bad sense of humor from my end. I appreciate the feedback!
•  » » 8 months ago, # ^ |   +5 Should not be sorted by total demage. But by demage in one fight. The health points of hero must be enough to stand all but the last fight.
•  » » » 8 months ago, # ^ |   0 Perhaps, and thanks for your inputs. I'm just having a hard time seeing the intuition behind this. The problem statement claims that "the hero will fight with monsters until either the hero is dead or all the monsters are dead". A single attack by the hero doesn't guarantee that the monster gets killed. So it would seem that we need to take into account the cumulative damage that a monster would impose before determining which monster to fight.
•  » » » » 8 months ago, # ^ |   +1 There is also the sentence: "For the safety of the people in the country, please tell them whether the great hero can kill all the monsters (even if the great hero himself is dead after killing the last monster)."So, the intuition is: It is ok to die in the last fight as long as you kill all monsters. That is bit to much romantic for my taste, but it is written that way.
•  » » » » » 8 months ago, # ^ |   +3 Ah, I see where I went wrong. We only care about the last blow to the hero (and not cumulative by a monster — that order doesn't matter). Thanks again — after getting tons of downvotes (for asking a question?), this was refreshingly helpful.
•  » » » 7 months ago, # ^ |   0 Hi! I will really appreciate it if you can give a counterexample for this approach. Thanks a lot.
 » 8 months ago, # |   +24 Is it rated?
•  » » 8 months ago, # ^ | ← Rev. 2 →   -11 Please noooo...
 » 8 months ago, # |   -54 Hope to never see you as a setter again. Problems were clearly "made in China".
•  » » 8 months ago, # ^ |   +5 What's wrong with the Chinese questions?
 » 8 months ago, # |   +7 I got a minimum bound for number of nodes in Div. 1 C as 2* log2(R-L). Is there any better bound in which case answer could be better?
•  » » 8 months ago, # ^ |   +8 same :(
•  » » 8 months ago, # ^ | ← Rev. 3 →   0 You don't need the factor of 2, log2(R-L) + 1 or so should work. For example this works for 1 13: (All numbers 1-8, then a edge of weight 4 to the 4 to get [9-12] and an edge of weight 11 to the 1 to get [13]) YES 6 13 1 2 1 1 3 1 1 4 1 1 5 1 1 6 1 5 6 1 4 5 2 4 6 2 3 4 4 3 5 4 3 6 4 2 3 4 2 5 11 
 » 8 months ago, # |   +1 can anyone tell me about the hacking process ..how to do it ,when to do it and where to do it? is hacking done only during contest time?
•  » » 8 months ago, # ^ | ← Rev. 3 →   +15 Lock a problem (click the lock icon on solved problems). Switch to room tab and it should be your room. If not, switch to your room. Suppose you locked problem A, then you may double click on others solution on A. You will see his/her solution. If you find any mistake(s), click the hack botton. Input the case into the box or upload the testcase generator (remember to strictly follow the format) , then click the button. You will see the result. In normal rounds (like div.2) hacks can only be done during contest time.
 » 8 months ago, # | ← Rev. 2 →   0 Can anyone tell me why am I getting tle on Div2-C.I am using ternary search. code#include #define ll long long using namespace std; # define inf 100000000000 int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n; cin >> n; ll l = 1, r = n ; ll ans = 0; while (l <= r) { ll m = (l + r) / 2; cout << "? " << m << "\n"; cout.flush(); ll mid, before, after; cin >> mid; if(m-1>=1){ cout << "? " << m - 1 << "\n"; cout.flush(); cin >> before; } else before=inf; if(m+1<=n){ cout << "? " << m + 1 << "\n"; cout.flush(); cin >> after; } else after=inf; if (mid < before && mid < after) { ans = m; break; } else if (mid < before && mid > after) { l = m + 1; } else if (mid > before && mid < after) { r = m - 1; } } cout << "! " << ans << "\n"; cout.flush(); } 
 » 8 months ago, # |   +19 Problem B2 is this problem but with $n = 10^5$ and $k = 2$.
 » 8 months ago, # |   0 can someone suggest to me any youtube video/playlist or any other articles where I can learn the concepts required to solve mathematical problems like combinatorics, modulus... similar questions. I found most questions asked in Div.2 A, B ,care either implementation or math-based. I was able to solve the implementation one but only a few math questions.
•  » » 8 months ago, # ^ |   0
 » 8 months ago, # |   0 My randomised solution for C/A - Ask randomly for value at indices until we get a value <= 50. I used 40 iterations. Find two neighbours if both are greater we got the result else one neighbour must be less than this value if we follow this decreasing chain which is atmost of length 50 we can get our result at the end of such chain
•  » » 8 months ago, # ^ | ← Rev. 3 →   +8 I thought of this idea at first, but isn't the probability of this working really bad? Like for $n \leq 10^{5}$ the probability of getting a number $\leq 50$ in 40 attempts is like $1 - \left(\frac{10^{5} - 50}{10^{5}}\right)^{40}$ which is like $2$%, even if use the TLE retry trick that should only give you a $10$% success rate even for large random arrays.
•  » » » 8 months ago, # ^ |   0 Yeah it should fail systest. I didn't even bothered to calculate the probability of success during the contest :(. What is TLE retry trick?
•  » » » » 8 months ago, # ^ |   +6 Basically, if a solution TLEs, Codeforces runs its a few more times, to see if its on the edge of TLEing, if it passes once it gets AC. Ofc its perfectly possible to abuse this and make your code infinite loop if you realize you're going to get WA for random solutions.
•  » » » » » 8 months ago, # ^ |   0 Genius!
 » 8 months ago, # |   +15 Are div2C pretest a joke or sth
•  » » 8 months ago, # ^ |   0 Absolutely.. Mysterious
 » 8 months ago, # |   +28 Why are there 0.5 solutions running on average?
 » 8 months ago, # |   +5 I realized how important to name different variables as differently as possible because I made a foolish mistake, which be described in the following.For Div.1 D, a part of my solution was: while(Lq[i].L) work(id[--L]); while(Rq[i].r) work(id[R--]); After debugging for a long time, I found that it should be: while(Lq[i].l) work(id[--L]); while(Rq[i].r) work(id[R--]); Have you seen the tiny difference between the two? If not, please pay attetion to the 3rd line.What's worse, I spent a long time on Div.1 AB (but got nothing) so that the contest was over when I corrected it. o(╥﹏╥)o
•  » » 8 months ago, # ^ |   0 You can put a link to your story here — https://codeforces.com/blog/entry/87419 ("Let's spread some positivity") :)
 » 8 months ago, # |   +94 https://www.geeksforgeeks.org/find-local-minima-array/The problem is div1A ?
 » 8 months ago, # |   +4 Weak Pretests for problem B :(
•  » » 8 months ago, # ^ |   +2 Weak Pretests for problem C as well :(
•  » » » 8 months ago, # ^ |   0 c had very weak pretest
 » 8 months ago, # |   +47 Problem D's solution:
 » 8 months ago, # |   0 Can anyone tell me why sorting is necessary for div2B?
•  » » 8 months ago, # ^ |   0 Try this test case: 500 100 2 500 90 500 500 
•  » » 8 months ago, # ^ |   0 Try this 1 1000 1000 4 500 400 300 200 1000 1000 1000 1000 Answer will be $YES$Hope this help
•  » » 8 months ago, # ^ |   0 I did without sorting
•  » » » 8 months ago, # ^ |   0 It wouldnt pass. Consider the case where monster damages are 20 and 10. With your strength of 15, nonsorted order would give "No" (B=15-20=-5<0 after first kill; cannot kill the second) while sorted order would give "Yes" (B=15-10=5>0 after first kill; can kill the second).
•  » » » » 8 months ago, # ^ | ← Rev. 2 →   +1 You can handle it without sorting check my submission 106764675
•  » » » » » 8 months ago, # ^ |   0 Oh yes maybe it can be handled, merely saying what the idea behind sorting was.
•  » » » » 8 months ago, # ^ | ← Rev. 3 →   0 i did it without sorting (but it might be incorrect ...) my approachwe know that its only on the last battle that that our hero's health could get decreased less than zero(eg the hero sacrifices its life) i did a very straight forward move i calculated the health of the hero if it killed all the monsters(the number could possibly be less than zero) then i started from the start of the array of the monsters attack damages and searched for a attack damage that when added up with the calculated health will result in a positive number of non existed our hero could not have succeeded if such a monster existed it would be the last monster that our hero fought order of algorithm = O(n)Edit : oh sorry didn't realize the editorial was out
 » 8 months ago, # | ← Rev. 2 →   0 strong pretests? click
•  » » 8 months ago, # ^ |   +4 Not for B, I guess.
 » 8 months ago, # |   +7 Hello.What is the answer for this test (Div. 2 B):1 1 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
•  » » 8 months ago, # ^ |   +4 NO. But some code that calculates the total damage may lead to overflow and output YES
•  » » » 8 months ago, # ^ |   +4 My friend got hacked by this test...
 » 8 months ago, # |   +30 WeakPretestForces.push_back("Round #700"); 
•  » » 8 months ago, # ^ |   0 DisasterRounds.push_front("ROUND 700")it not weak pretest . wrong pretest 1 1 1 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 this test more than 40% people print wrong ans but getting correct ans after system test.
 » 8 months ago, # |   +3 It's a really interesting contest?! Yes.
 » 8 months ago, # |   +73 Please pay attention! The solutions in problem B (Div 2) were hacked by tests to which the system gave an incorrect answer. Example: 1 1 1 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 the system outputs "YES"
•  » » 8 months ago, # ^ |   +22 I hope that the error will be fixed. Since there were no problems during the competition, the round in my opinion should remain rated
 » 8 months ago, # |   +24 Problem C was so unique that i couldn't find any of its hint on the internet. clown face x 2
•  » » 8 months ago, # ^ |   +8 also the pretest were so good that no one got hacked. clown face x 2
•  » » » 8 months ago, # ^ |   +17 solutions were so good that they failed FST even after it's hint were on internet.
 » 8 months ago, # |   0 Oh What a Suspense!!!!
 » 8 months ago, # |   +1 It is taking a long time for system testing.However I am eagerly waiting to survive test case 12 and 23 for problem "B".
•  » » 8 months ago, # ^ |   +12 Alhamdulillah,I have survived.
 » 8 months ago, # | ← Rev. 3 →   -30 What the f*ck maan. this solution passing system 106771738 but it give wrong answer for the test See test1 1 1000000000 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000correct ans: YES these means wrong problem setting. make the round undrated MikeMirzayanov. very much unfair to the people. Many solution got TL in system test. this not fair. Weak test case okay but wrong problem set not okay.i also maked wrong hacks in B becoz of thinking my solution is right. but my B wrong so my score now in -200. i will not accept
•  » » 8 months ago, # ^ |   +4 No the answer is NO. Because the attacking power of the hero is 1 while the attacking power of his enemies are 1e9. It is easy to see that we can only kill 1 enemy in this test case.
•  » » » 8 months ago, # ^ |   -7 106787623 5002ryx the guy #1 in div2 700 getting YES. U tell u smart or he smart? just 1 question MikeMirzayanov the wrong solution for above test will again be system test after adding it or not????
•  » » » » 8 months ago, # ^ |   0 This code can overflow in this test case. If you change B and sum in __int128 you will find it outputs the correct answer NO. So the true problem is hack tests don't have any case that can crack long long overflow. (I resubmitted my defective code and it got AC too.) In regular it won't change the rating, but Candidate Master and higher rating can hack this solution so other people won't make the same mistake.
 » 8 months ago, # | ← Rev. 2 →   0 My Binary Search FSTed in C and gave TLE on TC11 . Really Feeling Sad
 » 8 months ago, # |   +9 Weak Pretests for B and C
 » 8 months ago, # | ← Rev. 2 →   +4 No one :Me each time after submitting Div 2B :- Wrong answer on pretest 2 (T-T)
 » 8 months ago, # | ← Rev. 3 →   +11 TLE FST in Div2B seemingly just because didn't bother to optimize input. Pretests passed with a huge margin, so I assume they just didn't contain a maximum test caseNormally I don't blame weak pretests, but come on, since when it is ok to require some purely technical optimizations in d2B and not to include tests that check it in pretests?
•  » » 8 months ago, # ^ |   +21 Never have I ever seen such shitty pretests!
•  » » 8 months ago, # ^ |   0 Just like I thought The largest pretest was 33329 instead of 10^5
 » 8 months ago, # | ← Rev. 2 →   +11 Edit: The type of problems were good
•  » » 8 months ago, # ^ |   0