### vovuh's blog

By vovuh, history, 5 months ago,

<almost-copy-pasted-part>

Hello! Codeforces Round #634 (Div. 3) will start at Apr/13/2020 17:35 (Moscow time). You will be offered 6 or 7 problems (or 8) with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have rating 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ACM-ICPC). Thus, during the round, solutions will be judged on preliminary tests, and after the round it will be a 12-hour phase of open hacks. I tried to make strong tests — just like you will be upset if many solutions fail after the contest is over.

You will be given 6 or 7 (or 8) problems and 2 hours to solve them.

Note that the penalty for the wrong submission in this round (and the following Div. 3 rounds) is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participants of the third division, you must:

• take part in at least two rated rounds (and solve at least one problem in each of them),
• do not have a point of 1900 or higher in the rating.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you.

Thanks to MikeMirzayanov for the platform, help with ideas for problems and for coordination of my work. Thanks to my good friends Daria ZeroAmbition Stepanova, Mikhail pikmike Piklyaev, Maksim Ne0n25 Mescheryakov and Ivan BledDest Androsov for help in round preparation and testing the round. Also thanks to Artem Rox Plotkin and Dmitrii _overrated_ Umnov for the discussion of ideas and testing the round!

Good luck!

</almost-copy-pasted-part>

UPD: Also thanks to ma_da_fa_ka and infinitepro for testing the round!

UPD2: Editorial is published!

• +358

 » 5 months ago, # |   +45 vovuh logic
 » 5 months ago, # | ← Rev. 2 →   +12 vovuh hello , I guess my rating will down to less than 1600,but I've registered before,will I be rated in this case?
•  » » 5 months ago, # ^ |   0 May b nope...
•  » » 5 months ago, # ^ |   0 I think the you won't be rated in this situation.
•  » » 5 months ago, # ^ |   +17 I think after rating is updated, you can deregister and register back
•  » » 5 months ago, # ^ |   +4 I guess you are lucky (?) :D
•  » » » 5 months ago, # ^ |   0 Maybe
 » 5 months ago, # |   +11 Wow wow, another Div.3 but this time I will not get rate :D
 » 5 months ago, # |   +7 I good opportunity to get my rating back from today's Div2 lol
 » 5 months ago, # |   +9 What does "open hacking" mean, sorry I am new? How can you hack a solution?
•  » » 5 months ago, # ^ |   +1 After each contest, there is a time of 12 hrs where if we find someone's solution incorrect, then we can give input the case at which the submission fails, if hacked you are rewarded with some points sometimes.
•  » » » 5 months ago, # ^ |   0 Not after each contest LOL
•  » » » 5 months ago, # ^ |   +2 is there a way to sort solutions by programming languages? Now, I have to go through all the submissions to find Java submissions.
•  » » » » 5 months ago, # ^ | ← Rev. 3 →   0 On the right hand side of status page,you can find language option under status filter and select language Java.
•  » » » » 5 months ago, # ^ |   0 status > status filter > languages
•  » » 5 months ago, # ^ |   +11 1)After this contest (the same for following div.3 rounds and educational rounds), there's a period of 12-hour hacking phase.That means, you can hack anyone you want(while in normal rounds you can only hack your "roommate" during the contest).2)If you find something wrong in other's solutions(but passed the pretests), you can give an input which will make the solution fail (wa,tl,...)In div.2 you get 100 points from each successful hack and lost 50 points from each unsuccessful oneIn div.3 there's no prize or penalty for hacks.
•  » » » 5 months ago, # ^ |   0 Simply That Problem Will be Marked as Unsolved
•  » » » 5 months ago, # ^ |   0 What's "roommate"? Sorry, newbie.
•  » » » » 5 months ago, # ^ |   0 In a normal round, you are assigned to a specific room, with ~50 people if I'm not mistaken. During the round, you can attempt to hack their solutions, but only if you lock your own solution first (this is because you will be seeing others' codes, it wouldn't be fair if you could change your own code).A successful hacking attempt will give you a 100pt boost, while an unsuccessful hacking attempt will take away 50pts from you.
•  » » » » » 5 months ago, # ^ |   0 and what does locking the solution mean? If hacking starts after the round then how can one change his code?
 » 5 months ago, # | ← Rev. 4 →   -25 Hope it won't go too mathematical ;/ questions about string is more interesting;)
•  » » 5 months ago, # ^ |   +6 50iq is not bad actually idk
 » 5 months ago, # |   0 **BACK TO BACK CONTEST **
 » 5 months ago, # |   +77
•  » » 5 months ago, # ^ |   +79 But comparison of other websites code forces server is good
•  » » » 5 months ago, # ^ |   0 It's not just good it is pretty awesome when compared to others. Some of them had to cancel their contest just because the servers weren't able to handle the load and the submission queue was getting overloaded.
•  » » 5 months ago, # ^ |   +63 Did you ever participate in codechef cook off or luch time...they can't handle even 5000 participants properly...whereas codeforces handles nearly 20K participants...comparitively codeforces servers >>>>> any other cp server
•  » » » 5 months ago, # ^ |   0 Can't you guys take it as a meme...
•  » » » » 5 months ago, # ^ |   0 Exactly!!!
•  » » » » » 5 months ago, # ^ |   0 These guys become really too serious.
•  » » » » » » 5 months ago, # ^ |   0 Their serious and sensible reply let me know that CF's servers are not bad, very good instead. Next time I'll be more patient.
•  » » 5 months ago, # ^ |   +25 The girl is the middle would rather be saying that "Give the lengthy problem A and engage participants."
•  » » 5 months ago, # ^ |   0 Did you ever participate in atcoder contests It servers cannot hold even 5000 participants. Codeforces servers when it is +5000 submissions at time it will get some time but when it is less it works good!
•  » » » 5 months ago, # ^ |   +1 it was just a meme bro... I know CF is really good.. I apologize for posting this...fine?
 » 5 months ago, # | ← Rev. 2 →   0 After every contest i felt disappointed.But believes that practice makes a man perfect. Best wishes for all. <3
 » 5 months ago, # |   +3 Hoping to see "Yet Another Problems".
 » 5 months ago, # |   +5 finally a div 3 contest :(
 » 5 months ago, # |   0 Can "Hacking A Soluton" also be included in Div 3 ?? Just an idea.
