By 300iq, history, 21 month(s) ago, translation, ,

Hi!

On April 23, 19:35 MSK will be held rated Tinkoff Challenge – Elimination Round.

Problems were prepared by me — Ildar Gainullin, Alexander alkurmtl Kurilkin and Nikolay KAN Kalinin.

Big thanks to Vladislav winger Isenbaev and Alexander AlexFetisov Fetisov for testing round, and also to Mike MikeMirzayanov Mirzayanov for systems Codeforces and Polygon.

Participants will be offered seven problems and two hours to solve them. Scoring will be announced a bit later.

This round is eliminational for Tinkoff Challenge.

Best 30 participants will be awarded with warm vests and other pleasant souvenirs like stickers and notepads. Best 100 participants will be invited to Moscow to visit Tinkoff's office with panoramic view on the city.

Best 20 participant who will be able to arrive will advance to Tinkoff Challange – Final Round.

We hope everyone will find interesting problem for themselves. We wish everyone a successful round and high ratings!

UPD. Scoring: 500 1000 1500 2000 2500 3000 3500

UPD. Editorial

•
• +424
•

 » 21 month(s) ago, # |   +2 Nice announcement. Hopefully all the problems will be cool. Good luck to everyone and no rating drops!
•  » » 21 month(s) ago, # ^ |   -8 rateng ke chenj haba?
 » 21 month(s) ago, # |   +157 My profile picture advertises Tinkoff nearly a year. I think that I deserved automatic invitation for the final :)
•  » » 21 month(s) ago, # ^ |   +109 Unfortunately almost nobody noticed your profile picture is about tinkoff before you say that :D
 » 21 month(s) ago, # | ← Rev. 2 →   -52 Wishing problem description will well translated in english.
•  » » 21 month(s) ago, # ^ |   0 On April 23, 19:35 MSK will be held _rated_ Tinkoff Challenge – Elimination Round.
•  » » » 21 month(s) ago, # ^ |   +15 Thanks.. I don't notice that.
 » 21 month(s) ago, # | ← Rev. 2 →   -80 .
•  » » 21 month(s) ago, # ^ |   -36 Nope
 » 21 month(s) ago, # |   -37 Is the round rated?
•  » » 21 month(s) ago, # ^ |   -45 for you no
 » 21 month(s) ago, # |   +144 Are travel cost and staying cost paid for top 100 participants?
 » 21 month(s) ago, # | ← Rev. 2 →   +15 Just a begginer's doubt: From what I understood, the round will be rated for codeforces, but shouldnt it therefore be called "Codeforces Round #411 — Tinkoff Challenge" or so?
•  » » 21 month(s) ago, # ^ |   +19 As I know, the prefix "Codeforces Round" will only be added to the mirror version of a championship or a competition that didn't be held on Codeforces officially. However, Tinkoff challenge is held officially on Codeforces and that why they don't add the prefix.
•  » » 21 month(s) ago, # ^ |   +1 I thought the same thing, usually there are div1/div2 mirrors for things like this.
 » 21 month(s) ago, # | ← Rev. 2 →   0 Can anyone tell me how difficult it is
•  » » 21 month(s) ago, # ^ |   +6 Does it matter ?
 » 21 month(s) ago, # | ← Rev. 3 →   -44 /
 » 21 month(s) ago, # |   +18 The name "Tinkoff" sound super cool to me, though I don't know Russian. I really want to get the Tinkoff vest!!
•  » » 21 month(s) ago, # ^ | ← Rev. 3 →   +7 It means this guy :) Oleg TinkovI am his big fan :D
•  » » » 21 month(s) ago, # ^ |   +110 I think you might have meant that you are his big fan. Although, even if "you are his big fun", who am I to judge ? ;)
•  » » » » 21 month(s) ago, # ^ |   +6 I used to be his fan, now i'm his air conditioner :) (Ok,ok, please don't hate on this overused joke, but I just had to)
 » 21 month(s) ago, # |   +6 Hopefully the statements will be short not like Google Code Jam yesterday xD xD
 » 21 month(s) ago, # |   +2 Any previous round of Tinkoff Challenge?
 » 21 month(s) ago, # |   +7 Is this contest rated for div2(<1900) people?
•  » » 21 month(s) ago, # ^ |   +4 why not?
•  » » » 21 month(s) ago, # ^ |   +10 Ok. thanks.
 » 21 month(s) ago, # | ← Rev. 2 →   +23 Let's stay up late tonight!
 » 21 month(s) ago, # |   -13 Will this contest be rated for all?
•  » » 21 month(s) ago, # ^ |   0 YES, it is said in the article.
 » 21 month(s) ago, # |   0 i registered 5 hours ago successfully, no doubt about that. But now showing i am unregistered :O :O , also that happens to one of my friends also. please fix this.
 » 21 month(s) ago, # |   +1 Will there be any geometry in the contest?
•  » » 21 month(s) ago, # ^ |   +15 It is interesting to see your reaction for each of the 2 possible answers. Let's model the situation and you get the following comment from the author: Yes, there will be a geometry problem.How would you react to that? No, there won't be any of that kind. How would you react to that?
•  » » 21 month(s) ago, # ^ |   0 i bet no
•  » » » 21 month(s) ago, # ^ |   +1 I bet yes :'D
•  » » 21 month(s) ago, # ^ |   +23 You've jinxed it...
•  » » 21 month(s) ago, # ^ |   0 :C
 » 21 month(s) ago, # | ← Rev. 2 →   +19 Why? UPD:Fixed
 » 21 month(s) ago, # |   +5 Still no scoring announcement?
•  » » 21 month(s) ago, # ^ |   0 UPD. Scoring: 500 1000 1500 2000 2500 3000 3500
 » 21 month(s) ago, # |   +52 55 minutes after the end of Tinkoff Finals, GCJ Round 2 begins. I wonder if the Finalists can participate in GCJ.
•  » » 21 month(s) ago, # ^ |   0 GCJ Round 2 begins? what is this? Google Code Jam?
•  » » 21 month(s) ago, # ^ |   0 There is an answer in russian branch (you've studied russian, am I right? :)) from one of the event organizers: "I also want to write GCJ, so we will end until R2 begins"
 » 21 month(s) ago, # |   +50 Seems like the round is delayed for 10 minutes (19:45 MSK). Then right after this round is finished, El Clasico will be started. :")
 » 21 month(s) ago, # |   +20 I wanna watch el clasico...please Start it soon :((
 » 21 month(s) ago, # |   0 10 minutes late.
 » 21 month(s) ago, # |   +2 Was the contest delayed? I thought it was at 19:35MSK but it looks like it's at 19:45MSK.
 » 21 month(s) ago, # |   0 Why delay in contest time?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +26 Why not*It's codeforces' usual
