Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

By zscoder, 4 years ago,

Hi all!

On May 13, 12:35 MSK, Tinkoff Challenge — Final Round will be held. Standings of the official finalists are availiable here.

The authors of the round are me (zscoder, Zi Song Yeoh), AnonymousBunny (Sreejato Kishor Bhattacharya), hloya_ygrt (Yury Shilyaev).

Special thanks to KAN (Nikolay Kalinin) for coordinating the round, winger (Vladislav Isenbaev) and AlexFetisov (Alex Fetisov) for testing the problems. Also, thanks to MikeMirzayanov (Mike Mirzayanov) for the Codeforces and Polygon system.

There are seven problems and the duration is two hours. Scoring will be announced before the round.

Top 20 participants of the Elimination Round will compete in the Tinkoff Office.

The round is rated. Division 1 and Division 2 will have the same problemset with seven problems.

We hope everyone will find interesting problems and get high rating!

UPD : Scoring Distribution : 500 — 1000 — 1750 — 2000 — 2500 — 2750 — 3500

UPD2 : The editorial is out!

UPD3 : Congratulations to the top 10 :

• +404

 » 4 years ago, # |   +24 Is everyone allowed to participate in this round, besides not having participated in the previous round?
•  » » 4 years ago, # ^ | ← Rev. 2 →   +58 Yes, you can treat it as a normal Div. 1 + Div. 2 round.
•  » » » 4 years ago, # ^ |   +14 Please update the title in the contest tab including that it is a Div 1 + Div 2 rated combined round.
 » 4 years ago, # |   +6 Isn't timing unusual from normal codeforce rounds ? .... Do not want to miss it but have semester exam :(
•  » » 4 years ago, # ^ |   +20 probably the onsite contest will be held at the same time.
•  » » 4 years ago, # ^ |   +1 Try to do the paper in 1 hour :P
•  » » » 4 years ago, # ^ |   +1 did :p
 » 4 years ago, # | ← Rev. 2 →   -88 :|
•  » » 4 years ago, # ^ |   +149 Spoiler
 » 4 years ago, # | ← Rev. 2 →   -32 Thank you)
•  » » 4 years ago, # ^ |   +33 Like someone said it's probably held at the same time as the on-site contest, and different countries hold APIO at different times so it's hard to avoid anyway.
 » 4 years ago, # |   +41 zscoder Congratulations for becoming red :D I remember last time you prepared a round you was purple
 » 4 years ago, # |   +11 Auto comment: topic has been updated by zscoder (previous revision, new revision, compare).
 » 4 years ago, # |   +4 Are the finalists gonna be in one room?
•  » » 4 years ago, # ^ |   +10 Yes
•  » » » 4 years ago, # ^ |   +44 You are talking about the codeforces room, in which people can hack each other, right? :)
•  » » » » 4 years ago, # ^ |   +22 Yes
•  » » » » » 4 years ago, # ^ |   -6 And will finalists see the standings of the round, or only each other?
•  » » » » » » 4 years ago, # ^ |   -36 Yes for the third time :D
•  » » » » » » 4 years ago, # ^ |   0 Are you a finalist?
•  » » » » » » » 4 years ago, # ^ | ← Rev. 2 →   +6 No, I'm just curious, lolP.S. You can switch to russian version to see finalists's list
 » 4 years ago, # |   0 Just come on!
 » 4 years ago, # |   0 ..
 » 4 years ago, # |   0 I have an exam, but I'll participate :"D
•  » » 4 years ago, # ^ | ← Rev. 2 →   +12 You truly are living on the edge! I wish I could be as bold as you...
 » 4 years ago, # |   -31 Hopefully,there could be data structures related problems in this challenge......
 » 4 years ago, # |   +10 hopefully there will be short statements !!!
 » 4 years ago, # | ← Rev. 2 →   +5 zscoder is this the round you mentioned here ?
•  » » 4 years ago, # ^ |   +18 Yes :)
 » 4 years ago, # |   0
 » 4 years ago, # |   0 Hope there won't be delay before the contest.
 » 4 years ago, # |   -32 Is the round rated?
 » 4 years ago, # | ← Rev. 3 →   -9 Some people were hoping if they would participate in a round held by tourist they would become so strong competitive programmers as tourist do. So, maybe that round can teach us how to handle serious business
 » 4 years ago, # |   -24 1 hour delaying would be better...
 » 4 years ago, # |   0 Hot Day and cool codeforces!
 » 4 years ago, # |   0 Better Time of contest for us.
 » 4 years ago, # |   +4 I predict there will be a question on permutations.