•  » » 5 months ago, # ^ |   +3 When div3 was first proposed then it was said that a beginner should waste time in hacking instead of solving problem. So contest time hacking is not available in div3 rounds. And there is 12 hours hacking phase for improving hacking skill. But i think 12 hour is too long. It can be reduced.
•  » » » 5 months ago, # ^ |   0 Is Hacking Possible in Virtual Contest??
•  » » » » 5 months ago, # ^ |   0 yes if contest is still in progress hacking
•  » » » 5 months ago, # ^ |   0 I think 12 hour just for global, maybe someone finish the problems then have to go to bed.When they weak up, they can hack.
•  » » » » 5 months ago, # ^ |   0 Actually after 6 to 7 hours nothing for hacking. Almost all the hackable solution are already hacked in this time.
 » 5 months ago, # |   +4 Thank you, as always I am excited for another div.3 :)))
 » 5 months ago, # |   0 I should try to increase my rating in this contest....
 » 5 months ago, # |   -16 Hello, is this rated?
•  » » 5 months ago, # ^ |   0 rated for div 3(below 1600 rating)
 » 5 months ago, # |   +4 I'll try to skew my propagating wave at least this time. Pray for strong pre-tests
 » 5 months ago, # | ← Rev. 2 →   +143
•  » » 5 months ago, # ^ |   0 lol
 » 5 months ago, # |   0 Problem set in recent codeforces contests seems tough for me. Looking to get some easier problem this time.
 » 5 months ago, # |   0 Div 3 means higher participation. I hope the testing is fast!
 » 5 months ago, # |   +8 hopefully some short problem sentence
 » 5 months ago, # |   0 Looking forward for the contest .✌️
 » 5 months ago, # |   +24 Why setter is yelling at tester?
•  » » 5 months ago, # ^ |   +41 Because of my invaluable suggestions :)
•  » » » 5 months ago, # ^ |   0 reveal unto us, are the problems sexy?
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +16 I think you should explain about your suspicious behaviour in the past contest. Because it looks like you've cheated before.your suspicious behaviourApologize in advance if I mistakenly understand it.
•  » » » » 5 months ago, # ^ | ← Rev. 3 →   +5 I am not being rude, but I don't think so I need to explain you anything :)
•  » » » » » 5 months ago, # ^ |   +11 The thing is, your code is totally same with another code in the past contest.I don't want to be an annoying guy who repeat one thing everywhere. I just want to know what happen. If it isn't a cheat, I will sincerely apologize. If you've already be punished for that, I won't mentioned it anymore.I will keep annoyying you if and only if you really cheated and haven't been punished so far.
•  » » » » » » 5 months ago, # ^ |   0 Well You can see my rank in this contest :)
•  » » » » » » » 5 months ago, # ^ |   0 ok, got it.
 » 5 months ago, # |   -9 Hoping for stronger pretests in A. Got hacked (unfortunately) in the educational rounds and it had been a while since I had solved 3 T_T and I missed it thanks to the A.
•  » » 5 months ago, # ^ |   0 You should be more careful with some corner casesThat's more important and valuable than strong pretests.
 » 5 months ago, # |   0 I hope it will be like this for second time!!
•  » » 5 months ago, # ^ |   0 good luck and high rating bro
•  » » » 5 months ago, # ^ |   0 thanks bro
•  » » 5 months ago, # ^ |   +1 00:01 nice network
•  » » » 5 months ago, # ^ |   0 Yes , it worked good this time (^_^)
•  » » 5 months ago, # ^ |   0 You just risked there by some basic observation, I don't think that on minute 2 you were able to prove your solution. So don't be happy by that.
 » 5 months ago, # |   0 I hope to see Math problem~~
 » 5 months ago, # |   +2 you make me a green i dare you
 » 5 months ago, # |   0 good luck
 » 5 months ago, # |   +3 Hope the system test won’t be too long.
 » 5 months ago, # |   0 It's good to see vovuh back but I expect that codeforces will do something in order to handle such large number of submissions during the contests and I guess this time it won't be queueforces :)
 » 5 months ago, # |   +1 I hope that the gap between the div.3 rounds will be decreased , its the best round
 » 5 months ago, # |   +2 Hope my rating will go up.I'm so vegetable......
 » 5 months ago, # |   0 Hope the statements will be shorter -_-
•  » » 5 months ago, # ^ |   +16
 » 5 months ago, # |   +10 Thanks vovuh again for bringing such contests in this pandemic situation we highly thanked to codeforces and its community for bringing such contest in this period to make us somehow busy and involved.Thank you codeforces community !
 » 5 months ago, # |   +9
•  » » 5 months ago, # ^ |   +1 The color spectra doesn't quite match Codeforces band XD
 » 5 months ago, # |   +6 I am becoming Expert Blue after this round.
•  » » 5 months ago, # ^ |   0 I don't think so
 » 5 months ago, # |   0 Is it rated?
•  » » 5 months ago, # ^ |   -7 For you, yes. For expert or more, no.
 » 5 months ago, # |   +2 Isn't it more logical to not allow experts or above from submitting solution for first 20 minutes rather than making problem A hard/confusing for div3 rounds atleast. Many participants don't even submit solution if they find problem A confusing or tough for it's bracket.
 » 5 months ago, # |   0 My rating is just 1600, so helpless
•  » » 5 months ago, # ^ |   0 lol similar is case for guys having rating just 1900
 » 5 months ago, # |   0 Good Luck Have Fun!
 » 5 months ago, # |   0 what happens when i hack my own solution ?
•  » » 5 months ago, # ^ |   0 pts — your pointsSo, if you hack task A, then:new_pts = pts — points_from_task(A) + hack_points
•  » » » 5 months ago, # ^ |   0 i guess both points are equal.
•  » » 5 months ago, # ^ |   +1 If successful:You will lose a problem solvedIf unsuccessful:Nothing changes.So it's obviously meaningless to hack yourself unless you've found some mistakes in your code after the contest.
•  » » » 5 months ago, # ^ |   0 oh i got that ,thank you.
 » 5 months ago, # |   0 Good luck to you all
 » 5 months ago, # |   -23 What you see: Codeforces Round #XYZ (Div. 3)What I see: Another unrated contest :'(