•  » » 21 month(s) ago, # ^ |   +2 FA Cup Semi-final: Arsenal vs Man City match perhaps :p
•  » » 21 month(s) ago, # ^ |   0 Better delay the round rather than have long waiting queues during the round =)
 » 21 month(s) ago, # |   0 This contest has the most beautiful timing I have ever had.Actually I am very happy because I don't have to wait for the system test. It's El-classico after this contest.
 » 21 month(s) ago, # |   -15 No man! Why 10 minute late! Not much time to take dinner . After contest ,will watch el clasico.
 » 21 month(s) ago, # |   0 Are the judging servers frozen or something?
 » 21 month(s) ago, # |   -8 Long Queue :/
 » 21 month(s) ago, # |   +33 Well this round certainly "eliminated" me.
 » 21 month(s) ago, # |   +3 Anybody knows the reason of WA10 on C?
•  » » 21 month(s) ago, # ^ |   0 Send the code, so maybe we can find the error in it. I got pretest passed for first on C, but I know I'll fail system test, and I couldn't get another pretest pass from 3 more submissions. I got RE4 for the submission I think was good :PI can only hope, the system test will be weak.
•  » » 21 month(s) ago, # ^ |   0 Something like point can have speed vector of zero length
 » 21 month(s) ago, # | ← Rev. 7 →   +46 In problem D debugged 1 hour in test 4 and find out the edge is directed in the last 5 minutes and don't have time to optimize...#ggneedaglassesPS. More unfortunate, I set wrong initial value for my dp array and led to TLE.
•  » » 21 month(s) ago, # ^ |   0 This thing just ruined my contest. Didn't even think about it before I read your comment :(
 » 21 month(s) ago, # | ← Rev. 2 →   +12 Someone fooled me by #define int long long :(
•  » » 21 month(s) ago, # ^ |   0 laughed too hard on this one
 » 21 month(s) ago, # |   +2 How to Solve C?
•  » » 21 month(s) ago, # ^ |   0 I did ternary search to get when will a mouse be inside, then binary search in both directions to get the total interval each mouse will be inside
•  » » 21 month(s) ago, # ^ |   +3 Use binary search for the time. You can check if after some time the mice has went out already of the trap, is inside it, or hasn't gone to it yet.
•  » » 21 month(s) ago, # ^ |   +4 First, you can see that a mouse will be in one segment of time (tEnter; tLeave) (or it won't be in the trap all the time, then the answer is -1). To find these segments, we can find intersections with the lines that make a rectangle.Then, we make the events such as {mouse x came to trap at time t} {mouse x came out of trap at time t}. Sort them and process consecutively. If we found the "came to trap" process, we increment the amount of mice, otherwise decrement. If we found in some point of time that there're n mice, we just output this period of time.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +29 Let's pick a single mouse. Assume for simplicity that vx > 0 then the mouse will be in the right x area if x1 < rx + tvx < x2 which is equivalent to requiring that (simple algebra). You can do something similar for vx < 0 and when vx = 0 you either pick the empty interval or all of [0, ∞) depending on whether x1 < rx < x2 or not. When you do the same thing for y and intersect these two intervals, you'll get the time during which this mouse is in the trap.Do this for all mice, intersect all of these intervals and pick the smallest non-negative value it contains.
 » 21 month(s) ago, # |   +10 Hack case for C?