•  » » 4 years ago, # ^ |   +7 i predict there will atleast be a question on dp.
•  » » 4 years ago, # ^ | ← Rev. 2 →   +37 I predict D will be a Graph problem as the two previous contests that made by zscoder !
•  » » » 4 years ago, # ^ |   +5 Your predict is correct !!!
•  » » 4 years ago, # ^ |   +6 I predict that problem A will be easy
•  » » » 4 years ago, # ^ |   -8 I predict Problem E will be tough
 » 4 years ago, # | ← Rev. 2 →   +1 I predict that problem C will be easier than previous contest.
 » 4 years ago, # |   0 I predict that problem B will be easy.
 » 4 years ago, # |   +3 I'm esemoooooo.
•  » » 4 years ago, # ^ |   0 Hi, esmoooooo.
 » 4 years ago, # |   +102 I just spotted this lucky cheater sepanta I hope that Mike will take care of him.
•  » » 4 years ago, # ^ |   +9 yeah i saw too -_- i didnt know someone already posted it or i would not have posted it....
•  » » 4 years ago, # ^ |   +30 And sepanta is blue now :|
•  » » » 4 years ago, # ^ | ← Rev. 2 →   -15 I think he wants to avenge for his comments xD
 » 4 years ago, # |   +17 31 hacks on the same one!! What a cheater!!
•  » » 4 years ago, # ^ |   +7 He is too lucky to enter the same room with his another fake account !
•  » » 4 years ago, # ^ |   +3
 » 4 years ago, # |   +6 my solution for problem C is showing "running test case 5" for the past 10mins.
•  » » 4 years ago, # ^ |   0 i got it now
•  » » 4 years ago, # ^ |   +1 I glare on the statement. It looks so easy. Then I see success ratio. It is about 1./2. What a nice confusing problem!
 » 4 years ago, # |   0 I am waiting for explanation why it was not possible just to get Problem C AC at the first attempt.
•  » » 4 years ago, # ^ | ← Rev. 4 →   +8 456123answer?
•  » » » 4 years ago, # ^ |   +8 162
•  » » » » 4 years ago, # ^ |   +1 first guy moves first
•  » » » » » 4 years ago, # ^ |   0 Just greedy strategy. 615
•  » » » » » » 4 years ago, # ^ |   0 Wow! Only NOW I understood the statement. Excuse me. I was careless. I thought Oleg always has nice set of letters.
•  » » » » » 4 years ago, # ^ |   0 Is it 435?
•  » » » » » » 4 years ago, # ^ | ← Rev. 3 →   -16 ohh.. unclear
•  » » » » » » » 4 years ago, # ^ |   0 Thank you very much!
•  » » » » » » » 4 years ago, # ^ |   +3 Nope, you're wrong. If the first guy plays 4 in the middle, then the second guy will play 3 at the last to get the longest lexicographic string. If that happens then first player has no choice but to play 5 which is clearly not the best case. Best case is 435.
•  » » » » » » » » 4 years ago, # ^ |   0 I agree with you, and then write it in this way, but i get a WA.
•  » » » 4 years ago, # ^ |   +14 It's 435
•  » » » 4 years ago, # ^ | ← Rev. 4 →   0 435
•  » » » 4 years ago, # ^ | ← Rev. 3 →   +3 Basically there will be 3 numbers in the string, so first player will use 4 and 5, and second player will use 3. First player wants to minimize the result, so he will obviously put the 4 before the 5. Since it is better for him to have the 3 put in the front, and since the other player is going to put it at the end because 4 > 3 and 5 > 3, he puts 5 in the last spot. Then the second player puts the 3 in the middle spot, and the 4 goes in the last remaining spot, at the beginning.Therefore, answer is 435, according to me.
•  » » » » 4 years ago, # ^ |   0 Isn't the output for testcase bcdef abbbc be bccbd ?
•  » » » » » 4 years ago, # ^ |   +1 My code (which got Accepted) says bccdb.
•  » » » » » » 4 years ago, # ^ |   +3 how ? how much i got is first oleg will place b at first position then igor will place c at 2nd position . now, oleg can place d at last position , now igor will place b at fourth position and then oleg will place c at 3. so the resultant will be bccbd ?
•  » » » » » » » 4 years ago, # ^ |   +3 sry got it my bad :(
 » 4 years ago, # | ← Rev. 2 →   +4 How to solve B?P.S. I feel like either A or B is getting harder than C nowadays. Last contest, I solved C easily, but unable to solve A. Today, I solved C (not so easily), but don't have any idea at all to solve B. It feels just weird...