•  » » 5 months ago, # ^ |   0 hardikpandya why the hell are u giving this contest ,if u have such a mentality,and posting this nonsense doesn't show that u are cool
•  » » » 5 months ago, # ^ | ← Rev. 2 →   -8 pizza_hut what mentality? I am just saying that I am sad that the contest is unrated. It is much more fun when it is rated. What is your problem with that?
•  » » » » 5 months ago, # ^ |   -20 hardikpandya whats the problem when contest is rated for 70% of users on codeforces
•  » » » » » 5 months ago, # ^ |   +7 I think you have completely misinterpreted me. I meant that it is more fun to give a contest when it is rated for you.
•  » » » » » 5 months ago, # ^ |   0 hey, first of all, learn to give respect to others (doesn't matter he is highly rated or low) and don't talk rudely. He was just saying that this contest is unrated for him and of course this was unrated for him because he has done efforts to be at that position where Div3 even Div2 is unrated for him. So, please don't post such non-senses. Even today tourist gave the Div3, can you stop him...No nah?
 » 5 months ago, # |   +3 Can the frequency of Div.3 contests increase ?
 » 5 months ago, # |   0 let's hope that i get one question correct on this site tutututu
 » 5 months ago, # |   +61 This is what happens when Tourist attends Div 3.
•  » » 5 months ago, # ^ |   +6 How can one read the problem, figure out the solution and write down the code in 1 minute.....
•  » » » 5 months ago, # ^ |   +9 Think about reading 3 problems, figuring out solutions, coding all 3 of them and getting them accepted in 3 minutes.
•  » » » 5 months ago, # ^ |   0 He doesn't read the problem, nor do any other red coders. They go straight to test case, find a pattern, and implement.
•  » » » » 5 months ago, # ^ |   0 Unbelievable!
•  » » » » » 5 months ago, # ^ |   +46 If problems see tourist comming they give up and solve themselfs.
•  » » » » » » 5 months ago, # ^ |   +1 You are very humorous
•  » » » » » » 5 months ago, # ^ |   0 lol
•  » » » » » » 5 months ago, # ^ |   0 Actually tourist has solved the problems before they solve themselves:)
•  » » » 5 months ago, # ^ |   0 technically, it was 36 seconds
•  » » » 5 months ago, # ^ |   +3
•  » » 5 months ago, # ^ |   0 he submits all the answers after that he reads the questions
 » 5 months ago, # |   -15 What's the point of having 50000 testcases, if giving verdict still takes you > 10 minutes?
•  » » 5 months ago, # ^ |   +72 I'm sorry, what about you? I don't see any of your submissions were judged for more than 1.5 minutes.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 F took > 10 minutes. It really didn't affect me. I understand its because these rounds don't have pretests, I guess.
 » 5 months ago, # |   +38 Wow the servers have REALLY IMPROVED. mikemirzayanov orz
 » 5 months ago, # |   +75 tourist solved 7 problems in 22 minutes and still atheists exist. orz
 » 5 months ago, # |   -8 Tests today was rlly fast, thx)
 » 5 months ago, # |   +16 A nice and balanced round !!
 » 5 months ago, # |   +7 How to solve E2 and F?
 » 5 months ago, # |   +12 Easy +rating, nice contest)
 » 5 months ago, # |   +5 I was logged out suddenly while submitting please solve this problem it occurs most often during contests with me!
 » 5 months ago, # | ← Rev. 2 →   0 How do you do E2? I spent like 45 minutes binary searching for the second endpoint(and I think it was probably the right way since you have blocks of xyx or just one large block of length x), so you can use binary search to find the optimal value for the second endpoint, but it wouldn't work. EDIT: Just realized that I thought a_i<=26 for E2 (as it was in E_1) so that's why I was getting wrong answer
•  » » 5 months ago, # ^ |   +2 Observation:The contribution of a number is limited by number of occurrences of prefix and number of occurrences of suffix, In other words, if you have a prefix of 7 occurrences and suffix of 2 occurrences, Then you're only contributing to the final answer with just 4(2 from the left side which has 7 occurrences, and 2 from the suffix), So contribution = min(prefix,suffix) * 2.Knowing the above, We can just try for each number x, A possible prefix that has 1 occurrence.. 2 occurrences .. 3 and so on, you can fill the middle with an element that occurs the most, you have only 200 distinct element, just go over them all.
•  » » » 5 months ago, # ^ |   0 Oh my this is neat. I mean the idea about checking only prefix and suffix. Thanks!!
 » 5 months ago, # |   +10
 » 5 months ago, # |   0 How to solve E2. Any idea??
•  » » 5 months ago, # ^ |   +1 store position of every element in a vector v[203].for each number between 1 to 200 run two pointer from start and end of its position vector and between them find maximum time occuring integer frequency using prefix sum 2-d array.
•  » » » 5 months ago, # ^ |   0 can you elaborate on the prefix sum 2-d array? how are you storing in them?
 » 5 months ago, # |   0 my approach for E1 was to check for the next max frequency of a number between the extreme positions of all the numbers having max frequency ...what's wrong in this??
 » 5 months ago, # |   +1 more than 60k accepted submission and aprox 26k participants.wow amazing.
 » 5 months ago, # | ← Rev. 3 →   0 Why i can't hack someone? It's write me "Illegal contest ID" or "Неверный идентификатор соревнования"
•  » » 5 months ago, # ^ |   0 Hack via status page,not standing page
•  » » » 5 months ago, # ^ |   0 Thank you very much :)
 » 5 months ago, # |   +1 Fast servers but speedforces :(
 » 5 months ago, # | ← Rev. 2 →   +3 How did you all solve E2? I used Mo's and I wonder if that was overkill.