•  » » 21 month(s) ago, # ^ |   +1 I didn't hack with it because didn't have time, but 1 99999 99999 100000 100000 -100000 -100000 1 1seems a pretty good hack case to me.
•  » » » 21 month(s) ago, # ^ |   +3 Yes. My solution fails on this. Thankyou!
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +1 I hacked with this simple test:1 1 1 3 3 0 1 1 0 (answer: -1)The idea is the mouse runs along the border of the rectangle, but is never strictly inside it.
•  » » » 21 month(s) ago, # ^ |   0 Yes. I didn't take care of this part. Thankyou!
•  » » » 21 month(s) ago, # ^ |   0 :( didnt check strictly inside
•  » » » 21 month(s) ago, # ^ |   +55 Very cool picture in the statement:I thought when mouse at borders it means mouse in mousetrap
•  » » » 21 month(s) ago, # ^ |   0 Aware of the hack case in the last 5 minutes but I was panic and unfortunately only fix this after the contest end for 2 secs @@
 » 21 month(s) ago, # | ← Rev. 2 →   +68 for C , double -> WA , long double -> AC UPD:WA
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +20 Let's wait for system testing and see how it goes :)I implemented solution in such a way that it feels risky even with long double :)Upd. You got WA due to using eps, not because of double. For me using double still works: 26638771 (I have no idea if it is actually OK to write it this way).
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 WHATT?? NOOOO! :(
 » 21 month(s) ago, # |   0 Is c ternary search on max distance between point and rectangle?
 » 21 month(s) ago, # |   +2 Can anyone tell me if this approach is correct for C?Binary search on the time. Translate each point. If the line from the original point to the new one intersects the rectangle and isn't inside the rectangle then I need to lower the time. If the line doesn't intersect the rectangle then I need to raise the time.If I need to both raise and lower the time, the answer is -1. I couldn't get past pretest 4 (I also made sure to find all corners of the rectangle since they didn't give the top left one).
•  » » 21 month(s) ago, # ^ |   0 Yes, the approach is correct, probably there is an error in the implementation.
 » 21 month(s) ago, # |   +28 Why is the hacking page so unstable? I really wanted to hack, but the page was just showing "loading circle" infinitely.
•  » » 21 month(s) ago, # ^ |   0 the hacking page was stable for me the whole contest.
•  » » 21 month(s) ago, # ^ |   +6 It also might be browser related. The same thing was happening to me in chrome but I swapped to Microsoft Edge for a sec and the page loaded. Not sure if coincidence or not since I didn't try again.
•  » » » 21 month(s) ago, # ^ |   0 Thx, I'll try in the next contest.
•  » » 21 month(s) ago, # ^ |   +10 I encounter the same trouble after hacking one submission.
 » 21 month(s) ago, # |   +230 IMO problem C ruined the contest
•  » » 21 month(s) ago, # ^ |   +26 B also.
•  » » » 21 month(s) ago, # ^ | ← Rev. 3 →   0 What's with B? Is 4 state visited array enough to ac ?
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   +9 Only implementation, as you can see even reds skipped this implementation because it is annoying.
•  » » » » » 21 month(s) ago, # ^ |   -21 http://ideone.com/9QCTSi As you can see, it's quite easy to implement, you even don't need bfs
•  » » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   +11 Yeah, cool 80 lines for an B!!! How quickly did you get the idea comparing with how quickly you coded it?P.S. I did it easier with 'only' 4 fors and a lot of ifs.
•  » » » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 I did it in a clean way without any case handling: Click EDIT: Nvm , it failed systest :(
•  » » » 21 month(s) ago, # ^ |   +8 Actually it is possible to code it nicely. You can just fix a column (row) of swaps and check with partial sums if paths (start, firstChange), (firstChange, secondChange) and (secondChange, end) are empty. https://pastebin.com/iep38bf6
•  » » » » 21 month(s) ago, # ^ |   0 This is how I coded.
•  » » 21 month(s) ago, # ^ |   0 What was the Hack case for C ?
•  » » 21 month(s) ago, # ^ |   0 Why?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +8 At the end of the day I'm really happy with this problem because I discovered something which was surprising for me.I represented an empty interval as a pair (-1.0, -1.0). I mantained an interval of possible trap closing timestamps. I forgot to check at the end if it was empty. So sometimes I print -1.0000000000 instead of -1. It still passes, of course :D.It was hilarious, really :D.Anyway, I agree that it was messy.
 » 21 month(s) ago, # |   +17 Task were tehnical, tehnical and tehnical.Good bye, my rating.
•  » » 21 month(s) ago, # ^ |   +1 Welcome to div2 :)
•  » » » 21 month(s) ago, # ^ |   0 Or nope :P I can not believe that pretests for B were so weak, I forgot half of task and didn't realise it till end of contest.
 » 21 month(s) ago, # |   +32 Didn't read this for almost 50 minutes, got WA 7 times, :'(
 » 21 month(s) ago, # |   +143 I'll probably get down votes for saying this but I really did not enjoy this contest. The problems were not interesting to solve — just extremely annoying.
•  » » 21 month(s) ago, # ^ |   +12 Yes, B is hard for a B. and C is too long.
•  » » 21 month(s) ago, # ^ |   +16 I agree with you !
•  » » 21 month(s) ago, # ^ |   +25 The sample cases on the tasks B and D weren't good also. In B, there were only cases with n=m. In D, there was no case with -1.It's always good to give a case with -1 in samples (except the case when finding the test with -1 i stricky and requires good thinking skills).
•  » » » 21 month(s) ago, # ^ | ← Rev. 2 →   +11 My solution for D failed pretests because I forgot about -1
 » 21 month(s) ago, # |   +5 I think this problem can't be B problem :(
 » 21 month(s) ago, # |   +114 Contest duration was obviously not long enough.
 » 21 month(s) ago, # |   +6 How to solve D, I had following dp state -> (left,right,start,k) where [left,right] is allowed range, start is always left-1 or right+1 and k are required number of nodes to be visited?
•  » » 21 month(s) ago, # ^ |   0 I had this following dp[current_city][min_city][max_city][k]. At each state you can only visit another city x if min_city < x < max_city.
•  » » 21 month(s) ago, # ^ |   0 used the same :)
•  » » 21 month(s) ago, # ^ |   0 Tried the same but didn't notice that edges are directed :(
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Yes, my recurrence is very similar.solve(pos, left, right, done) where pos is current position, done are number of banks already gifted, and left and right is allowed range, initally 0 and n-1 respectively.Then for the recurrence, Iterate all i in range(ll,rr): solve(i,left,pos-1,done+1), if i is on left of pos solve(i,pos+1,right,done+1) if i is on the right
•  » » 21 month(s) ago, # ^ |   0 same
 » 21 month(s) ago, # |   +4 Can anyone explain how to solve D ? thanks!
•  » » 21 month(s) ago, # ^ |   +3 you can use Dynamic Programming Your state is (int start,int end,int current,int taken) indicating left boundary , right boundary , current position and number of visited offices note that the state can be redefined to save some memory i hope it's efficient enough to pass xD
•  » » 21 month(s) ago, # ^ |   0 dp[l][r][last][k] = min cost when you can move in l,r and last city is last and we visited k banks. But it is slow. So we can notice that l or r will be equal to last, and we can remove r so it will pass.
 » 21 month(s) ago, # | ← Rev. 3 →   +13 So hard problem for B :(I wasted about 40 min on it :(
•  » » 21 month(s) ago, # ^ |   +4 I thought I was overthinking to use dfs in a B
•  » » » 21 month(s) ago, # ^ |   0 Me too, at last, I use bfs
 » 21 month(s) ago, # |   0 Is there an error in the following function? Get Time Inside Of Rectanglebool get_time_inside(int i, double& min_time, double& max_time) { min_time = inf; max_time = 0; if (is_inside(s_x[i], s_y[i])) min_time = 0; double time_to_intersect[4] = { inf, inf, inf, inf }; for (int side = 0; side < 4; side++) if (v[side][i] != 0) { auto time = 1.0 * (bounds[side] - s[side][i]) / v[side][i]; auto x = s_x[i] + v_x[i] * time; auto y = s_y[i] + v_y[i] * time; if (time >= 0 && is_inside(x, y)) { time_to_intersect[side] = time; min_time = min(min_time, time); max_time = max(max_time, time); } } int cnt_inf = 0; for (int side = 0; side < 4; side++) cnt_inf += time_to_intersect[side] >= inf; if (cnt_inf == 4) max_time = inf; if (min_time >= inf) return false; return true; } I get the time to reach each of the sides of the rectangle and get the min/max from these 4 values. If the code is not clear, please tell me about it and I will try to improve its readability.
 » 21 month(s) ago, # |   -17 Too many real number problems now a days. Too many precision issues while solving such problems. I estimate atleast 2X people would have solved problem C today if we had to deal with integers only.The real number part is such an unnecessary complication to a rather not so difficulty binary search problem.
•  » » 21 month(s) ago, # ^ |   +31 Some people including me used only integer arithmetics in C. And you don't even have to do binary search.
•  » » » 21 month(s) ago, # ^ |   +18 Seems like that wasn't the case :|
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 I failed due to a dumb mistake, not because integer arithmetic solution was wrong.UPD: I didn't handled the case that all mice do not move. Fixed it and accepted. :(26625743
•  » » 21 month(s) ago, # ^ |   +15 I think the goal of the problem was to require integers (or understand float numbers well).
 » 21 month(s) ago, # |   +7 Test for problem C:20 0 2 2-1 -1 1 11 0 -1 1 Upvote if your solution fails it)
•  » » 21 month(s) ago, # ^ |   +18 the answer is?
•  » » » 21 month(s) ago, # ^ |   +18 The answer is -1.At moment of time 1 they all stay on borders.At moment of time 1 + eps one mouse enters the trap, the other one leaves the trap.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 coordinates must be non-negative
•  » » » 21 month(s) ago, # ^ |   0 you can just translate all given points, e.g x+=100,y+=100
•  » » 21 month(s) ago, # ^ |   0 My program gives 1.
•  » » » 21 month(s) ago, # ^ |   0 After one second both points will be exactly on the borders of rectangle, so -1
•  » » » » 21 month(s) ago, # ^ |   0 It looks like I've ignored the boldest part of the problem statement once again "... strictly inside the mousetrap."I'll feel embarrassed if my solution passes after I change '<=' to '<' in my code =)
•  » » » 21 month(s) ago, # ^ |   -20 Upvote my comment.
•  » » 21 month(s) ago, # ^ |   +31 Can I downvote please if my solution passes it?
•  » » 21 month(s) ago, # ^ |   0 I think the answer should be -1. The first mouse enters the trap as the second mouse leaves, but they are both never strictly in the trap. Correct me if I'm wrong.
•  » » 21 month(s) ago, # ^ |   0 should the answer be -1?
•  » » 21 month(s) ago, # ^ |   0 Mine passes but I still couldn't get past pretest 4 :(
 » 21 month(s) ago, # |   +9 I think problem D was a nice DP of the form Dp[d][left][right][v]. Where this value stores the cheapest path starting at v of length d using vertices only between left and right. Unfortunately I stored my vertices from 0 to n-1 and forgot to subtract 1 in the input. Now I'll have to wait a bit to check if it was correct.Very Nice Problems, thanks.
 » 21 month(s) ago, # |   +17 Am I the only one who did C like this:-Consider x and y coordinates separately, and for each mouse calculate the time interval [t1, t2] such that it's x coordinate will be in (x1, x2), and similar for the y coordinate using math. Handle cases where Vx or Vy = 0 separately (either they will give (-inf, inf)) or impossible.Then take the intersection of all such time intervals to find the answer. Is this correct?Link to solution(Might not be visible just yet I guess)
•  » » 21 month(s) ago, # ^ |   0 I did the same.
•  » » 21 month(s) ago, # ^ |   0 i did the same, though i wonder if i will get ac
•  » » » 21 month(s) ago, # ^ |   0 I too did try to do the same but shame on my poor implementation :(
•  » » » » 21 month(s) ago, # ^ |   0 it happens to all of us :)
•  » » 21 month(s) ago, # ^ |   0 I've been looking at your solution, it's quite clear. How do you handle strictly inside condition? I could not see anything for that.
•  » » » 21 month(s) ago, # ^ |   +3 I maintain (t1, t2) as the interval where all mice are inside the mousetrap, and notice at the end I check if t1 >= t2, the answer is impossible.If t1 < t2, then there exists some x = t1 + epsilon such that at time x, all mice will be inside the mousetrap and x < t2. Therefore, we can print t1 as the answer since epsilon in infinitely small.Another thing to notice is that the only possible cases where the mice will be inside but not strictly inside will either have Vx = 0 or Vy = 0 (which I handle separately), or the mouse will touch one of the corners, in which case the interval produced will be of the form (t, t) and hence it will fail the t1 >= t2 check.
 » 21 month(s) ago, # |   0 How to solve D? I've tried to run floyd-warshall with a slight modification in the relaxation step: if (i < k && k < j) continue;. For all paths with length k (number of offices), my answer was the one with shortest distance.What am I missing?
 » 21 month(s) ago, # |   +66
 » 21 month(s) ago, # |   +20 Statement for problem C is awful, just awful. It never explains what 'strictly' means exactly, and the sample picture leads to the wrong conclusion.
•  » » 21 month(s) ago, # ^ |   0 It's a common term and you could have asked about it.
•  » » » 21 month(s) ago, # ^ |   +45 That means that the answer is always either 0 or -1 since otherwise the minimal required time doesn't exist since the set of all possible times is open.
•  » » » » 21 month(s) ago, # ^ |   +5 This issue doesn't mean that "strictly" becomes a less known word. Don't expect organizers to think: there is that issue we didn't notice, so let's explain a word "strictly" in detail.
•  » » » » » 21 month(s) ago, # ^ |   +14 I agree, this doesn't make word "strictly" less clear, however, this makes the whole problem (and especially its question) more complicated and suspicious (since formally authors want something other than they ask)
•  » » 21 month(s) ago, # ^ |   0 Hmm, you also had Wrong answer on pretest 7, didn't you? =)
 » 21 month(s) ago, # | ← Rev. 2 →   +3 In B, what on earth test case 9 could've been? Got many TLEs on it, while having tested my algorithm for large inputs. Had to use a clock with time checks to bypass it :c
 » 21 month(s) ago, # |   +33 That moment when a legendary grandmaster hacks you (⁄ ⁄•⁄ω⁄•⁄ ⁄)
 » 21 month(s) ago, # | ← Rev. 2 →   +102 Nice difficulties (except for too complicated B, unless you didn't expect people to implement dfs) of problems but the contest was too short.Please add more samples, especially to check that contestants understand the statement correctly. In B we had h = w. In C, samples didn't check for "strictly inside". In D — undirected edges also worked.
 » 21 month(s) ago, # |   +28 I don't know why CF sticks to 2 hour contest time. I haven't seen a rated round with more than 2 hours. I know it's about speed also, but sometimes (for example now) we could really use 30 or 60 more minutes.
 » 21 month(s) ago, # | ← Rev. 2 →   +8 Why system testing is so delayed and still pending ?Update: System testing started now :)
 » 21 month(s) ago, # |   +2 I need some help in Problem C.My Wrong Approach is :For every mouse I get the time when it (enters) the rectangle By getting the intersection between the line made by the mouse and the 4 segments of the Rectangle.If there is a mouse which will never enter the Rectangle or will stay forever on a border I will output -1.Now I will get the time T at which the last mouse will enter the rectangle.I will check that all the mice after time T will be in the rectangle or on the border of the rectangle. If this is true then I will output T, otherwise -1So What is wrong with my approach ?
•  » » 21 month(s) ago, # ^ |   0 think about the case which a mouse in the rectangle at the beginning?
•  » » » 21 month(s) ago, # ^ |   0 Yes, I handled it.
•  » » 21 month(s) ago, # ^ |   0 The mouse should be "strictly inside" the rectangle and not on the border.
•  » » » 21 month(s) ago, # ^ |   0 Yes, but but if they are not moving towards a border then for sure they will enter after time T. So I outputed T because there is a tolerance of 1e-6.
 » 21 month(s) ago, # |   +6 How this can be rated contest for div2?
 » 21 month(s) ago, # |   0 Can we see others' solutions please?
 » 21 month(s) ago, # |   +119 If you interpret it literally, the statement of problem C had a small problem: If all of the mouses are not already inside the mouse trap when the time starts running, there won't be a minimum time when all of them are strictly inside it. I guess that the problem was intended to have asked for the infimum of those times, but if the mouse trap is closed precisely at that time, some mouses might be on the boundary.
•  » » 21 month(s) ago, # ^ |   +28 That's right, according to the formal statement, the only possible right answers are 0 (if the mice are already strictly inside at moment 0) and -1 (since there is no "minimum number strictly greater than a given number"). So, the statement formally contradicts the first example. Which is bad (Captain Obvious here).I remember the same exact issue handled gracefully in a statement here at Codeforces in the past, but don't remember the exact problem. If someone does remember (past coordinators perhaps?), please give a link!
•  » » 21 month(s) ago, # ^ |   +10 So the answer is always 0 or -1?
•  » » 21 month(s) ago, # ^ |   0 So basically the time that at least some accepted solution outputs (for example, my solution in the upsolving) is the time, when at least one of the mice is on the border of the rectangle, and that's, strictly speaking, OK, because absolute error is infinitely small. But, if there is no such moment (for example, mice "meet" strictly on the border), the answer is -1, which is logical, but feels weird for some reason.
 » 21 month(s) ago, # |   +28 WHEN YOU FOUND A SOLUTION FOR PROBLEM B AND CODEFORCES SAYS TO YOU "CONTEST IS OVER"
•  » » 21 month(s) ago, # ^ |   +8 The important thing is:
 » 21 month(s) ago, # |   +5 I alone think that this contest required 2.5 hours as many Combined Rounds before?
 » 21 month(s) ago, # |   +8 nlog(n) did not work on first problem. I unnecessarily sorted the array :(. But it is weird why sorting exceeding 1 sec time limit for 10^5 size array?
•  » » 21 month(s) ago, # ^ |   0 I sorted the array too but mine passed Here is my submission
•  » » » 21 month(s) ago, # ^ |   +3 yeah I guess problem is with java. You have used c++. May be something to do with java implementation of quick sort.
•  » » 21 month(s) ago, # ^ |   0 Java's sort isn't guaranteed O(n*logn), it can be O(n^2) sometimes. You should shuffle the array randomly before sorting.
•  » » » 21 month(s) ago, # ^ |   0 Yeah that's what I also thought. Thanks :)
•  » » » 21 month(s) ago, # ^ |   0 aJava sort is not guaranteed O(n*lgn) for primitive types like ints. This is because it uses a combination of Insertion sort + quicksort.If you want a guaranteed O(n*lgn) time sorting, convert your primitive ints to the object equivalent.ie don't do this int[] a = new int[n]; Arrays.sort(a);// can be O(n^2)rather do this Integer[] a = new Integer[n]; Arrays.sort(a); //is always O(nlgn)
 » 21 month(s) ago, # |   0 So many failed submissions for C kek
 » 21 month(s) ago, # |   0 I lost 1 hour to implement DFS in java for B but I got TLE on case 9... Anyone know why? https://pastebin.com/B42rBZgQ
•  » » 21 month(s) ago, # ^ |   +3 You are revisiting single index again n again
•  » » 21 month(s) ago, # ^ |   +3 Backtracking DFS takes exponential time. You need to keep track of which places you've visited in your DFS so you don't visit them again.
•  » » » 21 month(s) ago, # ^ |   0 Thanks for the answer. Do I have to use dp 2d array to save turn needed from each position?
•  » » » » 21 month(s) ago, # ^ |   0 That could work, if you also keep track of the direction you entered the position from.I did it a bit differently, instead of storing the minimum turns needed I just moved those to the state of the DFS. See http://codeforces.com/contest/793/submission/26612377
•  » » » 21 month(s) ago, # ^ |   0 I have a doubt, if you have visited a place with 2 changes and you reach the same place with one change, what should be done? I think that you should take that "visited" node again, but if it is true, what would be the complexity of the DFS?
•  » » » » 21 month(s) ago, # ^ |   +5 Actually, you need to store the direction you're going in, and how many changes you can still make. See http://codeforces.com/contest/793/submission/26612377The problem with only keeping track of the visited locations in the grid is that, like you noticed, it doesn't capture the entire state of the process.
•  » » » » » 21 month(s) ago, # ^ |   +5 I really like the implementation, it is amazing, short and clear. thank you.
 » 21 month(s) ago, # | ← Rev. 2 →   +56 380 accepted solutions for D, 135 — for C. This summarizes pretty everything about C.PS changed epsilon from 10^(-9) to 10^(-12): WA->OK. Nice
•  » » 21 month(s) ago, # ^ |   0 I'm the only one in room who solved it. Thanks to arsijo for hacking me
•  » » » 21 month(s) ago, # ^ |   0 Can you share the hack's test case?
•  » » » » 21 month(s) ago, # ^ | ← Rev. 3 →   +5 In fact, I had 2 mistakes. 1 was very stupid, I didn't check if min time that I calculated may be <0. He hacked me using this.Test : 10 0 10 105 5 5 5My answer : -1Answer : 0But when i tried to fix my solution, I understood that mouse speed may be 0. I think test1 0 0 10 105 5 0 0Or something like this should hack most solutions.UPD: I checked test everybody had problems with and i don't understand why
•  » » 21 month(s) ago, # ^ |   +15 I had the same problem. The reason is simply that 1/(1e5) - 1/(1e5 - 1) = 1e-10 (roughly), so numbers with large denominators (velocities) can be very close to each other (about denominator^2) when compared.
•  » » » 21 month(s) ago, # ^ |   +10 Yes, now that I have thought about it, I came to the same estimation. I just say that it would be great to include such a test (#40) in pretests, cause wrong epsilon is one of the most frustrating reasons for getting WA.
 » 21 month(s) ago, # | ← Rev. 2 →   0 I thought the contest went well... I changed my mind...
•  » » 21 month(s) ago, # ^ |   0 Just as the first contest I took in Codeforces, I got 2 FST and in the end rank 1000+. :(
 » 21 month(s) ago, # |   +2 Any clue what case 24 is for Problem C ?
•  » » 21 month(s) ago, # ^ |   0 Everyone seems to fail on 24
•  » » 21 month(s) ago, # ^ |   0 1 0 0 100000 100000 0 0 1 0 Output 0.0000000 Answer -1
 » 21 month(s) ago, # |   0 All solutions for G has failed :(
 » 21 month(s) ago, # |   +12 What is intended solution for G? Where are big pretests?
 » 21 month(s) ago, # |   +25 Wake me up, when markysha's submission testing ends
 » 21 month(s) ago, # |   +111 Oh nice!
 » 21 month(s) ago, # |   +1 What was the most elegant solution to B supposed to be?
•  » » 21 month(s) ago, # ^ |   0 Solved it with DP. Code here. dp[i][j][k][l] is true if we can reach destination being at i-th row and j-th column, after turning k times and moving vertical (l = 1) or horizontal (l = 0).
•  » » 21 month(s) ago, # ^ |   0 I implemented DFS and passed system test
•  » » 21 month(s) ago, # ^ |   -70 I think that you should almost everytime fill edges with '*', for simplier solution and use several queues, or struct :) Use Dynamic array, to save best known solution, for some direction. #include using namespace std; int main() { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); int N, M; cin >> N >> M; char A[N + 2][M + 2]; int D[N + 2][M + 2][4]; pairdir[4]; dir[0] = make_pair(0, 1); dir[1] = make_pair(0, -1); dir[2] = make_pair(1, 0); dir[3] = make_pair(-1, 0); int sX; int sY; int fX; int fY; for (int i = 0; i <= N + 1; i++) { for (int j = 0; j <= M + 1; j++) { A[i][j] = '*'; D[i][j][0] = 3; D[i][j][1] = 3; D[i][j][2] = 3; D[i][j][3] = 3; } } for (int i = 1; i <= N; i++) { for (int j = 1; j <= M; j++) { cin >> A[i][j]; if (A[i][j] == 'S') { sX = i; sY = j; } if (A[i][j] == 'T') { fX = i; fY = j; } } } D[sX][sY][0] = 0; D[sX][sY][1] = 0; D[sX][sY][2] = 0; D[sX][sY][3] = 0; queuex; queuey; queuek; for (int i = 0; i < 4; i++) { x.push(sX); y.push(sY); k.push(i); } while (!x.empty()) { int a = x.front(); int b = y.front(); int c = k.front(); x.pop(); y.pop(); k.pop(); for (int i = 0; i < 4; i++) { int price = 1; if (c == i) price = 0; int aa = a + dir[i].first; int bb = b + dir[i].second; if (A[aa][bb] != '*' and D[a][b][c] + price < D[aa][bb][i]) { D[aa][bb][i] = D[a][b][c] + price; x.push(aa); y.push(bb); k.push(i); } } } int X = min(D[fX][fY][0], min(D[fX][fY][1], min(D[fX][fY][2], D[fX][fY][3]))); if (X <= 2) cout << "YES\n"; else cout << "NO\n"; return 0; } 
•  » » » 21 month(s) ago, # ^ |   0 Yay, i got -50 :) Thanks, for sure you can downwote, pls
•  » » 21 month(s) ago, # ^ |   +1 My TripleGunShot ;) 26616550
•  » » 21 month(s) ago, # ^ |   0 Many Thanks to You all, got it now
 » 21 month(s) ago, # |   +48 On C, there is more "Wrong answer on system test" than "Accepted", right? How do we know actually which one is correct, then? :PAnd yeah, this round is a very big disadvantage for those who attempt C first. Not a very good round IMHO
•  » » 21 month(s) ago, # ^ |   +3 I started with C and succeeded with integer solution. But it was too painful to implement and wait for system testing results.
•  » » 21 month(s) ago, # ^ |   0 Represent in the form: p / q.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +5 Actually, Change EPS to 10 - 12 will get AC with long double. Because error can be small as 10 - 10.
 » 21 month(s) ago, # | ← Rev. 2 →   0 Why my solution is wrong for B?https://ideone.com/EmkO4JUPD: AC (new code: http://codeforces.com/contest/793/submission/26626324)
 » 21 month(s) ago, # |   +15 In problem D, it says ->The i-th of these lines contains three integers ui, vi and ci (1 ≤ ui, vi ≤ n, 1 ≤ ci ≤ 1000), denoting the crossroads connected by the i-th road and its difficulty.which clearly misleads to undirected graph, whole time I was solving for undirected graph, removed one line after the contest and its accepted.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 The crossroads are connected with m oriented bicycle lanes (the i-th lane goes from crossroad ui to crossroad vi), the difficulty of each of the lanes is known. But yeah, I had a sneaking suspicion that it was a directed graph and good thing I found out that word in the statement, or else I would have got WA :D
•  » » » 21 month(s) ago, # ^ |   0 I got two WA because of that :P
 » 21 month(s) ago, # |   +18 Are the memory limits for B correct, because my submission: 26625940 uses 291044 KB of memory which seems greater than 256 megabytes but yet it still passes, is this right?
•  » » 21 month(s) ago, # ^ |   +23 To further elaborate why I am not terribly pleased by this, I submitted this Java solution, and saw that on the pretests, although it passed pretests, it already exceeded 256 megabytes of memory, I forget exactly but it was 280,000 KB or so. Thus I rewrote my solution in C++ and resubmitted. Now after contest I find out that my Java solution passes despite seemingly having a memory issue :( Is there some explanation / way to know in future what the actual memory limit is?
 » 21 month(s) ago, # | ← Rev. 2 →   0 Is G solvable by simple recurrence? It's obvious that we want to model some flow network and run Dinic on it, but is this idea good?We have some recursive function to model flow-vertices for a given rectangle area. If it contains any corners of forbidden rectangles (there are only 4q corners) then let's divide it somehow and solve by recurrence. If it doesn't, then there is exactly one rectangle made of not blocked cells. Is it enough?
 » 21 month(s) ago, # |   0 How can we prove that a O(n^4 * m) solution for D doesn't give TLE? BTW, this "brute force with DP" is much easier than the problem C.
•  » » 21 month(s) ago, # ^ | ← Rev. 3 →   0 At least in my implementation, it is not O(n^4 * m) but O(n^4 + n^2*m) because in each outer loop iteration, I go over each edge at most n times. Probably in your implementation as well.
 » 21 month(s) ago, # | ← Rev. 2 →   0 Can someone point out the mistake in this submission for today's B problem Igor and his way to work ?It fails on pretest 9
 » 21 month(s) ago, # | ← Rev. 2 →   +18 Problem CWA on Test 40: sadness [ #define eps 1e-9 ]Accepted: madness [ #define eps 1e-15 ]
•  » » 21 month(s) ago, # ^ |   0 same :/
 » 21 month(s) ago, # |   0 I have two big idea bugs in E and it still passes
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +10 To elaborate1) I thought that each of vertices a and b may get in any place in its subtree (but it actually can't for example if there's big subtree on path from root to it)2) Instead of checking that number of leaves in subtrees is less than half of all leaves, I checked that it's less than number of all vertices (which is probably always true)
•  » » » 21 month(s) ago, # ^ |   0 Ah I just realized that I also made your mistake 1). So for the first time I do a really good score, it is because of weak tests... :-(
 » 21 month(s) ago, # |   +30 That moment when you read problem B, skip it and read problem C and realise, that its too late to skip this contest coz you already attempted A :/
 » 21 month(s) ago, # |   0 This may sound very weirdBut for question B ,my code gives the correct output 'NO' for the second pretest on my terminal But ,its giving 'YES' when submitted.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Maybe you forgot to set some variables as 0? Your compiler may do this automatically, but CF with optimizations doesn't
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   -10 You should add -O2 command to your compiler because without it, variable in the main function will automatically be set to zero if it hasn't been set any value yet UPD: I think I was wrong. Sorry!
•  » » » 21 month(s) ago, # ^ |   0 The problem was with this statement:std::ios::sync_with_stdio(false);cin.tie(0);Probably, the buffer was not being cleared !
 » 21 month(s) ago, # |   0 Is there anyone who have done problem B using bfs and not getting memory limit exceeding