•  » » 4 years ago, # ^ |   0 B was easier if you looked for which height should you cut, in order to find a triangle of area i/max_area
•  » » 4 years ago, # ^ |   +6 binary search, but I'm sure there is some equation to solve it in linear time
•  » » » 4 years ago, # ^ |   0 Binary search the height? But how to compute the area of such heights? Since we don't know the length of base of some heights
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   +3 In similar triangles, we have that the ratio of base/height has to be the same, so you can find the base for a height doing, heightX/heightB, where heightX is the height that you wanna know the base, and heightB is the full base height(the value of the height of the complete triangle).
•  » » » » 4 years ago, # ^ |   0 suppose that b1 is the base with height h1, b = 1b1 / b = h1 / h
•  » » » 4 years ago, # ^ |   +3 starting from apex if we join the pieces we get a isosceles triangle . then we get relation of base and height using tan(apex angle) Finally we get height of ith cut hi = sqrt(i/n)*h
•  » » » » 4 years ago, # ^ |   0 So much geometrical insights... Thanks
•  » » » 4 years ago, # ^ | ← Rev. 2 →   0 double S = h / 2; double s = S / n; for (int k = 1; k <= n - 1; k++) cout << << sqrt(2 * k * s * h) << ' '; 
•  » » 4 years ago, # ^ |   +14 I guess B is a pure mathematical problem. The k-th answer (indexed from 1) should be sqrt(k/n) * h.
•  » » » 4 years ago, # ^ |   +9 I feel stupid using trapezium formula now...
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 I am finding area of each part and setting difference between area(x[i-1) and area(x[i]) to that number. Used Decimal precision 50. Hope is would be enough...  n, h=map(int, input (). split ()) from decimal import * k=Decimal (1000000) h=h*k from math import sqrt getcontext().prec=50 C=Decimal (1)/Decimal (h) Tot=Decimal(Decimal(h)/Decimal (2) ) Part=Decimal(Tot/Decimal(n)) x1 =Decimal (sqrt(Decimal (2)*Decimal (Part)/C)) for i in range (0,n-1): curAr=Decimal(Part*(i+1)) curX=Decimal (sqrt(Decimal (2)*Decimal(curAr) /C) ) print (curX/k) 
•  » » » 4 years ago, # ^ |   0 How to determine how long would my program with prec=X run on that servers for any X?
•  » » 4 years ago, # ^ |   0 O(1) solution using some geometry properties.
•  » » » 4 years ago, # ^ |   +5 You can determine a single height in O(1), but the total complexity will be O(n)
•  » » » » 4 years ago, # ^ |   0 Yeah sure I meant the single height ,ofCourse it's O(n) overall.
•  » » 4 years ago, # ^ |   0 I think B was very easy math. You got lucky to solve C on first attempt, because it was little tricky — check the successful ratio — 659/1914. Anyway, nice problems, hope you agree.
•  » » 4 years ago, # ^ |   0 You can compute Tan (a) =h/0.5, and then x*x*tan (a) =i*area., where I represents the first I triangle, and X is half the base of each triangle.
 » 4 years ago, # |   +13 How to do F? I hope expected solution is not
•  » » 4 years ago, # ^ |   +8 I had N^1.5*10, didn't passed 16'th test. But I hope it can be optimized in the way to pass.
•  » » » 4 years ago, # ^ | ← Rev. 3 →   0 I think NlogN*10 should pass. Just hold the information for lazy propagation as a permutation: all digits i became P[i]. Unfortunately, somehow, in an hour I've got 15 WAs, TLEs and runtime errors. However, it makes sense to work, it's just that I had a lot of bugs. You can propagate something like P[son][i] becomes P[node][P[son][i]]LE: of course it got AC immediatly after the contest
•  » » » » 4 years ago, # ^ |   0 Implementation is rekt
•  » » » » » 4 years ago, # ^ |   0 Neah, it was easy. I don't know what happened to me. I used to have 0 bugs till a week ago and now every source that I code has the stupidest bugs ever. I had the right idea just after half of the submission I made: initially I though that it's enough to hold all relevant moves on some node and then traverse them and push them to the sons, as I thought there are at most 10 relevant moves (through relevant I mean they change something). Ohh, and of course I spent about 10 minutes to find out that there could be operations that change digit x in x... I think this should've been mentioned. Anyway, the problems were nice but I hurried a lot and wasn't careful because I had a lot of WAs (even on C, I still have no idea what I'm doing wrong as I have a complete proof of my solution, even though I think I overcomplicated the problem)
•  » » » » » 4 years ago, # ^ |   0 That was a joke
•  » » » » 4 years ago, # ^ |   0 Damn, my solution passes if I switch to size of block exactly sqrt(N) and submit on MS C++ instead of GNU. Such a pain.
 » 4 years ago, # |   +8 Can someone please explain C?
•  » » 4 years ago, # ^ |   0 xyz abc => answer is xcy
•  » » » 4 years ago, # ^ |   +7 Yeah I came up with a few cases in contest but couldn't figure out a way to make it consistent, could you elaborate?
•  » » » » 4 years ago, # ^ |   +7 The first guy will use only (n+1)/2 characters and second one will use n/2. So keep optimal character set for both of them. Now,Think about four cases: In his turn,1. Player 1, has bad set, what should he do?2. Player 1, has good set, what should he do?3. Player 2, has bad set, what should he do?4. Player 2, has good set, what should he do?
•  » » » » » 4 years ago, # ^ |   +1 HintsIf I have good set, I will put my best character at the first. otherwise, I will put my worst character at the last.
•  » » » » » » 4 years ago, # ^ |   0 How do you classify good or bad sets for both players ?
•  » » » » » » » 4 years ago, # ^ |   0 If you are trying to make the string smaller, than, you have a good set if you have at least one character which is smaller than all of your opponents. and The other way is true.
•  » » » » » 4 years ago, # ^ |   0 thanks a lot
•  » » » » » 4 years ago, # ^ |   0 I am really feeling bad on seeing how easily it can be solved !!! I am just too stupid :(
•  » » » » » » 4 years ago, # ^ |   +3 The 1750 points confused me in the first time. Maybe you have a bad day. Better luck next time.
•  » » » 4 years ago, # ^ |   +5 Actually, wxyz abcd is more interesting. Answer is dwcx, while the most naive strategy will output wdxc.
•  » » » 4 years ago, # ^ |   0 It should be xyc,isn't it?
•  » » » » 4 years ago, # ^ |   0 No, it should be xcy as first guy replaces '?' such that new name would be ??y. Second person have to place 'c' in the middle. Thus we can get xcy as optimal answer.
•  » » » » » 4 years ago, # ^ |   0 thank you.
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 So first observation is that you will only use the smallest (n+1)/2 elements of the first string and n/2 largest elemets from the second. If all chars from s1 are smaller then it would be easy, you would simply use a greedy to fill the word putting it at the leftmost position. Now, lets have the case where the elements from the first set are larger than the second. You would want to put your largest chars to the right most position, as that minimizes its penalty. So now in these case, you go from largest to smallest and put them in rightmost position. Same is true for the second player
•  » » » 4 years ago, # ^ |   0 I did something like that, but got WA, could you tell me what's wrong with this code? CodeArrayList o = new ArrayList<>(), i = new ArrayList<>(); char[] in = scan.next().toCharArray(); for(char c : in) o.add(c); in = scan.next().toCharArray(); for(char c : in) i.add(c); int n = in.length; StringBuilder begin = new StringBuilder(); StringBuilder end = new StringBuilder(); Collections.sort(o); Collections.sort(i); for(int j = 0; j < n; j++) { if(j%2==0){ if(o.get(0) < i.get(i.size()-1)) begin.append(o.remove(0)); else end.append(o.remove(0)); } else { if(i.get(i.size()-1) > o.get(0)) begin.append(i.remove(i.size()-1)); else end.append(i.remove(i.size()-1)); } } out.print(begin); out.print(end.reverse()); 
•  » » » » 4 years ago, # ^ |   0 I'm not sure if I understood the code correctly but perhaps its this. So first observation is that you will only use the smallest (n+1)/2 elements of the first string and n/2 largest elemets from the second. So you should never add the last element from a set
•  » » » » » 4 years ago, # ^ | ← Rev. 2 →   0 I should't ever be adding the last element in the set, if it looks that way it is because I sorted the second set and am taking letters from the back
•  » » » » » » 4 years ago, # ^ |   +1 try this caseabcxyzzzzzyxcbaaaaEach turn the string should be- a????????- az???????- azb??????- azby?????- azbyc????- azbyc???c- azbyc??yc- azbyc?xyc- azbycxxyc
•  » » » » » » 4 years ago, # ^ |   0 Ok found the bug, when the letters from the first sit are larger than the second, you should put the largest letters at the back first, and not the smallest at the back
•  » » » » » » » 4 years ago, # ^ | ← Rev. 2 →   0 Oh wow that was stupid, thank you for the help!
•  » » » 4 years ago, # ^ | ← Rev. 3 →   0 I followed this strategy, this didn't work for me on testcase 5reddit abcdefThis strategy gives dfdede but answer is dfdeedCan someone explain why? is answer for (dexy, abde) is also deed ?edit[2] : corrected the starting of the output
•  » » » » 4 years ago, # ^ |   0 how can it give efdeed or efdede when there are only 2 e'sthe answer should befirst person will use letters: dde second will use letters: fed d?????df????dfd???dfde??dfde?edfdede
•  » » » » » 4 years ago, # ^ |   0 My bad, it was dfdede but the answer is dfdeed!, corrected above
•  » » » » » » 4 years ago, # ^ |   0 My bad, each turn should bed?????df????dfd???dfd??ddfd?eddfdeed
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 My solution consisted in the following points : First, you can know which letters will Egor play, because, as he wants to minimize lexographical order, it's not worth playing its «worst» letters, i.e. he only plays his (n+1)/2 lowest letters. Same for Igor, who always plays his n/2 biggest letters. Now, suppose it's Egor playing : his goal will be to minimize the lexicographical order, and thus he wants the lowest letter to be in front. If he has got at least one letter with lower rank than one of Igor's letters, he immediately puts it in front, because it will give him a better score than if Egor plays a largest place instead at the front. However, in the rare case where all his letters are bigger than Igor's one, he wants to play at the back of the string his biggest letter, by a similar argument. Same for Igor : he will play his biggest letter at the front, except when all his letters are lower than Egor's, in which case he will play his lowest letter at the back. Implementation isn't really hard, it's simply important not to forget to use sets to quickly retrieve lowest and biggest letters from each player.
 » 4 years ago, # |   +3 How to solve Problem D?
•  » » 4 years ago, # ^ | ← Rev. 7 →   -13 i think graph should be linear line of compressed cliques and vertices of degree 1 and 2. i.e if deg>2 it should form a clique in combination to other nodes. else -1. but not able to code in time. Edit: i got the mistake. it need not be clique. 
 » 4 years ago, # |   +1 How to solve B ? My geometry is weaker than the weakest's
•  » » 4 years ago, # ^ |   0 B was easier if you looked for which height should you cut, in order to find a triangle of area i/max_area
•  » » 4 years ago, # ^ |   0 start with the topmost triangle....now this triangle is similar with the original one and the area of the two is in the ratio 1/n...from here you'll get two equations from where value of h can be easily determined...infact in doing so you'll come to a generalised formula fro each partition
•  » » 4 years ago, # ^ |   0 After systems test is over for that particular solution I guess.
•  » » » 4 years ago, # ^ |   0 How long is it normally?
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   0 You can see the solutions now
 » 4 years ago, # | ← Rev. 3 →   +11 [Problem D] I needed just 5 more minutes to solve D. Anyway I solved it as follows:1. For each city, add itself to its adjacency list.2. Using hashing, we will use DSU to make clusters of cities with exactly same adjacency.3. Nodes in a cluster will have the same label value.4. For each city, modify its adjacency list by replacing all cities in it by their representative i.e for (int v: g[u]) replace v by rep(v).5. Now if there are more than 2 cities in any adjanceny list, its impossible.6. Do a dfs, and carefully assign values :) I hope this is a correct solution.UPD: Here is the code that I missed by 5 mins.UPD2: It got AC.
 » 4 years ago, # |   0 Can anyone please share the idea to solve problem D?
 » 4 years ago, # |   0 problem C looks complicated any simple solution ?
 » 4 years ago, # |   +8 Very interesting C task :D
 » 4 years ago, # |   +8 Failed to handle cornercases of k={n-3, n-2, n-1} in E on last two minutes of contest having correct ideas, such a pain.....
•  » » 4 years ago, # ^ | ← Rev. 2 →   +5 What is general idea for E?
•  » » » 4 years ago, # ^ |   +8 By picking element from the beginning or from the end of array you simply move its center by 0.5. Thus for fixed array answer is for even length and for odd length.
•  » » » 4 years ago, # ^ | ← Rev. 2 →   +8 Maybe I am wrong (got WA on pretest1) but: if n is even then the answer is max(a[n / 2], a[n / 2 + 1]) if n is odd then the answer is min(max(a[n / 2 - 1], a[n / 2 + 1]), a[n / 2]) and this twist with k is very easy to handle. [edit: to slow]
 » 4 years ago, # |   +8 There's this guy in this contest whose id is sepanta and he hacked 35 times successfully..and most amusing fact is the person he hacked is Mr.Fox and he hacked him 35 times!!! the guy sepanta has solved 2 problems (A and B) and is currently standing on 42 :| what the hell???
•  » » 4 years ago, # ^ |   0 Don't worry, he'll be banned =)
•  » » » 4 years ago, # ^ |   +3 his rating is now 1772 :| got a +397 boost ....
•  » » 4 years ago, # ^ |   0 Give it a time :) It will work out itself
 » 4 years ago, # |   +5 rating: rest in peace
 » 4 years ago, # |   +6 what is the 4th test case of problem C?
•  » » 4 years ago, # ^ |   +1 Probably, it checks how you process the case when min of Oleg equals max of Igor.
•  » » 4 years ago, # ^ | ← Rev. 3 →   +1 try this case abcxyzzzz zyxcbaaaa Each turn the string shouuld be - a???????? - az???????- azb??????- azby?????- azbyc????- azbyc???c- azbyc??yc- azbyc?xyc- azbycxxyc
 » 4 years ago, # |   0 Explain please how can i solve B.
•  » » 4 years ago, # ^ | ← Rev. 3 →   +1 Basically the whole triangle's area is h/2. So, each the n parts' area should be h/2n.So, for every cut i, you should find h(i) so that the resulting triangle has area i*h/2n. Note that if such a triangle has height h(i), that the base has length (h(i)/h). Therefore, you have to solve (h(i)^2) / 2h = i*h/2n, and the answer is sqrt(i/n)*h.
•  » » » 4 years ago, # ^ |   0 "if such a triangle has height h(i), that the base has length (h(i)/h)." - can you please explain me why the base has length (h(i)/h) ?Thanks in advance.
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   0 You can use Thales theorem to prove this, since cuts are parallel to the base.Let b the length of the base you want to compute. Then h(i)/h = b/1.
•  » » » 4 years ago, # ^ |   0 Thanks
•  » » 4 years ago, # ^ |   0 See above .many coders shared their idea!
•  » » » 4 years ago, # ^ |   0 thanks.
•  » » 4 years ago, # ^ |   0 I tryed to binary search de height. I calculated the basis of the triangle using that : h/H = b/B so b =B*h/H . ( sorry the bad presentition ) Then i calculated the Area of the triangle using this basis and the height. ( I couldn't solve B , but i think that was the idea)
 » 4 years ago, # |   +3 Quite fast system test today..
 » 4 years ago, # |   +25 Fastest system testing I have ever seen :O
 » 4 years ago, # |   +3 Ultrafast speed of systest <3
•  » » 4 years ago, # ^ |   0 I hope they follow same speed in posting editorials :)
 » 4 years ago, # |   +10 Amazingly fast system testing
 » 4 years ago, # |   +5 Fastest System Testing ever !!!
 » 4 years ago, # |   0 I have not seen so much fast system test before. Impressive.. :)
 » 4 years ago, # |   0 what's the answer of s = "ddd", t = "aaa" for problem C ?
•  » » 4 years ago, # ^ |   +7 dad
•  » » » 4 years ago, # ^ |   0 Thanks, but I got WA for another case :( It hurts I hadn't had time to debug :(
•  » » » 4 years ago, # ^ | ← Rev. 2 →   0 I guess, you didn't got the joke. :( StillFantasy
•  » » 4 years ago, # ^ |   0 lol
 » 4 years ago, # |   0 Why did my code got TLE? Complexity looks fine to me — CODE
•  » » 4 years ago, # ^ | ← Rev. 2 →   0 the limits is 300000 but you set #define MAX 200001
•  » » » 4 years ago, # ^ |   0 my bad. Got it correct now
•  » » 4 years ago, # ^ |   0 When I submit it with GNU C++ 11 I get a RTE verdict on test 11 instead of a TLE verdict.
 » 4 years ago, # |   0 How to hack B?
•  » » 4 years ago, # ^ | ← Rev. 2 →   +4 It looks like all successful hacks are made by cheater
 » 4 years ago, # | ← Rev. 2 →   0 Could someone please explain to me why in Test Case 4 (abc aaa), the answer is aab?I feel the answer should be aba, because Oleg will place 'a' at Position 1, then Igor would place 'a' at Position 3 because he wants the string to be lexicographically large, so Oleg will be left with Position 2 and he'll place b at Position 2.Thanks in advance!
•  » » 4 years ago, # ^ |   +7 What if Oleg puts b in 3rd position. It will become ??b. Then it obviously becomes aab
•  » » » 4 years ago, # ^ |   0 Yes you're right. Thanks a lot!
•  » » 4 years ago, # ^ |   +1 Oleg should place the 'b' in position 3. Then Igor has to put an 'a' somewhere. Whether it is placed in the first or second location, Oleg will put their 'a' in the other one, giving 'aab'.
•  » » » 4 years ago, # ^ |   0 Okay. Thanks a lot!
•  » » 4 years ago, # ^ |   0 Oleg will place 'b' at 3, and after Igor makes his turn ('a' at place 1 or 2, it is irrelevant), Oleg will place 'a' at last empty space. Answer will become aab, which is smaller than aba.
 » 4 years ago, # |   0 27081526 In this submit time equal 405ms, but it got verdict TL. How it could possible?
•  » » 4 years ago, # ^ |   +5 I think it is ML.
•  » » » 4 years ago, # ^ |   +3 Thanks
 » 4 years ago, # |   +4 pls anyone could explain me why the answer of the test Oleg's reddit and Igor's abcdef is dfdeed but not dfdede ? (test 5)
•  » » 4 years ago, # ^ |   0 Yeah I am also having same problem :(
•  » » 4 years ago, # ^ |   +4 d????? -> df???? -> dfd??? -> dfd??d -> dfd?ed -> dfdeed
•  » » » 4 years ago, # ^ |   0 oh ok tks :)
 » 4 years ago, # | ← Rev. 2 →   +7 Can anyone please explain the output of this test case in problem C.redditabcdefExpected answer is this --> dfdeedMy answer --> dfdede
•  » » 4 years ago, # ^ |   0 So, the answer will be of 6 letters. letters for optimal answer- {d,d,e} and {f,e,d} Steps are :- 1)d????? 2)df???? 3)dfd??? 4)dfd??d 5)dfd?ed / dfde?d 6)dfdeed
 » 4 years ago, # |   +11 Fastest system test, and fastest rating update ever, nice round :D
 » 4 years ago, # |   0 How to make a segment sum tree with range updates and range queries? I'm asking for problem F, to maintain a segment tree for every digit that have sums like that digit was 1. :)
 » 4 years ago, # |   0 Can problem F be solved with DSU on Segment tree? I tried really hard but still in vain with TLEs. It seems like it can pass in time if I change long long to int, but of course with WA.
 » 4 years ago, # |   0 I submitted two codes one with long double (code) and one with double code.double got AC and long double got WA on test 1(though it works perfectly on my machine). I always have a rough time with doubles. Am I missing something? some compiler issues?
•  » » 4 years ago, # ^ |   0 it should work with C++14
 » 4 years ago, # |   +41 Why ratings are updated without removing cheaters?
•  » » 4 years ago, # ^ |   0 anyone knows how to tag the boss? i mean Mike or any of the Codeforces official???
•  » » » 4 years ago, # ^ |   0 Goto any contest announcement blog. There will be a thanks to MikeMirzayanov. Copy the name. Then, Hover over the codeforces icon at the top of the comment box. Then, select "User". Paste the name. Click ok and post.You will see, sir MikeMirzayanov will be tagged. :)
 » 4 years ago, # | ← Rev. 4 →   0 In problem C can someone explain test case: reddit abcdef The answer is: dfdeed  Oleg plays with letters dde Igor plays with letters fed Oleg plays: d????? Igor plays: df???? Oleg plays: dfd??? Igor plays: dfde?? So why would Oleg now play dfdee? — it is not optimal for him?He should play dfde?e.So Igor must play: dfdedeFor Oleg dfdede is better than dfdeed?UPDate: got itStep 4. Igor plays: dfd??d forceing e on the 4th spot.
•  » » 4 years ago, # ^ |   0 In the 4th move,Igor will play dfd?e?.Now Oleg is forced to put e in the 4th position.
•  » » 4 years ago, # ^ |   +6 0 d?????1 df????2 dfd???3 dfd??d4 dfd?ed5 dfdeeddfdeed
 » 4 years ago, # | ← Rev. 2 →   +4 Now that this round is finished, when will you announce the random playrix t-shirt winners ? KAN
•  » » 4 years ago, # ^ |   +1 you can run code yourself
•  » » 4 years ago, # ^ |   0 He has already posted the handle of winners in reply to his original comment on Playrix Contest Blog.
•  » » 4 years ago, # ^ |   +1
 » 4 years ago, # |   -93 hi guys. Mr_Fox is my fake account. sina-ss is my corrently account.
 » 4 years ago, # |   +11 In D tests does not check for overflow in clique check.This AC submission http://codeforces.com/contest/794/submission/27090233 would fail for almost every graph with n = 65538, m = 98305
 » 4 years ago, # |   0 Hello guys ! Can someone please help me in problem C. A test case : abc aaa . In the first turn the first player will put 'a' in the first place,then in the second chance the second player can put 'a' either in the second place or in the third place. According to the solutions which have passed they put it in the second place. But i think it will be more optimal to put it in the third place. this way it would be lexicographically bigger from the second player's point of view. Can somebody please explain this to me ?
•  » » 4 years ago, # ^ |   0 No. The optimal strategy for the first player is to place his letter 'b' to the last position on the first turn.
•  » » 4 years ago, # ^ |   0 As it was written player can place their letter anywhere instead of question marks. So the first turn of Oleg is to place the 'b' at the end. Then, as the biggest letter in Igor's set is 'a' he will place it also at the end. Then, the Oleg's turn is to put 'a' to the first letter. Consequently, the answer is 'aab'.
 » 4 years ago, # |   0 Could anyone explain me the last input-output example of problem D? Although there is note under the example, I can't catch its point.
•  » » 4 years ago, # ^ |   0 basically u need 1 to be the 'neighbour' of 2,3 and 4 but at the same time 2,3,and 4 cannot be the 'neighbour of each other, so therefore the output is "NO"
•  » » » 4 years ago, # ^ |   0 Got it, thanks!
 » 4 years ago, # | ← Rev. 2 →   0 I am getting TLE for 11 test case for problem C in nlogn. Still it gives TLE. My Submission : http://codeforces.com/contest/794/submission/27085787 Can anybody please tell me reason for that. Thanks
•  » » 4 years ago, # ^ |   +1 27115362 Here you go.Basically you TLE because of these lines.  for( i=0;i
•  » » » 4 years ago, # ^ |   0 Thanks a lot. I thought those two operations were same. But in case of string the complexity would change.
 » 4 years ago, # |   +34 Everybody's rating was back to that before the contest for a moment to ban sepanta.Anyway, justice was done. Well done, Codeforces!
 » 4 years ago, # |   0 I tried to solve the problem E.**Leha and security system** https://pastebin.com/haK2wtvr upon submission I am getting run time exception with Exit code is 1Can anybody help me to figure out what went wrong. Thanks in advance.
 » 2 years ago, # |   0 problem C Test case 5 input:-reddit abcdef answer:-dfdeed answer acc to me:-dfdede which is lexicographically smaller than and can be possible 1st turn d????? 2nd turn df???? 3rd turn dfd??? 4th turn dfde?? 5th turn dfde?e 6th turn dfdedeplease reply am i correct or not