•  » » 5 months ago, # ^ |   0 Oh man the alphabet is only size 200, Mo's was definitely overkill.
•  » » 5 months ago, # ^ |   0 Yeah, I used Mo's too, don't know how others got that right
•  » » 5 months ago, # ^ |   0 complexity- (2*10^5)*200 I will tell very briefly... for each index i let x=arr[i] and till now(including i) let it(x) has appeared fth time so if (Frequency of x in whole array)/2 >= f then i found index j of x from the end of array such that in segment arr[j...n] occurrence of x is also f and hence I iterate through all the number 1<=n<=200 an found the no of occurrence O= of such n between (i,j) . so length of three blocks palindrome will be f+f+O.Do this and update the result if you got a larger length.
•  » » 5 months ago, # ^ | ← Rev. 4 →   0 Here's my approach: Loop through all $k$ possible "symbols". This will be the symbol forming the prefix and suffix (aaa...aaa) Put two pointers on the first ($i$) and last ($j$) occurrences of the symbol. Find what's the best score for the middle part (...bb...) between $i+1$ and $j-1$ using a precomputed table of counts for each prefix and each symbol. Move pointers towards each other to the next two occurrences of the symbol from #2. At every time, you know exactly how many of these symbols there are to the left (= to the right) of the middle part, so the score for this partition is middle part score + 2 * symbol count. Repeat until they meet, keeping track of the maximum score. $O(n\cdot k^2)$ in total, but the operation #3 is rare in practice, so it passes the pretests ¯\_(ツ)_/¯. Got MLE on the first attempt though, lol. Don't define int long long where it's not necessary.
•  » » » 5 months ago, # ^ |   0 Excellent solution. I thought O(N * K^2) would fail, but yours is super simple, so I guess it has a very LOW constant factor.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +2 That is $O(n \cdot k)$ in total if you have position pre-calculation, not $O(n \cdot k^2)$. That is because $\left(\sum \text{occurrences of symbols}\right) = n, \text{not } n \cdot k$.
•  » » » » 5 months ago, # ^ |   +3 but for each prefix and suffix of given size and letter, he is going over all 200 letters to find biggest centre block. So I think its really $nk^2$ with small constants.
•  » » » » » 5 months ago, # ^ | ← Rev. 2 →   +3 I think prefix table can be calculated for vector(200), then the max_element(for "b") can be found in O(k) time. Since we traverse over O(n) two pointer pairs (i,j), this gives total time O(nk).
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 FYI this approach is almost optimal; but at step 2 you should initialize $i$ and $j$ to the two middle occurrences of the symbol (if the amount of symbols is odd, just ignore the middle one), then move them away from each other, towards the end.The benefit of this is that you can start with an empty set of frequences $f[200]$, then initialize that to the counts of each symbol between $i$ and $j$. Keep track of the most frequent symbol whenever you update ++$f[\cdot]$. And then do --$i$, ++$j$, and update $f[]$ as you go. You can always keep track of the most frequent letter in the middle part this way, and complexity is $O(n)$ because you do ++$f[\cdot]$ at most $n$ times.
•  » » » 5 months ago, # ^ |   +3 For E2, I coded a O(nklog(n))time algorithm using the same idea as yours except using binary search instead of prefix sums. I realised that the complexity is too large. However, for testcase 9, which has 134 repeated 2e5 times, my solution should simplify down to O(nlogn). However, when I ran it on my system, it took more than 30 seconds and gave me TLE on codeforces. Can you please help? Here is my submission https://codeforces.com/contest/1335/submission/76624993
•  » » » » 5 months ago, # ^ |   0 I also tried the same thing but got tle on test 15 .76625017Later i think to remove binary search and precompute freq table but memory limit exceed on test 9 .76625886can anyone help ?
•  » » » » » 5 months ago, # ^ |   +3 Replace ll from int in your program
•  » » » » » » 5 months ago, # ^ |   0 wtf , It worked .how they can set such a memory limit.
•  » » » 5 months ago, # ^ | ← Rev. 4 →   +1 E2 complexity analysis: $\displaystyle \sum_{c=1}^k freq_c \cdot k = \displaystyle k \cdot \sum_{c=1}^k freq_c = O(k \cdot n)$Sum over $c$ for choosing the number in $1^{st}$ block. $freq_c$ for iterating over all possible lengths of $1^{st}$(and $3^{rd}$) block. Multiplied by $k$ for choosing the number in $2^{nd}$ block.$\displaystyle \sum_{c=1}^k freq_c \neq k \cdot (freq_c)_{max} \neq k \cdot n$ $\displaystyle \sum_{c=1}^k freq_c = n$
•  » » 5 months ago, # ^ |   0 What is Mo. I thought of doing binary search but failed to do so.
•  » » » 5 months ago, # ^ |   0 maybe Mo's algorithm?
•  » » » 5 months ago, # ^ |   +3
•  » » 5 months ago, # ^ |   0 Could you please explain how you applied Mo's?
•  » » » 5 months ago, # ^ |   +2 The problem can be reduced to answering a bunch of queries of the form: What is the most frequently any element appears in the range [L,R]? If the alphabet is large, you could attack this with Mo's Algorithm.Unfortunately, it slipped my mind that since the alphabet is so small (only up to $200$ symbols), you could more simply create 200 prefix sum tables instead.
•  » » » » 5 months ago, # ^ |   0 I didn't quite understand from your code how you're generating these queries. Could you please elaborate how you're generating these ranges?
•  » » » » 5 months ago, # ^ | ← Rev. 2 →   0 I did, but one must be careful to not use long long, since it used to much memory. We have to use a $32$ bit type.76620592
•  » » » » » 5 months ago, # ^ |   0 My solution is similar to yours but it is giving TLE on test 2. I am not able to figure out the reason.My Submission
•  » » » » 5 months ago, # ^ |   0 Is Mo's algorithm the only way to do it?
 » 5 months ago, # |   0 Really good round! I loved problems D and F. Had an idea for F but gave up after 20-25 minutes of implementation after I realised I didn't account for something mentioned in the question. Had about 20 minutes for E1 and E2 (I regret not having attempted E1 and E2 before F). I believe I'd have been able to solve E if I made a wiser decision earlier but shit happens, lol. Also, ideas for E, anyone?
•  » » 5 months ago, # ^ |   0 You can enumerate a and the number of a, and then enumerate what's b, it seems 200*200*n, but you can find the really time complexity is 200*n
•  » » » 5 months ago, # ^ |   0 Keven Can you explain your solution? Is it similar to this: https://codeforces.com/blog/entry/75908?#comment-602884
•  » » » » 5 months ago, # ^ |   0 200*200*n, first 200 enumerate a, n is the number of a, so first 200 times n is n, time complexity is 200*n
•  » » » 5 months ago, # ^ |   +1 can you explain me why it is not 200*200*n?I got AC on E1? but i assume that complexity was 200*200*n, now i sent same code in E2 and i got AC
•  » » » » 5 months ago, # ^ | ← Rev. 2 →   +1 In your solution you have y = v[a].size() - 1; which is actually not always n. In fact it would make the make the factor of 200*n to just n.
•  » » » » » 5 months ago, # ^ |   0 yeap, I already got it, thanks!
 » 5 months ago, # |   0 can anyone point out which test case is giving wrong answer in this code for question B of this contest. https://codeforces.com/contest/1335/submission/76554481
•  » » 5 months ago, # ^ |   0 i missed corner case when we have to take 26 unique characters.my bad
 » 5 months ago, # |   +8 In problem F, if N and M's range can be confirm instead of N*M <= 1e6 will be better
 » 5 months ago, # |   0 How do you guys solve D?I finally figure out that we must change 9 postions which are respectively distributed in the nine squres.So I enumerate the column and the row (maybe like N-queen Problem) and get the answer....