•  » » 21 month(s) ago, # ^ |   -8 Many people, me included. I just use a array with size [1005][1005][4], how can it get MLE?
•  » » » 21 month(s) ago, # ^ |   0 Looking at your submissions, you got MLE on problem D, not B, and you used 4 dimensional N sized arrays, that is 85^4 = 52200625 ints, which is a lots of memory.
 » 21 month(s) ago, # |   0 Can anyone give test case #31 for problem B? I don't know why is my solution giving WA for that case, because it seems flawless to me. Could someone point out the error? 26618834
•  » » 21 month(s) ago, # ^ |   +1 Shouldn't the last dimension of visited be 3 instead of two (since turnsdid can be 0, 1, or 2)? Also, I don't think you need this dimension at all; getting to a given (row, column, dircection) in more moves is not useful, so you can just index visited by (row, column, direction).
 » 21 month(s) ago, # | ← Rev. 2 →   +10 Can someone help me? I submited problem C during contest and it passed pretests, but it got WA in test 40. However when I try the test in custom invocation it gets the correct output.I am really confuse about this. Thanks in advance ;D26623849UPD: Solved, too big EPS. Thanks!
 » 21 month(s) ago, # | ← Rev. 2 →   +154 Guys, why are you downvoting this post and the editorial? I've noticed that the rating of this post decreased from ~200 to 50 during last several hours.My personal opinion is that it was a nice contest. It featured: Two easy problems A and B. Maybe B was a bit harder than usual, but still it was good. A great problem C. I think that ability to estimate the required epsilon is good for a competitive programmer. If you feel unsure about epsilons, you may always write an integral solution, you only had to implement rational number comparison. A beautiful problem D: interesting DP that requires some thinking. Three hard problems E, F and G, all of them were really interesting to solve. My personal complaint in an editorial post was that in problem G it is hard to prove that any flow-based solution should fit into TL, but KAN convinced me that certain class of solutions should work by mentioning a strong Karzanoff theorem, so the only issues I may possibly see in the contest doesn't actually exist (not even mentioning that this issue affects a really small number of coders).So, even though my performance on this contest was not really good, I think that authors did a great job and that we should support them, not downvote because your solution failed due to epsilons. Consider this as a good lesson, not as a disadvantage of the problemset. What do you think?
