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:
antontrygubO_o for
rejecting problemshis amazing coordination and discussion.zjq2863974342 for
all his rejected problemsbecoming the protagonist "Homer" in our problems in honor of his contribution.lavender730 for
all her rejected problemssharing problem ideas and selecting the date of this round.choutii for discussion and being the first tester of this round (even before the testing phase).
300iq, Retired_cherry, Aditya_Mittal_31, dorijanlendvaj, gamegame, coderz189, Sugar_fan, HIS_GRACE, Invincible06, jiangshibiao, JOHNKRAM, littlefriend, lucifer1004, lyuankai, Milesian, mohammedehab2002, moreD, p_b_p_b and kalki411 for testing and their invaluable feedback.
MikeMirzayanov for the great Codeforces and Polygon!
I have tried my best to write clear problem statements and make strong pretests. I hope you like the problems and enjoy the round.
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__
As the author of
rejected problemsthe date of this round, I hope you will enjoy it.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.)
As a one having negative contribution, I can bet this round will be hard
you are cursed
As a tester I must say problems are really interesting and well written and please notice unusual solving time. Good luck to all...
(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
Yes, they are subtasks. But they are different problems, too. Surprise?
Yaa really surprised since haven't seen that before...amazing work by you :)
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?
Meme
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$$$
Jokes aside but what does 750+750 mean? Could you please tell?
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.
lol
Read the comments first
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
Look who's acting decent all of a sudden lol. Why'd you assume I downvoted you in the first place?
just admit you didn't read the previous comments.
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.
Oh No! This shouldn't be happening. I upvoted you. Please write the blog soon.
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.
Bro u have to use long long int to store his number of accounts :')
i feel u dude power grid is down i had to write on my phone and the the comments are useless like me today
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.
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.
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)
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.
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.
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
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.
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.
aLT AcCOuNt
Agree. I can't understand what's wrong with your comment.
What a special weekend! Codeforces Round 700 and Topcoder SRM 800! :D Kudos to both Codeforces & Topcoder.
EDIT — It's SRM 799.
And there is the Quora Programming Challenge.
As a tester, I hope you will participate in and enjoy the interesting round!
Codeforces Round # 700, this is a special milestone.
What a Sweet AdHoc/MathForces round!
I suggest everyone to quit solving after C.
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.
but I like antontrygubO_o-style rounds :/
Yes, I like them too. I mean to eliminate our prejudices and stereotypes.
Hope this round disproves it?
Yes, It does.
GoraGoraGOra
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?
Bro till then give me some advice on how I should solve problems to become expert :)
Bro till then give me some advice on how I should solve problems to become specialist:)
Same advice but you should try to solve B tasks :) Look my previous comment
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?
Why this comment is downvoted? :(
woow, score distribution is announced so early! I appreciate it!
Thank you! It's glad to see you also like early score distributions.
Wow colourful testers!!!
Thanks for updating the constraints.
I see there is a pupil tester as well. Can anyone tell how to contribute to Codeforces as a tester?
эх -9
No one
Literally No one
First few comments downvoted as usual
If you saw your comment downvoted recently, that was me :)
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.
My comment to understand the post is useless. Yeah right, your comments are so useful, I am getting nirvana after reading them.
Can anyone tell me how to get upvotes without telling me how to get upvotes?
I just learned how to tell somebody to fish himself without actually doing so, see some comments above ;)
It's simple. just write only useful comments ;)
Do what Monogon does.
Div. 2: 500−1000−1500−(1500+1500)−3000 все так говорят)
there are three expected rating in this round for me.....ratng<1535 or (rating>=1535 and rating<1600) or rating>=1600....Pray for me
Wrong answer on pretest 6. :(
sad
You suck Great Hero
long queue again? :(
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 !!
i fucked up as usual no thing new
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.?
from that question ig
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...
what are the chances that div2 b has weak pretests.
I am worried about pretests of C :/
.
Div 2 D -> WA on pretest 6 :(
Try this tc
6
1 1 3 2 1 1
Yeah I have thought of this case. But I messed up the code. Thanks for the testcase
Still better than failed sys tests. T_T
this is the 100th time I WA for writing the wrong variable XD why do I keep doing this mistake?
Contest is anti-traditional because WA on pretest 6 not 2
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 ==5
total ans = 8+5 =13
No,this is not the correct testcase. My code gives 13 as the ans yet WA on testcase 6.
Try this tc
6
1 1 3 2 1 1
or
4
1 2 1 1
WA on 2 was not required , it was in samples .
For those who want test cases of Div 2 B -
(order of monsters matters)
here is(just like TC3 but in descending order) —
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).
My solution : 106824402
I am getting right answer for your provided tc, but still WA on submission https://codeforces.me/contest/1480/submission/106834906 plz help
Video solution to problem C: https://youtu.be/AgJrby-pShU
How to solve C?
https://www.geeksforgeeks.org/find-local-minima-array/
Not fair man, now I wish I had just googled it
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!!
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 1
For 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 1
2->n cost 1
3->n cost 2
i->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 :(
Kaun ho BC tum log. Kahan se aate ho?
Those who are getting WA on pretest-6 for DIV2D. Try this
Ans = 8
Two possible segments are
Works for me, but still failed on pretest-6
Same. this is the one that got mine
Answer is apparently 10
Nah, this works for me, too. 106837601
Can somebody explain the greedy, what is the logic that works?
The idea is there, but there is a > 0 in the constraint.
I wonder if anyone got more WA than me:)
https://www.geeksforgeeks.org/find-local-minima-array/
Oh so should it be done in log_2(n) asks??I implemented a ternary search instead hope it also passes system test :(
What is pretest 4 in Div1 C?
"Wrong ans on pretest #6" I guess I saw/read this line max number of times :|
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, authors
Much kudos to you liouzhou_101
How about setting E to be $$$4 \cdot 10^8$$$ points?
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.
You need only the monster with max attack power last, sorting of the others is not necessary.
I followed this idea but I got pretest 2 wrong? 106807055
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.
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)?
It's so sad when you find a $$$\mathcal{O}(n\ \text{polylog}\ n)$$$ solution to a problem and it's too slow QAQ
Is 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?
See below.
Not every $$$n \log^2 n$$$ fits anyway.
You can also do $$$O(NlogN)$$$ with persistent segment trees.
proublm D1 try this 13 2 2 2 2 2 2 4 5 3 2 2 2 2 answer is 7
worked for me, but still wrong answer on pretest:6
I think correct ans is 8
My code for div1D: almost 300 lines! Short explanation:
I skipped C for D.got this solution quite fast.but couldn't debug in time :(
If you are still figuring test cases that break your solution for div2D1
What are the correct answers?
How do you solve D2D? Asking both for first and second version. Thanks.
fuck you son of the bitches!!!!!
too much salt
also nice submission history
this guy got 18 WA in B !!
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 !
Code to D2
EDIT: 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.
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.
Thanks for pointing this problem out! Your comment deserved much more upvotes. And thanks for testing team for their response.
Very nice problems !!!
Yeah and bbye rating for me :(
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:
The target solutions I unsuccessfully tried to hack:
https://codeforces.me/contest/1480/submission/106805271
https://codeforces.me/contest/1480/submission/106806952
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$$$
But if I am not wrong, 10^9 shouldn't also have passed.
$$$10^9$$$ could possibly be done with $$$2$$$ seconds since the loop does not contain complex operations.
Or maybe its because of compiler optimizations.
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.
I got something unexpected for this hack: I believe it generates a valid test, but I got
Could you check what's going on?
Oh, sorry never mind. I guess I submitted the source code as the test instead of as the generator.
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.
Whats the hack case you guys using for div1A/div2C?
$$$n=1$$$, I believe
Congrats on red!
100 99 98 ... 2 1 101 102 ... 199 200
Many solutions checking for first and last 50 elements have passed the (weak)pretests
I registered for the contest but I couldn't attend because of a sudden meeting :(
Does my ranking go down?
No if you submitted nothing.
No
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
g
Div2 D2 pretest 6?
Why is this solution in problem Div2.D1 incorrect? https://codeforces.me/contest/1480/submission/106825810
The answer should be 9 but yours is 10.
Why brute force is passing the pretests for DIV 2 C?
I think problem Div1A/Div2C has appeared in leetcode or in some FAANG interview, because I saw and solved the absolutely same problem before
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.
I think it's this: https://leetcode.com/problems/find-peak-element/solution/#approach-3-iterative-binary-search
D1 pretest 6 ? Div 1.
try 11 1 2 5 1 1 5 1 1 5 1 1 answer should be 9
try
8
2 2 2 3 4 2 2 2
answer:6
You mean Div.2? (I assume from your submission history)
The test case that saved me was this:
6 3 3 4 8 3 3
Notice that you have to put 8 in a different array than 4 so that you can take both next 3s.
Thus you have to check 1 index ahead each time.
Well we will see if this is the solution if I get the problem.
try 8 1 2 3 3 4 5 3 3 ans: 8
both tests work for me but WA on pretest 6 anyway
What was your approach in C?? I was thinking of this approach "use Binary Search to find 1"
Binary search doesnt work in an unsorted array.
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)$$$.
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 Legend_of_Azkaban described it before.
I think n=1 is not present in pretest of d2c.
Now is the time to see if the pretests were actually strong.
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.
I think I'm going to FST...
Anyone with randomised solution for div2 C?
I just asked random indices and it is going to fst.
Problems were amazing! Thank You
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.
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.
Woah, that is nice and neat. I solved B1 greedy maybe that is why.
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:(
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.
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)
Codeforces = constructive and speed forces Change my mind:/
I'm not quite sure I understand the error in my solution to Div2 B.
My approach:
Any suggestions on what could be wrong with this?
Code
Why the downvotes?
That's a useless question — no one is going to tell, nor should you care.:)
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.. :)
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.
Duh. I didn't realize that's how it came across — a bad sense of humor from my end. I appreciate the feedback!
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.
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.
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.
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.
Is it rated?
Please noooo...
Hope to never see you as a setter again. Problems were clearly "made in China".
What's wrong with the Chinese questions?
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?
same :(
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])
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?
hack
botton.In normal rounds (like div.2) hacks can only be done during contest time.
Problem B2 is this problem but with $$$n = 10^5$$$ and $$$k = 2$$$.
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
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.
Yeah it should fail systest. I didn't even bothered to calculate the probability of success during the contest :(. What is TLE retry trick?
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.
Genius!
Are div2C pretest a joke or sth
Absolutely.. Mysterious
Why are there 0.5 solutions running on average?
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:
After debugging for a long time, I found that it should be:
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
You can put a link to your story here — https://codeforces.me/blog/entry/87419 ("Let's spread some positivity") :)
https://www.geeksforgeeks.org/find-local-minima-array/
The problem is div1A ?
Weak Pretests for problem B :(
Weak Pretests for problem C as well :(
c had very weak pretest
Problem D's solution:
Can anyone tell me why sorting is necessary for div2B?
I did without sorting
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).
You can handle it without sorting check my submission 106764675
Oh yes maybe it can be handled, merely saying what the idea behind sorting was.
strong pretests?
Not for B, I guess.
Предлагаю добавить фазу открытых взломов исключительно для этого контеста. Вряд ли удастся охватить все решения С одним набором тестов
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
NO. But some code that calculates the total damage may lead to overflow and output YES
My friend got hacked by this test...
It's a really interesting contest?! Yes.
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"
I hope that the error will be fixed. Since there were no problems during the competition, the round in my opinion should remain rated
Problem C was so unique that i couldn't find any of its hint on the internet. clown face x 2
also the pretest were so good that no one got hacked. clown face x 2
solutions were so good that they failed FST even after it's hint were on internet.
It is taking a long time for system testing.However I am eagerly waiting to survive test case 12 and 23 for problem "B".
Alhamdulillah,I have survived.
What the f*ck maan. this solution passing system 106771738 but it give wrong answer for the test
1 1 1000000000 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000
correct 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
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.
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????
This code can overflow in this test case. If you change
B
andsum
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.My Binary Search FSTed in C and gave TLE on TC11 . Really Feeling Sad
Weak Pretests for B and C
No one :
Me each time after submitting Div 2B :- Wrong answer on pretest 2 (T-T)
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 case
Normally 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?
Never have I ever seen such shitty pretests!
Just like I thought The largest pretest was 33329 instead of 10^5
Edit: The type of problems were good
this time pretest was not strong
Why Problems and Pretests are useless in this contest? Thanks liouzhou_101 for such a nice contribution. Maybe you should first google the problem before setting it in the contest!
Meanwhile all strong pretest: Am I a joke to you
are we gonna talk about them weak pretests?
systemtestfailforces :-(
"1000 coders have 1000 ways to write binary search." My C failed in system testing QAQ. Hope I can get back to candidate master as soon as possible.
I remember to check the case when n=1, but forget to print "? "
Usually pretests contain this kind of cases :(
My solution ask out all values if n <= 99. Else my binary search always execute exactly 30 times. But it failed :(
Hi, all! Why answer for test: " 1 1 1 10 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 " is "YES". But the hero will be dead after first enemy
But authors solve write YES. I demand RETESTING solves for task B
Nice pretests!
It hurts :_(
A small info on Div2 C pretests : 3800+ solution pass pretest whereas only 1300+ passed System test , More than 60% failed on System Testing , That is HORRIBLE
I increased more than 1000 positions xd
I went from 800 to 2800
Lol yeah thats horrible. I went from 4k to 2k cause i didn't get C in the first place :p
finally nice round! thx
Afrer fail in C Div2:
I cannot understand why I missed "=" in Div2B. It seriously hurts :(
Your "=" trespassed into my code :(
I had the same problem and it took me like 10 seconds to understand my mistake after I saw my solution failed:/
It's too sad to see so many system test fail ... poor pretest . this hurts more than WA
After Failing System Tests in C (https://i.postimg.cc/nhzHBJbh/testers.jpg)
I expected the editorial to explain the proof for problem C-Div2, but it just shows the steps to solve. Could anyone explain why the binary search solution is always true?
log_2(1e5) ~= 14 (requests)
14 << 100
hi ,i think my first solutions that were in better time can be working now because of the recently changes .could you please rejudge it ?
Kindly rejudge my solution for div2/B. Thanks.
Kindly rejudge my solution for div2/B.
I think my solution for Div2 B will pass with the new constraint. Kindly rejudge.
I think I got 1 WA due to overflow in B, please rejudge.
Hello, could you rejudge my problem B please? Thank you!
Your solution is incorrect and should not pass anyway. It is basically quadratic as far as I see
It passed when I resubmitted the exact same code O.o
There is no passed B in your profile
My bad, sorry
Had "show unofficial submissions" disabled
Nevertheless this solution does not look correct. Solutions with nested loop should not pass good testcases
So, you decided to change the problem statement after the contest so that solutions with real bugs pass and you don't get more SFTs
But people who failed just because they didn't include input magic and you didn't even try to include maximum test case, will have SFT nonetheless
So fair
I resubmitted the same code I submitted during the contest and it is accepted please re judge my contest code
kindly rejudge div 2B i think it will pass new testcases.
I think my solution for problem B will pass under updated constraints, please rejudge it.
wow thanks so much for the strongest pretests in the word!(read with sarcasm) my b failed just because of one <= that should have been <, and like that error wasn't the most unpredictable error and I think it should have been in the pretests and I know I know I should've paid attention that if the health gets 0 the hero dies or whatever but like couldn't they counted on people missing the details :"""
Does "ask a message in the round" in the announcement for problem Div2 B mean to write a comment to this post?
There is ask a question on problems page below the "complete problemset" link.
Kindly rejudge my submission for Div2 B. I believe it may pass with the new constraints. It has now passed the test on re submission.
Please rejudge my solution for div-2(B).
liouzhou_101 Rejudge my solution for problem B please.
I cannot message on the round dashboard page.
thx authors for retesting
You shouldn't keep it rated! Problems with B and weakest pretests for C! YOU'VE GOT TO BE KIDDING ME!!!
Plus are you going to check each and every comment here and then rejudge that particular solution?
Thats tiring!
P.S : I only say this for Div2.
the pretests were too weak. I have lost two problems because of nothing... thanks
I feel you. You're not alone
The exact same thing happened to me
I want my solution for div2B re-judged after new constraints.
Please make stronger pretests. It is very heartbreaking when your accepted answer fails in system testing. I think it is the third consecutive round in which many solutions have failed in system testing. Please make good pretests in the upcoming rounds.
It's surprising that so well-known problem is given to a Div 1 round.
Please rejudge my solutions of Div2B.
Hi, Im trying to get my problem Div2B submissions rejudged since there has been judging problems but I can't submit a question to the round. Does anyone else have the same problem? how can I solve this?
Please rejudge my solution of Div2B after adding new constraints.
Why is this round rated(((
I submitted 7 solutions for B during contest. The last submission should pass with the new constraints and probably the earlier ones too. Can you please rejudge?
PLEASE REJUDGE MY PROBLEM B DIV -2
please rejudge my B . it is getting AC in new constraints . here is proof ... https://codeforces.me/contest/1480/submission/106850831
Please rejudge my Div2 B for the new constraints
My solution of Div2-B failed in System tests, but the same solution in now getting submitted. Please rejudge my solution.
I think my solution for B will pass with the new constrains, could you please re-judge it? Thanks.
Link to the failed submission, which is correct: here
I don't want to spam comments but the 'ask a question' is not working from the contest page.
I think this round should be unrated since after the contest constraints are change.
I can't understand why codeforces is not making this round unrated. This is really the worst contest.
redudge my solution for problem B #106770831
Sorry, but I don't really know where should I message to ask for a rejudge of my div2 B submission. I tried the "ask a question" thing but it wasn't accepting my message. Could someone guide me on what to do?
Thanks
rejudge my Div 2B solution for updated constraints
Can you please rejudge my B solution?
On other hand, why not rejudge all B solutions instead of handling individual requests?
Please rejudge my B solution after new constraints.
please reduge my div2B. It is passing with new constraints
Please rejudge my DIV2B solution with the updated constraints.
please rejudje my solution again it is passing new constraint https://codeforces.me/contest/1480/submission/106771451
Please rejudge my div2B
My solution for the second problem should pass on updated test case(Verified myself). Kindly re-judge that.
Deat CodeForces team, Pls recheck my solution for B with new rules. thx)
https://codeforces.me/contest/1480/submission/106799368 Please rejudge it
I think it would have been a better decision if Problem Div2 Problem B was made unrated, as WA wasted most of the time debugging the solution. Even if it passes the test cases, the WA makes it insignificant.
Pls rejudge my solution on div2B. It passed with new constraint
I don't think it's a good solution for this kind of problem you should rejudge every solution
I think it will be better if the round is not rated
worst contest in a while. whoever set the pretests should be doomed.
i demand my rating back. this contest is f***ing stupid
codeforces is going to be the next codechef I guess..
Pls rejudge by div.2 problem B and problem C
my Problem B accepted with python 3 but is getting tle in pypy on same code why is this problem happening ? please rejudge my Problem B.
Div 2-B. My solution passed with new constraints. Please rejudge my solution.
Hello I want to rejudge my failed solutions for problem B. Can you please rejudge it?
перепроверьте мое решение в B
my submission might pass the new constrains, https://codeforces.me/contest/1480/submission/106812670
MY submission passed the new constraints here is the linkProblem B
is this the right way to ask them for reduge?
In problem B, my solution gives a TLE on TC 6 even after using fastIO. The complexity comes out to be O(nlogn) per testcase, I believe it should pass. Is there anyone else facing this issue?
Code: https://codeforces.me/contest/1480/submission/106853307
You are trying to create array of size 1e5 for each testcase and number of testcases are also 1e5. Ideally it should give RTE before TLE.
AC Code
Yes, this is the reason, thanks! :D
really weak pretests on at least 2 problems + a problem with already existing solution on geeksforgeeks Idk but that really sounds like a contest that should be unrated to me (I found out c had a solution on geeksforgeeks through this (https://codeforces.me/blog/entry/87524?#comment-758660) comment after the contest)
liouzhou_101 MikeMirzayanov
My solution of DIV1(A) got TLE on Testcase 53 and same solution is now giving AC.
Please Rejudge my solution.
Link for both submissions : https://codeforces.me/contest/1479/submission/106853293 [AC] https://codeforces.me/contest/1479/submission/106769900 [TLE]
It's ok get some unexplainable s*** with UB in code
And you do not flush stdout, how you are supposed to get ans to query if you do not send it?
Since the constraints are changed after the contest (and that too for B question which has affected large number of participants), codeforces should make this round unrated. Moreover Div2.C has already existing solution on geeksforgeeks (refer https://codeforces.me/blog/entry/87524?#comment-758660)
Will additional submissions after AC in Div 2B still get 50 point penalty?
This round should be unrated. such weak test cases
Codeforces is now acting similar to codechef. 2 problems have very weak test cases and now changing the constraints after the contest is illogical. Far better to make this contest unrated MikeMirzayanov
lol this is what they said 'anti-traditional'; Please_rejudge_my_div2B_solutionForce!
Stop rejudging and just unrate this crap.
it's not fair that we counted Task B to those who didn't count the overflow. This is the problem of the contest authors that they did not take this into account in the tests, but for some reason those participants who are able to take the constraints into account have suffered.
If changing constraints is an option then why not change the constraints for C to n > 1. This too should be fair
Before this change my wrong answers (for B) were giving memory limit exceeded now it is giving run time error.When I saw memory limit exceeded I got confused and because of that i did 5 more submissions all of them gave me memory limit exceeded.if previously I knew it that i am getting runtime error I suppose to not do that 5 submission. It was caused panic. And also rating drop.
How can this contest be rated! Firstly the div2C was available on gfg and that also had such weak pretests and now this rejudging for problem b
Exactly
Can you please re-judge my solution for div2b
How long does it usually take to update ratings?
3-5 hours usually (during Div1-Div2) I think..
Pre-existing solution of exact same question (div2.C): https://www.google.com/amp/s/www.geeksforgeeks.org/find-local-minima-array/amp/
I wrote the code in python for question B.The Great Hero. I just checked , participants with same logic written in c++ got AC after rejudge where as i am still getting TLE on test case 12 verdict !!!!
why same logic but different verdict on different language ?
Anyone help please.... my rating is getting affected a lot because of this .
Why is sorting with Brute force getting accepted in Div2B, it shouldn't
Sorting with Brute force? Is that a new sorting algorithm?
I mean sorting was required, but then just doing brute force to keep on subtracting health shouldn't pass right, it should cause TLE.
Today I hacked one solution for B just with this simple test:
1
5 10 1
10
10
There is no overflow, just checking that the hero can’t fight with 0 health. My hacking attempt is still displayed as successful. But now the solution passed system tests and it is displayed as correct. How it is even possible?
Yes, I noticed that, and I also noticed that not all tests are available for the codes that have been rejudged only the first 20 tests available
Please! atleast judge the correct solution in Div2B.Wrong solution is also passed.
If people agree then please make this round partially rated (rated for those who're getting positive delta)
To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!
MikeMirzayanov, Is there any way to hack solution after contest? I've noticed some submissons on Div2C that are available for hacking
What about participants who gained their points by hacking instead of solving, and their points now are deleted and their ranks are updated? Do some of them want e.g. get decrease of rank instead of increase which they deserved?
Also consider a fairness of the following case, related to Div.2 B: Some participants got 'Pretests passed' having wrong solution and they were not hacked. Others were hacked (e.g. they had a hacker in their room) and spent much time to solve correctly! After contest finished those participants who had wrong solutions got AC because they solved incorrectly, but tests for correctness of the original problem were voided (those which include values of >1e6).
Therefore it comes out that participants were solving one problem, name it 'B1', but they were judged by another problem, name it 'B0'. Changing a problem after contests started (in this case also after it finished) is an interesting precedent! Which is made by good will of organizer team of cource :). But I suggest to put an eye on a flaw of fairness once again.
UPD. I will add one more thought. Concern about etics towards contestant. He/she solved original problem, and the problem later is absent (it is changed). Then he/she can't discuss it with others, can't sent a link to his/her friend, and e.g. he/she was proud of himself/herself by solving harder problem than solving its easier version.
hero attack power =1, hero health =10^6, n=1, monster attack power =1, monster health =10^6,
The above case repated 1e5 times (t=1e5) would give TLE to many solutions which should get TLE as operation count would go to 10^11 by brute force method.
ATLEAST ADD THIS TEST CASE!
My rank dropped from 888th to 11111th because I think I have solved ABC, but C failed system test and B was hacked while I didn’t notice. I know it’s my fault, I didn’t consider all situation. Originally: rating +50, now: rating -150. I can’t face it :(
F
I got TLE on Div2 B due to Python's
input()
being too slow to read a very large line within the alloted time...Using
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
fixes the issue, wtf -_-Can't we at least get that kind of input in the pretests? Or rejudge?
I've got a problem with Div2 C. G++17 does not support interactive problems. No matter how I output queries,it's just "wrong output format Expected integer, but "?" found". This problem does not occur in G++14 and G++11 with the same code. [submission:106857366][submission:106857412]
106857412
It is fairly obvious that this is the problem:
cout<<"! "<<solve()<<endl;
I am not sure about what the standard says about evaluation order and things... But it will most likely work if you first calc solve(), and then output the result.
It works, thanks :D
I didn't understand why Div2B statement has been changed and rejudged while there was only hacks issue with integer overflow. So only hacks must have been cancelled
Deleted
I made a terribly stupid mistake in C. I set a base case which would give the answer as 1 when N=1, but I forgot to print an exclamation mark before printing 1. WA on test 43. Could have been a specialist today. I have a great amount of self-hatred right now.
For interactive problems, I find that making helper functions to do all i/o helps a lot with avoiding errors like these. You can make them at the start while reading the problem statement and you will not make mistakes like these, and later on your code will be more readable because you can just a helper function rather than having a bunch of visible i/o cluttering the code which works on solving the problem.
Yeah... It is a common mistake for beginners (including me) not to use helper functions in the code. Just keep in mind that if you write the same thing twice in your code, you better create a function for that. It is also a good practice in the real world programming. Good luck next time!
Twice I've submitted my code to a previous problem I've already solved.
Once, I missed the case of 1, and had I included case of 1 I would've solved my first live 1900 problem.
Once, I forgot to print new line on an edge case.
Once, I solved a question literally seconds after contest ended.
SO...things happen
Thank you so much for the hardwork of making this amazing contest. Really enjoying this wonderful website and this amazing community.
Why is this round not unrated?? Inarguably worst round in a while.
https://www.geeksforgeeks.org/find-local-minima-array/ Div2 Problem C was a question directly from gfg :(
Why are the pretests for C so poor?
Agree bro, at least they should have added one case for n = 1.
They have added a test case for n=1.Test case no:43
it wasn't in the pretests
And what?
and that's not supposed to happen
You don't get the purpose of pretests. Read Mike's blog about CF rules.
liouzhou_101, I guess you must know that a considerable amount of accepted solutions for B are wrong. The fault being that they're considering that if the hero has his health points zero before the last attack, he will still be able to win. Now, these accepted solutions are churning out WA now. So, I just want to know that since the solutions are not going to be re-judged again, why are you folks choosing to make this decision?
Div 2B WA on pretest2 (: Where the problem is?
in problem B wrong solution have also been accepted.
rejudge submissions to div2 B
All this contest has been is
Explain this please
Corner case that is inside the new limits removed..
Problem D2B
This was Test #23 earlier
1
3 10 1
2
16
liouzhou_101 MikeMirzayanov
Many solutions that are now accepted failed on this test case..
I know tagging random users is dumb but you guys are active in the community so tagging you all.
-is-this-fft- galen_colin Monogon AnandOza
Bigger problem is that new limits were set. There are rules — https://codeforces.me/blog/entry/4088 of contest. And judging was applied after problem statement was changed. So the results correspond for those who solved another (easier) problem, but does not correspond to those who solved an original. Also these results do not correspond to those who hacked on original problem, because their hacks were voided (ignored) after contest, even if they were good. So it is unfair that some favour was given for 'coders' (AC), but disfavour for 'hackers' who also participated in the contest under the same rules.
I accidentally upvoted this comment on my phone, can some extra people downvote it to compensate? Thanks all.
The difficulty level of problem "A" and "B" of div-2 have not published yet!!!I am awaiting with an excitement.Because many of us became frustrated after seeing the final standings.Thank you.
I copied a code from the internet which is published before the start of the round then I was unrated.(problem D)
Code link: https://www.cnblogs.com/zwfymqz/p/9223425.html (It's a tutorial of Mo's algorithm on tree which is published in 2018)
Can you change my rating back again? (Because I can swear that i didn't cheat in this round, and I really want to be an international grandmaster.)
Thanks and sorry for my poor English.
MikeMirzayanov Sir it is almost 17 hrs but you are not replying me. How can I believe that if I face any issue on the platform, admin will be there to help me out.
You can try to send messages to him.