•  » » 5 months ago, # ^ |   +58 Author's solution is to replace all 2 with 1.
•  » » » 5 months ago, # ^ |   0 Wow, this solution is very cool!I think replacing 3 with 1 / 2 / ... is also ok.
•  » » » 5 months ago, # ^ |   0 Why 2?
•  » » » » 5 months ago, # ^ |   +3 You can take any 2 numbers.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 wow that's innovative, instead of figuring out which cell to edit.
•  » » » 5 months ago, # ^ |   +3 Yeah, I also changed every 9 to 8. It took just less than 4 minutes for me to solve this. Fastest D problem ever for me.
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 I place a number 9 - currentNumber if its non zero else 1 in every cell, such that whose row,col and block was not visited before through any cell. To check that I use simple hashing.
•  » » 5 months ago, # ^ |   0 IdeaYou only need to make changes such that each row, col, block have at least two same elements. If you make changes at indices (0-based) (0,0), (1,3), (2,6), (3,1), (4,4), (5,7), (6,2), (7,5), (8,8), you end up covering all rows, cols and blocks. So, make the required changes to those indices => problem solved. Code/* Problem from CodeForces! # Tags: [] Link: */ /* Written by: Aryan V S Date: Sunday 2020-04-12 */ #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; #define all(x) x.begin (), x.end () #define rall(x) x.rbegin (), x.rend () vector Sudoku (9, string (9, '0')); int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.precision(10); cout << fixed;// << boolalpha; int T; cin >> T; while (T--) { for (int i = 0; i < 9; ++i) cin >> Sudoku [i]; int x = 0, y = 3, z = 6; for (int i = 0; i < 9; i += 3) { Sudoku [i][x] = (Sudoku [i][x] == '1' ? '2' : '1'); Sudoku [i + 1][y] = (Sudoku [i + 1][y] == '1' ? '2' : '1'); Sudoku [i + 2][z] = (Sudoku [i + 2][z] == '1' ? '2' : '1'); cout << Sudoku [i] << '\n' << Sudoku [i + 1] << '\n' << Sudoku [i + 2] << '\n'; ++x; ++y; ++z; } } return 0; } 
•  » » » 5 months ago, # ^ |   0 I did the same xD  mat[0][0]=max((mat[0][0]+1)%9,1); mat[1][3]=max((mat[1][3]+1)%9,1); mat[2][6]=max((mat[2][6]+1)%9,1); mat[3][1]=max((mat[3][1]+1)%9,1); mat[4][4]=max((mat[4][4]+1)%9,1); mat[5][7]=max((mat[5][7]+1)%9,1); mat[6][2]=max((mat[6][2]+1)%9,1); mat[7][5]=max((mat[7][5]+1)%9,1); mat[8][8]=max((mat[8][8]+1)%9,1); 
•  » » » » 5 months ago, # ^ |   0 Shhh, don't post anything remotely related to the word "same" :p They'll think we cheated
•  » » » » » 5 months ago, # ^ |   0 lol should I delete it?
•  » » » » » » 5 months ago, # ^ |   0 Nah, hehe. It's cool. Now, it'll look like: Yeah, they cheated, but if they're talking about it openly, they might not have....Jokes apart, I'm just having fun. GL for future rounds
•  » » 5 months ago, # ^ |   0 a[1][1] = a[2][1], a[2][4] = a[1][4], a[3][7] = a[2][7], a[4][2] = a[3][2], a[5][5] = a[4][5], a[6][8] = a[5][8], a[7][3] = a[8][3], a[8][6] = a[7][6], a[9][9] = a[8][9] This was my idea. Later, got that replacing all 2's with 1's was good enough.
 » 5 months ago, # |   +92 Funny way to solve F without detecting cycles: notice that if two robots get to the same cell, then they will always move to the same cell from then on. This means that we can find for each cell where the robot starting in that cell will be after some $2^{22}$ moves using binary lifting.