•  » » 21 month(s) ago, # ^ |   +38 I agree that E is cool (bad tests aside), I didn't have time to think on F and G, so can't say much about them, but great problem C, seriously?
•  » » » 21 month(s) ago, # ^ |   +22 I'm completely serious. It may have some defects in the statement like the fact we have to find a minimum in an open set, but I don't see why it is bad at all.
•  » » » » 21 month(s) ago, # ^ |   +16 It's not CF format I think. Maybe they should've added the anti-epsilon test in pretests, it would be better than many failed solutions.
•  » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   -9 The fact that the smallest possible non-zero difference of two rationals with denominator of magnitude A has a magnitude of ~? Yeah, that's not a fact for CF round, that's a fact from basic algebra course. Or should the authors always choose the constraints in such way that eps = 10 - 9 works? I really don't see what's the issue here. You estimate the complexity of your solution by multiplying some numbers from constraints, estimating the epsilon is basically the same. Then why did you fail to do the same here?
•  » » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   +68 Personally I failed because haven't even thought there can be such issue in div1A, so just used standard epsilon thinking "fuuu, another non-interesting geometry problem". If I had thought about epsilon, I would've chosen the correct one of course, but I simply didn't expect this and it was my fault, but I still think this problem is just waste of someone's time and nerves.
•  » » » » 21 month(s) ago, # ^ |   +83 Well, I may be too choosy but as for me it was not interesting at all, just bunch of cases to check.
 » 21 month(s) ago, # |   +5 Is it possible to solve B without using a second 2d array for the grid ?
•  » » 21 month(s) ago, # ^ |   0 Yes. 26641777
•  » » » 21 month(s) ago, # ^ |   0 Can you explain =D ?
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Let's mark g[i][j] as '#' if it is possible to get from the start to (i,j) without any turns. Let's find such (i,j): Try to go upward, until you reach end of the grid or g[i][j] = '*'. Then repeat this for other 3 directions. Then, mark g[i][j] as '^' if it is possible to get from the target to (i,j) with maximum 1 turn. Let's repeat the described above procedure from the target. It will find all (i,j) wich can be accessed from the target with no turns. Now, if you run it again from all points marked as '^' (obviously, you need to check only sides, perpendicular to your current direction), you will find all points, in which we can get from the target with 0 or 1 turn. If at some step we need to mark the point as '#' but it is already marked as '^' (or vice versa), then the path with no more than two turns exists. Else it isn't.
•  » » » » » 21 month(s) ago, # ^ |   0 Thanks a lot :)
 » 21 month(s) ago, # | ← Rev. 2 →   0 For problem B, I got WA on test 62. Here is my submission: 26615111Can anybody help me ? What's wrong in my code ?Update: I have found my bug. I was using visited array as vis[row][col][mov], using visvis[row][col][dir][mov] got AC. here is my AC code: 26632674