•  » » 5 months ago, # ^ |   +37 This is author's solution :)
•  » » » 5 months ago, # ^ |   0 Hi, this is my first contest. Can you please share the link to the author's solutions? I am not able to locate it. Thank you!.
•  » » » » 5 months ago, # ^ |   +23 I'll post them with the editorial. Please, be patient.
•  » » » » » 5 months ago, # ^ |   -42 The contest was not at all balanced, I must say. Even you can see the rating of people and compare the no. of questions they solved. Starting 4 questions were not of much use as almost half of the contestant solved the first 4. Also, question D looked like it was meant for April Fool's 202 but was posted by mistake?
•  » » » » » » 5 months ago, # ^ |   +34 Why do you posting this from fake account? :)
•  » » » » » » » 5 months ago, # ^ | ← Rev. 2 →   -21 You ignored my comment... What am I saying wrong according to you? You should accept the mistakes. :)
•  » » » » » » » » 5 months ago, # ^ |   +21 Which mistakes? Prediction mistakes? Maybe, I need to clean my magic ball to see the future better.The only (and very doubtful) "mistake" here is the "gap" in $5400$ accepted solutions among official participants (which means that E1 was solved by 1/4 of people who solved D). This is not a big gap.I could show you examples of really big gaps but I don't think I need to prove you something anymore. If you don't realize that this prediction with difficulties is good enough, I have nothing to say to you.And, if you post your opinion from fake account, it seems like you don't want to anybody know who are you actually :)
•  » » » » » » » » » 5 months ago, # ^ |   -8 The last point is quite obvious.. :) I just wanted to say that these weekly contests are supposed to test our algorithmic (and not puzzles) skills. Thank you for replying..
•  » » » » » » » » » 5 months ago, # ^ |   +2 Yeah, you are right. As far as I remember all the Div.3s I have given were perfectly balanced and excellent problemsets and all of them were made by you:)
•  » » » » » » » » » 5 months ago, # ^ |   +11 Well, I disagree with you :) Most times there are some mistakes that you couldn't notice, but this time the contest went fine. There also were some minor mistakes but not as fatal as usual. This is the rare case when almost everything is fine and I'm glad to see that.
•  » » » » » » » » » 5 months ago, # ^ |   +4 Thank you for the round! No queue, no weak pretests.I found problem E2 very interesting and problem D a bit hard for me but interesting too.Please make more div 3 contests, we really appreciate you :)
•  » » » 5 months ago, # ^ |   0 That's actually a really cool approach. Have you also tested a cycle-based solution? I am trying to implement a fairly straightforward search and it keeps running out of memory.Looking at 32 pages of MLE results in Status, I think the memory limits for E and F could have been a little bit higher.
•  » » » » 5 months ago, # ^ |   +3 The approach with extracting cycles and doing some dp is much harder to implement, so I didn't even tried to do that. I could but didn't do this.
•  » » » » » 5 months ago, # ^ |   +9 I ended up flipping the dimensions if N > M, and surprisingly this helped (76628096). According to the test results, it uses up 254.5 out of 256 MB, lol.
•  » » » » » » 5 months ago, # ^ |   +3 Well, I'm sorry to hear that. I really thought to increase memory limit, but my solution uses ~200MB (the two-dimensional vector of size $nm \log nm$) so I thought that the 50MB will be enough (because this is the only array which should have such size).
•  » » » » » » » 5 months ago, # ^ | ← Rev. 2 →   0 Hello ; can you please explain me why does N*M*M solutions pass for problem E2 ?tourist has written a code with that time complexity ; here is his submission — https://codeforces.com/contest/1335/submission/76520445And I am not able to understand how does that happen ; curiously ; I even did try to check the test cases ; and I see test case 9 which should break such solutions.So clearly ; I am not understanding something ; can you please help me with this.Thanks !
•  » » » » » » » » 5 months ago, # ^ |   +14 The solution of tourist has the complexity $O(nk)$ where $k$ is the size of the alphabet. If you take a look at the two outer cycles, you can notice that they just iterate over all characters of the string and this sum is obviously $n$.Maybe, when I post the editorial, it will be more obvious to understand why this is $O(nk)$. Just be patient.
•  » » » » » » » » » 5 months ago, # ^ |   0 Oh ; I see ; I apologize for being a bit impatient ; and I thank u for the reply.I understand the complexity analysis of that solution now ; Thanks !
•  » » » » » » » 5 months ago, # ^ |   +1 vovuh please look at my submission for E2 this it got MLE 252700 KB but now I am submitting it got accepted this with 252800 KB (more space than previos)... :'( and because of that I was not able to submit E1 also during contest...very sad!!! :'(
•  » » 5 months ago, # ^ |   +12 Thanks for teaching me something. I learned binary lifting for RMQ/LCA but didn't consider reusing the table for k-th ancestor queries.
 » 5 months ago, # |   +4 I got E 5 min late -_-Nice round!
 » 5 months ago, # |   0 help me please which problem i have with this code on problem B? https://codeforces.com/contest/1335/submission/76592383
•  » » 5 months ago, # ^ |   0 your code is giving wrong output in this test case :- 1 10 10 10your output contain only 9 distinct character but reuqired distinct characters is 10
•  » » 5 months ago, # ^ |   0 Idea is wrong..... My idea(1) Construct a string of length B with all distinct characters.(2) Construct a string of length A — B with character same as last distinct character in String (1).(3) Concatenate the String (1) and (2).(4) Print String (3) (which has length A) N / A times.(5) Print the remaining length (N % A) with appropriate characters from String (3). Code/* Problem from CodeForces! # Tags: [] Link: */ /* Written by: Aryan V S Date: Sunday 2020-04-12 */ #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; #define all(x) x.begin (), x.end () #define rall(x) x.rbegin (), x.rend () int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.precision(10); cout << fixed;// << boolalpha; int T; cin >> T; while (T--) { int N, A, B; cin >> N >> A >> B; string S, P (A, '0'); for (int i = 0; i < B; ++i) P [i] = i + 'a'; for (int i = B; i < A; ++i) P [i] = B + 'a' - 1; int i = 0; for (; i + A < N; i += A) S += P; for (; i < N; ++i) S += P [i % A]; cout << S << '\n'; } return 0; } 
•  » » 5 months ago, # ^ |   0 You have taken 'g' twice in your array
 » 5 months ago, # |   0 How to solve E?
 » 5 months ago, # | ← Rev. 2 →   +3 How to think fast like tourist... :(When he was solving each question in about 1 minute, I was drawing on mspaint.exe and looking for the solution :)
•  » » 5 months ago, # ^ |   +1 practise,practise and practise .smartwork +hardwork
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 In normal practice I could solve A and B with 1000 difficulty in less than 2 hours. :/Probably my brain crashed because of taking too much practices on last night lol...
•  » » » » 5 months ago, # ^ |   0 they are doing coding for many years now , if you continue doing this you will be master in upcoming years
•  » » » » 5 months ago, # ^ |   0 Do you know this website? https://vjudge.net/ I think is a good sit for practice. There are all kinds of projects to practice on.
•  » » 5 months ago, # ^ |   +5 Well pen-paper seems more reasonable for me
•  » » » 5 months ago, # ^ | ← Rev. 2 →   +3 I have my own drawing pad & stylus pen so I don't wanna waste them too haha.
 » 5 months ago, # |   +8 the best contest ever for me
 » 5 months ago, # |   0 Problem DCan somebody please help me in finding out the problem of this submission. Apparently, the inputs are not being properly taken, instead some absurd garbage values are being shown. I was stuck with this for the last 40 minutes of the contest and still could not figure it out.
•  » » 5 months ago, # ^ |   0 You declared the array as integer, hence it will read whole row at once (not character by character as it is supposed to be).
•  » » 5 months ago, # ^ |   0 Input is not n*n integers, it is n strings in n lines.
•  » » 5 months ago, # ^ |   0 You can't take the input as int sudoku[10][10]. Make it char sudoku[10][10] and change your code accordingly.
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 That memset tho...
•  » » 5 months ago, # ^ |   0 cin >> sudoku[i][j]; this takes takes whole row as input. Not a single integer
 » 5 months ago, # |   +1 https://codeforces.com/contest/1335/submission/76590246https://codeforces.com/contest/1335/submission/76509810both solutions are identical and the person who submitted it from different accounts, intentionally did so to hack (and get points if hacking gets you extra points, not sure tho) !
•  » » 5 months ago, # ^ |   0 Maybe that's the reason why he's still gray.
•  » » 5 months ago, # ^ |   +1 Successful Hacks don't change anything except the victim will lose a problem solvedHacks with this method are......meaningless, honestly
 » 5 months ago, # |   -48 people making such D should be banned from making future contests