•  » » 21 month(s) ago, # ^ |   0 I think your code makes at least two moves in the initial direction, so it might fail if we only want to make one move in the initial direction.
•  » » » 21 month(s) ago, # ^ |   0 I have found my bug. I was using visited array as vis[row][col][mov], using visvis[row][col][dir][mov] got AC. AC code: 26632674
 » 21 month(s) ago, # |   +5 My accepted solution for C uses doubles and doesn't have an epsilon; did I just get lucky? http://codeforces.com/contest/793/submission/26615231
 » 21 month(s) ago, # |   +358 To be honest, I was completely shocked when I opened Codeforces today. Shocked and really, really disappointed, as for the first time in Codeforces life I saw a round post having a negative rating. The round had no bugs in validators or model solutions, no serious statement issues, no problems spoiled on the other judges and even no technical troubles. It only featured a signle problem that asked participants "Oh please, dear sir, would you be so kind to turn your brain on and try to figure out what the correct value of epsilon is?"I think this is a very serious moment for us to stop and look close at our competitive programming community. I always used to be proud of being its part, but this time I feel shame.I've prepared many contests, but I still experience inspiration and joy every time I prepare and conduct them. And I wish I can again feel how it feels for the very first time you see thousands of people submitting the problems you've been preparing tests for during the whole last week. The fact the authors got downvoted that much is so humiliating and insane it can't fit in my mind.Dear Codeforces community, for god's sake I ask you to fix it immediately and let's just pretend this never happened.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +154 The round was delayed -- but well, it didn't affect anyone during the round. However, you lie saying that there were no technical issues, but well again, no technical issues during the contest.The main two problems are the following ones:1) EF problems had weak systests. Read the comments. One guy passes E with two bugs (actually one of them is not a bug itself but makes the problem wider), and another one passes F for 10^{10} (in the upsolving, though, but this doesn't make the contest better).2) The round isn't actually about thinking but about a careful hand jo^Wwork. Someone may think it's good for a CF round (and, erm, even claim that it's better than vkcup round 2 problemset), but let these ~5-10 percents of community say whatever they want.As you see, the third problem is indeed not the main disadvantage of this round, it's just a cause of div2 butthurt. And, well, all checkers and validators are ok, all statements are fine, but without good tests the contest is objectively not very good.Returning to the main point of your comment, I agree that authors made well enough to deserve positive post rating. I think each participant to get his piece of satisfaction and/or lesson. But please don't call the contest nice just because of absence of things which actually must not ever take place.
•  » » » 21 month(s) ago, # ^ |   +12 I agree with most of your points, but div2 butthurt? reread the comments above. I see red, yellow and purple complaining about C.
•  » » » » 21 month(s) ago, # ^ |   0 Maybe, I could miss this. I just know that many people are mad, and nobody of them is my yellow-red friend.
•  » » » » » 21 month(s) ago, # ^ |   +67 So you teammate is not your friend, huh?
•  » » » » » » 21 month(s) ago, # ^ |   0 Or maybe he don't see you as red :P
•  » » » » » » » 21 month(s) ago, # ^ |   +8 it's not actually about me
•  » » » » » » » » 21 month(s) ago, # ^ |   0 sorry, I misunderstood. EDIT: maybe he don't see his teammate as yellow-red.
•  » » » » » » 21 month(s) ago, # ^ |   -17 I noticed no butthurt from him, just disappointing and misunderstanding
•  » » 21 month(s) ago, # ^ |   +86 First off, I have a lot of respect for you and for everything you've done for Codeforces.However, what is the point of allowing upvotes and downvotes if whenever the results don't go your way, you ask for the community to fix it? We're all used to high quality problems on this platform, and downvoting is the only way to provide feedback when we feel the problems aren't enjoyable/interesting. I agree that negative rating is overboard, but maybe we can all have better contests in the future if Codeforces learns something from us too.
•  » » » 21 month(s) ago, # ^ |   +15 Starting from January I'm no longer a member of Codeforces team, so the text above is no more than my personal opinion. I agree, that upvoting system is a very important quality control tool, just expressed my opinion that the tool got broken this time.
 » 21 month(s) ago, # |   +5 downvotes > upvotes => it shouldn't have been this contest at all :'( sad luckily I didn't read C statement after I saw test case :| B and G were very interesting
 » 21 month(s) ago, # |   +144 Regarding the problem C.At first, I want to say that there is my fault that I haven't noticed the precision issue in this problem. In fact, authors' solution (to move the rectangle bounds by ε) worked with any ε from 10 - 6 to 10 - 15, so I thought this was ok.Secondly, most of numbers we encounter in real life are real numbers, so we should be able to work and solve problems with them. And of course the knowledge about how computers work with floating-point numbers and the ability to estimate precision are not useless skills. That's why such problems have a right to appear on contests.To summarize, I want to apologize to those affected by the precision problem. If I was preparing this problem again, I would give stronger pretests and/or smaller the constraints. However, I don't see any reason to not give this problem at all.
•  » » 21 month(s) ago, # ^ |   +49 Well this problem is not suitable at all for a CF round. Man you have 2 hours only and 7 problems which I believe were hard. It is not reasonable to make your testcases that strict so you waste like 15-20 minutes of a lot of contestants time who will write the code very carefully. I mean at least you should make the pretests strong so like 80-90% of people who passes gets ac after the end of the contest.It will make a good one for a 5 hour ACM-Style contest. I believe I am not the only one who skipped the round because of this problem.
•  » » » 21 month(s) ago, # ^ |   +56 Why do people spend their time only thinking about how to come up with asymptotically fast and correct solution? Don't you need to think about how to implement solution so that it doesn't take several hours?The idea for this problem Let's solve the problem for X-coordinates and for Y-coordinates independently, and then intersect time intervals gives great advantage in implementing. Plus, this way of thinking makes you think about other edge cases, where move-coordinates are equal to zero, and it's easier to handle them.I didn't come up with it during the contest, so I couldn't get my solution accepted.Many say that this is bad problem, because it doesn't require any idea. But I think, it's good, when there is an idea, which gives you a huge advantage during implementing. And contestant can choose for himself: either he wants to implement the first idea he has in his mind, or think to make his life easier.
•  » » » » 21 month(s) ago, # ^ |   0 Yes you are right :D I figured after that it's can be solved using fraction with 3 variables a, b (a/b) and eps boolean variable :D
•  » » 21 month(s) ago, # ^ |   +71 This is an adequate answer, but still nothing about weak tests in E and F. Problem E has only 44 tests, being a YES/NO problem with non-trivial operations in implementation, which can lead to finding wrong solution instead of correct one, and this is the case not caught by YES/NO answer. So in this problem it's definitely necessary to write REALLY A LOT of incorrect solutions, which consider some steps of the algorithm incorrectly or simply have some implementation bug. If these things had been done as well as the tests against each such solution, there would have been way more tests in this problem.And F is just another case with stupid optimized solution receiving OK. There was simply no test making this solution to do maximum number of operations, which is maybe musthave in any queries problem.Both these cases are good lessons, so hope CF to avoid them in future.
 » 21 month(s) ago, # |   0 Could someone please help me understand why I am getting WA on problem B on test case number 62?What I basically do is the following:1) all cells reachable from the S cell are marked with 1.2) all cells reachable (and not visited already) from any cell marked with 1 is marked with 23) all cells reachable (and not visited already) from any cell marked with 2 is marked with 3If the cell containing the bank is marked with a number different from 0 then the instance has a solution. It's basically a BFS.code's here
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Here is a test case your code fail: 4 3 S.. ..* ... .*T basically, you are checking whether a grid is visited or not, but not the direction in which it is travelling. So you will need 1 more dimension for the direction. (something like v[i][j][dir] instead)
•  » » » 21 month(s) ago, # ^ |   0 You are damn right! I got AC just by checking the directions. In the example you gave me weights were put as follows: 4 3 111 12* 12. 1*T But processing cell (2,0) would stop as soon as it finds the 2 at cell (2,1) and it will not discover that there's still an unvisited cell.Solved by not visiting a cell in a certain direction if I've already visited that cell using that direction.Thanks a lot.
•  » » » 17 months ago, # ^ |   -8 can you please check why it shows WA at test case 11 for [http://codeforces.com/contest/793/submission/29730350],please help asap...
•  » » » » 17 months ago, # ^ |   0 there's a problem with your dp[x][y][direc], it is not storing the minimum value.
•  » » » » » 17 months ago, # ^ |   0 can you please provide some small test case,I can not figure out the mistake..
•  » » » » » » 17 months ago, # ^ |   0 sorry I might be wrong. Maybe you can stress test it? I do not really have time.
 » 21 month(s) ago, # |   -23 Well, problem C was not that bad to me though I am still getting WA. But observing the huge amount of WA in system tests after contests makes me think that, maybe, just maybe, there is someone in North Korea who is preparing to go to the Labor Camp, because Kim Jong Un was expecting him to become Red in this contest and he failed because of this problem :p
 » 21 month(s) ago, # |   0 My Rust solution gets runtime error on the sample, even though it runs fine on my machine. Any idea as to what's going on?