•  » » 5 months ago, # ^ |   +1 Can you ban MikeMirzayanov?
•  » » 5 months ago, # ^ |   +11 People making such comments should be banned from making future comments
•  » » 5 months ago, # ^ |   0 I did read the "you can change any..." as "you can swap any numbers in the grid". Still have no solution for that problem.
•  » » » 5 months ago, # ^ |   0 you can see my solution i also thought the same
•  » » » » 5 months ago, # ^ |   +1
•  » » 5 months ago, # ^ |   0 Can you please make some better to and provide them to problem setters so that the people who works so hard for making this problem can take some rest.
•  » » » 5 months ago, # ^ |   0 Haha , why should i do that. I only want to solve problems not make them. But if some problem is bad and i say that it's bad dosen't mean i need to make problems.
•  » » » » 5 months ago, # ^ |   0 Here is a Chinese proverb for you：“你行你上啊”. no can no BB!
•  » » 5 months ago, # ^ |   0 It's your problem...
 » 5 months ago, # | ← Rev. 2 →   0 ~~~~~ How is the answer for 6 1 5 1 1 1 1 5? Test case 2 E 2! According to me it should be 6!
•  » » 5 months ago, # ^ |   +1 1st and 3rd part must have the same length x
•  » » 5 months ago, # ^ |   +1 1 1 1 1 1 is the longest palindrome. What is your 6 length palindrome?
•  » » » 5 months ago, # ^ |   0 Damn! I missed x==x :/
•  » » » » 5 months ago, # ^ |   0 I was also stuck at this point for half an hour
•  » » 5 months ago, # ^ |   +2 Number of a's on both sides of b's has to be equal as per the problem.
•  » » 5 months ago, # ^ |   0 It should be 5. The longest 3 block palindrome here is 11111
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 1 1 1 1 1 is the answer and here both x=0,y=5,x=0basically every answer should be a palindrome with max 2 types of elements, and the 2nd type of element should be sandwiched b/w 1st type of elements , hope it gives you a little idea ! PS: thanks ashkANOn for pointing out the mistake.
•  » » » 5 months ago, # ^ |   +1 For 1 1 1 1 1 x=0,y=5,x=0 i think
•  » » 5 months ago, # ^ |   0 remember that the 3 palindrome should be of form x y x. the length of first x and second x is the same
 » 5 months ago, # |   0 It's really bad for me. 1335B - Construct the String said that " to construct a string s of length n consisting of lowercase Latin letters such that each substring of length a has exactly b distinct letters. " e.g. For test case: n, a, b are 22 17 12 my code output: abcdefghijgkkkkkkabcdeis it wrong?
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 My construction is:abcdefghijkllllllabcde
•  » » » 5 months ago, # ^ |   0 Oh, it's a really silly mistake. Thanks for helping
•  » » 5 months ago, # ^ |   0 The first substring "abcdefghijgkkkkka" has only 11 distinct characters.
•  » » 5 months ago, # ^ |   0 Yes it is wrong for the prefix of size 17. I think you are trying to print this "abcdefghijkllllllabcde".
 » 5 months ago, # |   0 Can someone show me your solution to C?My solotion is to binary-search the answer and check whether it is legal.But my solution runs nearly 900ms.Is there some easier and faster solutions?
•  » » 5 months ago, # ^ | ← Rev. 2 →   0 Here. Mine runs in 61ms. Idea could be figured from the code but hit me up in PM or here if you need help understanding something. Code/* Problem from CodeForces! # Tags: [] Link: */ /* Written by: Aryan V S Date: Sunday 2020-04-12 */ #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; #define all(x) x.begin (), x.end () #define rall(x) x.rbegin (), x.rend () int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cout.precision(10); cout << fixed;// << boolalpha; int T; cin >> T; while (T--) { int N, Same = 0; cin >> N; unordered_map M; vector A (N); for (int i = 0; i < N; ++i) { cin >> A [i]; ++M [A [i]]; Same = max(Same, M [A [i]]); } int Distinct = M.size() - 1; if (Same > Distinct && Same - Distinct > 1) cout << Distinct + 1; else if (Same > Distinct) cout << Distinct; else cout << Same; cout << '\n'; } return 0; } 
•  » » » 5 months ago, # ^ |   0 Can you please briefly explain your solution?I have a little difficulty in understanding it....
•  » » » » 5 months ago, # ^ |   0 Sure.I map every skill to the number of times it appears in the input. I do this because I'd like to find the skill value which is present in max number of people. This is what the variable Same holds. The size of the map will give the total number of different skill levels. However, one of the skill levels must be used to compose the team with same skill levels. So, the number of distinct skills are Map.size() — 1. And then it's a matter of evaluating which team size is maximal.
•  » » » » » 5 months ago, # ^ | ← Rev. 2 →   0 Btw, the only check you need to do is whether the biggest count equals the size of the map or if it is greater. If they’re equal, return min(biggest count, map size — 1). If not, return the min(biggest count, map size)
•  » » » » » 5 months ago, # ^ |   0 Thanks bro!I have understood your solution and finished the problem in 62 ms.
•  » » » » 5 months ago, # ^ |   0 I can explain mine if you want to :) SolutionThere is a greedy aproach to this. We want to maximize the number of people in both teams. So we want to check the maximum number of students with the same skill (let's name it max_same) and also the skill (let's name it num). After that, we want to check the maximum number of students with different skills, different than num (there is the risk to put the same student in 2 groups). Both of these can be done with a simple sort on the initial vector and a linear scan. Now, if the absolute difference between the number of students between the 2 groups is at least 2, then we can transfer one student from the second group that we didn't take previously to the first to maximize the number of different skills. The answer is the minimum between the number of students between the 2 groups.Code: 76607507
•  » » » » » 5 months ago, # ^ |   +1 Thank you, but I have finished the problem in 62 ms(^v^)
•  » » » » » » 5 months ago, # ^ |   0 76583554 Can you please tell me why my answer is wrong in the second testcase. I have used the same logic as you. Please help.
•  » » » » » 5 months ago, # ^ |   0 Can you please tell me why my answer is wrong in the second testcase. I have used the same logic as you. Please help.76583554
 » 5 months ago, # | ← Rev. 3 →   -21 Hi, can I be unrated for Codeforces Round #634 (Div. 3). Reason is with Problem D with Java. I submitted the code https://codeforces.com/contest/1335/submission/76566765 during the contest without PrintWriter but TLE'd on test case 2, although my solution is O(81*10^4) which should be under the time limit. After the contest I submitted the exact same code with PrintWriter https://codeforces.com/contest/1335/submission/76614841 and got AC. @vovuh vovuh
 » 5 months ago, # |   +18 Best contest ever for div 3. Thank you god vovuh very much and hope everyone can become expert !
 » 5 months ago, # |   +10 I didn't read D correctly and thought you needed to keep the "sudoku structure" ( just swap numbers around, no replacing ), so I came up with a backtracking solution and I just kept wondering how was it a div3D and how did so many people manage to solve it lol.
 » 5 months ago, # |   +3 Strong Pretests and Intersting Problems, Fast Test and Good Network.Thanks to vovuh & MikeMirzayanov
 » 5 months ago, # |   -19 Plz change your time of contests in india.
 » 5 months ago, # |   0 What is the intended complexity for E2?
•  » » 5 months ago, # ^ |   0 O($N$ * $200$)
•  » » » 5 months ago, # ^ |   +3 The complexity of your code is O(N*200*200). Many other solutions with this complexity have passed. I think the best we can do O(200*N*log(N))?
•  » » » » 5 months ago, # ^ |   +3 I believe my code is O(200N):https://codeforces.com/contest/1335/submission/76611393
•  » » » » 5 months ago, # ^ |   0 See my reply below. It can be done in O(N*200)
•  » » 5 months ago, # ^ |   0 O(200*200*nlogn)
•  » » » 5 months ago, # ^ |   0 Not for E2
•  » » » 5 months ago, # ^ |   +5 I can be done in O(N*200) analyzing from the "center" for each distinct value. Centers for value V means two distinct pointers (a, b) where the amount of V before a is the same as the amount if V after b. Then keep jumping a backward and b forward, both at the same time, but the jump is actually to the previous/next V value. While you do this, count the frequency of values in the middle of a and b, and keep the one with maximum occurrences, and add that to (amount of V before a)*2 keeping maximum for each time you move the pointers. This is linear for each value V
•  » » » » 5 months ago, # ^ |   +3 Nice solution!, initially I had thought of this method, but I tried to move the pointers closer instead of farther and it led to some complications in maintaining the maximum
•  » » » » 5 months ago, # ^ |   0 Ah! I realise now that what I did was itself O(200*N). I did the complexity analysis wrong. Thanks!
 » 5 months ago, # |   +4 Where can I report this self-hack? https://codeforces.com/contest/1335/submission/76616926
•  » » 5 months ago, # ^ |   0 And then there's this one: https://codeforces.com/contest/1335/submission/76618522
•  » » » 5 months ago, # ^ |   0 And then this guy is hacking his own solutions by deliberately putting wrong tests: https://codeforces.com/contest/1335/submission/76620243
•  » » 5 months ago, # ^ |   0
•  » » 5 months ago, # ^ |   0 no need to report.There's no prize for such successful hacksAlso there's no Best Hacker Rank in div.3, only in Educational Rounds.
 » 5 months ago, # |   +17 In F,Why did you keep 1 as white and 0 as black ?If your intention was to delay submission time by 2 minutes, congrats :D
 » 5 months ago, # |   0 Could you please help me understand why my code for Problem C doesn't work? It seems pretty straightforward and I have seen other solve it my way, however my code fails on test 4. I have no idea why. Here is my submission.
•  » » 5 months ago, # ^ |   +1 I don't understand your code, but it seems to fail on the case "1 1 1 1 1 1 1...". The answer should be taking the whole array (n)
•  » » » 5 months ago, # ^ |   0 My code fails on case 4, do you mean when all the numbers are the same? In this case the answer is 1. How my code works: 1. Counts all the different numbers 2. Finds the biggest amount of repeating numbers. 3. Takes the smallest of the two (+- 1) 'difs' — different numbers 'maxN' — biggest amount of repeating numbers 'curN' — current amount of repeating numbers
•  » » 5 months ago, # ^ |   +1 Don't compare two Integer(object type) using ==. It compares reference not value.
•  » » » 5 months ago, # ^ |   +1 Thank yo soo much for your help. I used the intValue() method when comparing and my code is now working. Thank you so much for your help. Here is the working version.
 » 5 months ago, # |   +2 I am getting automatically logged out when i press submit button for the first time in a contest.This is happening regularly with me from past 5 to 6 contests. I am still a specialist and those extra 15-20 seconds don't matter to me right now, but this might be a bug in the server that may need a correction. Please have a look MikeMirzayanov. Thanks!
•  » » 5 months ago, # ^ |   0 Maybe your cookies are not working.
•  » » » 5 months ago, # ^ | ← Rev. 2 →   0 but,this is not happening with me on other coding platforms! If it were cookies problem, then it would have occured every time i hit submit, or at other platforms too! It does not happen on the light codeforces website even!
•  » » 5 months ago, # ^ |   +1 I have faced the same issue when clicking from the problem itself instead of going to the submit code tab
•  » » 5 months ago, # ^ |   +1 I'm also facing some problem while submitting my first solution of previous 2-3 contests. I get some html 403 forbidden error with some token value!
 » 5 months ago, # |   0 In E1 test 2 set 107 is "4 1 4 1" and the expected answer is 4?Am I missing something?
•  » » 5 months ago, # ^ |   +1 I think that the counter in the evaluator that displays the WA test number is off by 1
•  » » » 5 months ago, # ^ |   0 No, I'm pretty sure that's the line. I made a submission that outputs -1 at 107th item, and it gets caught as -1.https://codeforces.com/contest/1335/submission/76621065 wrong answer 107th numbers differ — expected: '4', found: '-1'Then I submitted an app that prints only the 107th line's input. And it is "4 1 4 1".https://codeforces.com/contest/1335/submission/76621266It can't be 4.
•  » » » » 5 months ago, # ^ |   0 It prints all the inputs starting from the first; 4 1 4 1 is actually the first test case.
•  » » » » 5 months ago, # ^ |   +1 On 107th iteration you are taking input for 1st time. It is taking 1st case as input not 107th case.
•  » » » » » 5 months ago, # ^ |   0 My bad, thanks. It's actually 1 1 1 4 1.
•  » » 5 months ago, # ^ |   0 Is that input visible from the test case?
 » 5 months ago, # |   0 Why are some of the submissions containing this part?if (t == 'something') cout << "OK" << endl;Does it give any benefit?
•  » » 5 months ago, # ^ |   +2 They do that so they can get easy hacks from another account
•  » » » 5 months ago, # ^ |