### ko_osaga's blog

By ko_osaga, 21 month(s) ago,

새해 복 많이 받으세요, 코드포스! (Happy new year, Codeforces!)

Welcome to the first Codeforces Round of the new decade, Hello 2020! The round will be held on Jan/04/2020 15:05 MSK.

• Div 1, 2 combined
• 2.5 hours!
• 7 problems!
• Score distribution: 500-1250-1750-2500-2750-4000-4000
• Yes, it is rated!

This round is prepared by ko_osaga no_ng ckw1140. I am personally very thrilled to deliver my first Codeforces contest as such a memorable one!

More credits for the contest:

UPD: Editorial. Thank you for your participation!

UPD2: Winners:

Announcement of Hello 2020

• +1231

 » 21 month(s) ago, # |   +312 First comment of the decade on a CF round blog.
 » 21 month(s) ago, # |   +41 Happy New Year!
 » 21 month(s) ago, # |   +146 No offense, but how can a blue coordinate a round written by orange writer? not to say such an important round.
•  » » 21 month(s) ago, # ^ |   +68 Don't judge 300iq by its color.
•  » » » 21 month(s) ago, # ^ |   +11 yea,300iq is the best..!
•  » » 21 month(s) ago, # ^ |   -150 300iq is not blue pal
•  » » » 21 month(s) ago, # ^ |   +105 xd
•  » » 21 month(s) ago, # ^ |   +585 Yes, he was the worst coordinator I've ever met in preparing CF round.
•  » » » 21 month(s) ago, # ^ | ← Rev. 2 →   +553 Hey, sorry, we decided to change all your problems with my problems.
•  » » » » 21 month(s) ago, # ^ |   +40 It is no longer Wednesday my dudes.
•  » » » 21 month(s) ago, # ^ |   +103 Well, he is also the best coordinator you have ever met, since it's your first contest.
•  » » 21 month(s) ago, # ^ |   -174 It's because of magic , in fact he is legendary grandmaster , but he have changed his colour . exactly like you , a green grandmaster :)
•  » » » 21 month(s) ago, # ^ |   +23 r/woooosh
•  » » » » 21 month(s) ago, # ^ |   -35 Please don't link subreddits outside of Reddit
•  » » » » » 21 month(s) ago, # ^ |   -57 How dare you say that to the king of dank memes?
•  » » » 21 month(s) ago, # ^ |   -29 Do you know the meaning of word sarcasm?
•  » » 21 month(s) ago, # ^ |   -77 Such shame that you don't who he is.he got rank 2 in IOI 2018
•  » » » 21 month(s) ago, # ^ |   +49 He didn’t participate in IOI 2018.
•  » » » » 21 month(s) ago, # ^ |   -68 2019 bad type!!!
•  » » 21 month(s) ago, # ^ |   -10 You're too young and naive
•  » » » 21 month(s) ago, # ^ |   0 I think few can even understand your Time MOGIC here at a Russian site^_^
 » 21 month(s) ago, # |   +23 Hello ko_osaga!
 » 21 month(s) ago, # |   +49 Where's the interactive :o
 » 21 month(s) ago, # |   +53 The decade starting with Korean round! This is so great!
 » 21 month(s) ago, # |   +43 Hi ko_osaga.
•  » » 21 month(s) ago, # ^ |   +12 Hi "user ainta", hope u and cafe mountain get the 1st place this year ^_^
 » 21 month(s) ago, # |   +23 Hi ko_osaga
•  » » 21 month(s) ago, # ^ |   -42 Hi ko_osaga
•  » » » 21 month(s) ago, # ^ |   -6 Hi ko_osaga!
 » 21 month(s) ago, # | ← Rev. 2 →   -77 I sure love toxic CF community!!
•  » » 21 month(s) ago, # ^ |   -32 why do you make dad jokes on a programming website goddammit
 » 21 month(s) ago, # |   -12 I'm so sad I can't participate in this round. T_T
 » 21 month(s) ago, # |   +4 everyone can participate?
•  » » 21 month(s) ago, # ^ |   +22 Yes
•  » » » 21 month(s) ago, # ^ |   +14 good thanks
 » 21 month(s) ago, # |   -16 The first contest in2020.Hope everyone can get a good place！
•  » » 21 month(s) ago, # ^ |   +29 Then who will get the last places?
•  » » » 21 month(s) ago, # ^ |   +14 One of those guys who want to do poorly such as i_will_be_less_than_zero
 » 21 month(s) ago, # |   +2 Hope I will became expert for first time in this round!!!
•  » » 21 month(s) ago, # ^ |   +83 But you are already a legendary grandmaster :-)
•  » » » 21 month(s) ago, # ^ |   +13 LGM's can become an expert too.
 » 21 month(s) ago, # |   0 Hello 2020!
 » 21 month(s) ago, # |   -55 Кажется, что подзадачи на cf стали настолько нормальной практикой, что контест, который обходится без них, воспринимается как нечто необычное и хорошее, раз составитель отмечает это.
 » 21 month(s) ago, # |   -17 Hello koosaga! I hope it is a fun competition:D
 » 21 month(s) ago, # |   -74 But it is not the new decade, except you consider that every year(not only year, it can be month, day, etc.) starts a new decade, with start in that year. Now it is 21 century, it started on January 1, 2001, not 2000. And this year is not a first year of 203 decade, it is the last year of 202 decade.
•  » » 21 month(s) ago, # ^ |   +84
•  » » 21 month(s) ago, # ^ |   +59 For your information, ISO 8601 defined decade like this.3.1.2.22decadetime scale unit (3.1.1.7) of 10 calendar years (3.1.2.21), beginning with a year whose year number is divisible without remainder by ten
•  » » » 21 month(s) ago, # ^ |   +52 they define century as time scale unit (3.1.1.7) of 100 calendar years (3.1.2.21)duration (3.1.1.8), beginning with a year whose year number is divisible without remainder by 100 which is let's say questionable
•  » » » » 21 month(s) ago, # ^ |   0 I always hope that every people count centuries in 0-indexed style.
 » 21 month(s) ago, # |   0 hope pretest passed => system test passed
•  » » 21 month(s) ago, # ^ |   +30 more likely pretest passed >= system test passed
•  » » » 21 month(s) ago, # ^ |   +6 more likely pretest passed == system test passed + hacked;
•  » » » » 21 month(s) ago, # ^ |   -18 more likely pretest 1 passed
•  » » » » 21 month(s) ago, # ^ |   0 It cannot be more likely since it is a subset of the former.
•  » » » 12 months ago, # ^ |   0 => is an "implied" sign
 » 21 month(s) ago, # |   -83 Waiting for anyone asking if it's rated or not..
•  » » 21 month(s) ago, # ^ |   -6 And getting downvotes :P
 » 21 month(s) ago, # |   -48 i hope that my rate exceeds 2020 Through 2020
 » 21 month(s) ago, # |   -7 Is the score format like educational rounds or like goodbye 2019 ?
•  » » 21 month(s) ago, # ^ |   0 Like goodbye 2019.
•  » » » 21 month(s) ago, # ^ |   -8 Thanks
 » 21 month(s) ago, # |   +22 Good competition is coming. (Radewoosh, Retired_MiFaFaOvO and tourist)
 » 21 month(s) ago, # |   +14 다들 새해 복 많이 받으세요~~ happy new year~~
 » 21 month(s) ago, # |   +11 I am very sad that I have no time.For a terrible exam. o(╥﹏╥)o
 » 21 month(s) ago, # |   +9 good bye 2019
 » 21 month(s) ago, # |   -34 ⠀ ⠀ ⠀ ⠀
•  » » 21 month(s) ago, # ^ |   +1 Yeah, man.
 » 21 month(s) ago, # |   +14 Wow!! I can't wait!!!
 » 21 month(s) ago, # |   +10 2020!
 » 21 month(s) ago, # |   -125 ko_osaga On a genuine note, in last contest too, it was said there wont be any subtasks but there were subtasks. If there are going to be subtasks, then please don't say "No subtasks"
•  » » 21 month(s) ago, # ^ |   +105 There weren't subtasks in the last contest.
 » 21 month(s) ago, # |   -43 Really NOT friendly for US time T_T TAT TvT TwT
 » 21 month(s) ago, # | ← Rev. 3 →   -46 :(
 » 21 month(s) ago, # |   +9 I have a suggestion guys. It would be great if the problem setters include some ques on Graphs an Trees in any of the A,B,C,D ques of the contest . It is generally there on the E,F ques which a not so good programmer like me find it too hard to solve and doesn't get enough exposure of these kind of problems in the real time.
•  » » 21 month(s) ago, # ^ |   -9 A B C graph problems is kinda boring or well known .. if not contest would be unbalanced
 » 21 month(s) ago, # |   -8 Welcome 2020!
 » 21 month(s) ago, # |   +3 I admire the Coordinator because he usually makes simple problem statements that are easy to read and understandable.
 » 21 month(s) ago, # |   +3 Happy new year!
 » 21 month(s) ago, # |   +13 Wow there is more than 14,000 registeration.
•  » » 21 month(s) ago, # ^ |   +30 Yes, it seems to be the contest with the most registration in the history.
•  » » » 21 month(s) ago, # ^ |   0 Yes. Exceed Codeforces Round #595 (Div. 3) and go to 15,000...
•  » » » » 21 month(s) ago, # ^ |   +2 Now it also goes to 15,000...
 » 21 month(s) ago, # |   0 Ceremony sense of New Year
 » 21 month(s) ago, # |   +5 The prize of the contest has no T-shirt?
 » 21 month(s) ago, # |   0 Happy New Year!
 » 21 month(s) ago, # | ← Rev. 2 →   +9 Look like, it going to be first contest in codeforces with 15000+ registrations.UPD -: 15000+ registrations achieved.
•  » » 21 month(s) ago, # ^ |   0 Now it has come to that.
 » 21 month(s) ago, # |   0 Happy New Year, Codeforces...!!!
 » 21 month(s) ago, # |   +1 Korean round assa!
 » 21 month(s) ago, # | ← Rev. 2 →   0 .
 » 21 month(s) ago, # | ← Rev. 2 →   -28 ....
 » 21 month(s) ago, # |   +2 15k+ registrationI think it is highest ever. Best of luck for all and server as well as.
 » 21 month(s) ago, # |   -47 $15521$ registered users, I think it would be wiser not to participate, as the servers will surly suffer :(
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   -8 But if there is less query problem, the server would rather less suffer.
•  » » 21 month(s) ago, # ^ |   -14 There will be a lot like you to reduce the load of server so that other can participate safely.
 » 21 month(s) ago, # |   -18 Oh Oh, 15k5 Participants @@
 » 21 month(s) ago, # | ← Rev. 3 →   -57 Queueforces for the first contest of this decade...Edit: Sorry seems it didn't matter much. Next time I will sent such comment after contest.
 » 21 month(s) ago, # |   0 tough one
 » 21 month(s) ago, # |   +6 I am new to CF. The submission result alarms me each time, as my logic works alright in IDE, but here it says it's an error
 » 21 month(s) ago, # |   -23 Tough!
 » 21 month(s) ago, # |   -21 Hardest contest I had participated so far
•  » » 21 month(s) ago, # ^ |   -13 Seriously why this tough !! :(
 » 21 month(s) ago, # |   +38 What is TC9 in E ?
•  » » 21 month(s) ago, # ^ |   -10 Mostly, it will fail if you use atan2.
•  » » » 21 month(s) ago, # ^ |   -8 Why? atan2 is a cpp function. Isn't that supposed to work correctly?
•  » » » » 21 month(s) ago, # ^ |   0 Precision error is too big to even considering passing it.
•  » » » » » 21 month(s) ago, # ^ |   0 It is interesting that even atan2l which uses Long Double has not enough precision to pass...
•  » » » 21 month(s) ago, # ^ |   +36 Hm, somehow my atan2 passed system tests...
•  » » » » 21 month(s) ago, # ^ |   0 Same here. I used long double-ed atan2 function and it passed. Somebody please hack my solution if you can.
 » 21 month(s) ago, # |   -11 What is the idea to solve B other than segment tree?
•  » » 21 month(s) ago, # ^ |   +19 How can It be solved using segment tree?
•  » » » 21 month(s) ago, # ^ |   0 I don't know efficiently count every subsequence how many number bigger than x, or lower than x but discard that for next subsequence, so I calculate from segment tree 0 to x, or x to 1e6
•  » » 21 month(s) ago, # ^ |   +7 Use prefix sums instead of segment tree.
•  » » 21 month(s) ago, # ^ |   +5 If a subsequence already has an ascent, add n. If not, add (# of subsequences that have an ascent) and all subsequences that have a max value greater than this subsequence's min value (and do not have an ascent). To do this query fast, I used a suffix array from 1 to 1e6 for suffix[i] = number of sequences with max_value >= i that do not have an ascent.
•  » » » 21 month(s) ago, # ^ |   0 ah, I just realize why suffix or prefix is good enough thanks!
•  » » » 21 month(s) ago, # ^ |   0 I implemented exact this approach, what's wrong with my submission 68210144? I got WA on testcase 21.
•  » » 21 month(s) ago, # ^ |   +3 Binary search?
•  » » » 21 month(s) ago, # ^ |   0 yupp, I also used binary search to solve B.
•  » » 21 month(s) ago, # ^ |   0 binary search works
•  » » 21 month(s) ago, # ^ |   0 with binary search
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +2 First, count the sequences already with an ascent (let there be asc of them) and discard them. Then interpret all remaining sequences as line segments (from their min value to their max value), create 2 events (start and end) for every one, and sort them. Use that to count how many segments start after the current segment ends for every segment and sum these numbers, i.e. find the number of non-overlapping segments, and use that to find the number of overlapping segments (m*m - non_overlapping_count where m is the number of remaining segments). The answer is m*m-non_overlapping_count + 2*n*asc - asc*asc (add pairs of sequences where at least one already has an ascent, and subtract those where both do).
•  » » 21 month(s) ago, # ^ |   +1 So, there can be two types of valid concat. One is ascents exists in either the s_x or in s_y, second is smaller element exists in s_x and greater element exist in s_y.So if we find an array where we got a ascent, we can pair it with all arrays. Now, we will count how many subarrays of type two exist. for each array which doesn't contain any ascent, you can pair this with such type of array where the maximum element is greater than the minimum element of the current array.
•  » » 21 month(s) ago, # ^ |   0 Find min, max of each sequence — store that (no need to store the entire list) Store how many numbers are greater than and less than each min/max in an array (doesn't need segment tree) If a sequence is already sorted, maintain a count of that and don't count its min/max. This is because this sequence concatenation will always result in a desired sequence For each sequence, check how many min's its max is greater than. Add that to total. Note that a sequence can be concatenated with itself (so make sure that's not double counted) 68188241
•  » » 21 month(s) ago, # ^ |   0 Why so many downvotes? My solution is accepted using segment tree, but I'm sure it should be not the intended solution. That's why I'm asking here
 » 21 month(s) ago, # |   +33 Good contest, thanks!
 » 21 month(s) ago, # |   +15 How to solve D?
•  » » 21 month(s) ago, # ^ |   +3 Instead of checking subets, check only pairs.
•  » » » 21 month(s) ago, # ^ |   +30 I got that, but how to even check that in the required time.
•  » » » » 21 month(s) ago, # ^ | ← Rev. 5 →   0 Let's denote first range as $[a_i, b_i]$, and second range as $[c_i, d_i]$. Sort by a, add all $[c_j, d_j]$ where $b_j < a_i$ into some data structure(You can use BIT). Now check if there is intersection with segment $[c_i, d_i]$ with BIT(Don't forget case when your segment fully lies inside another segment).
•  » » » 21 month(s) ago, # ^ |   0 I tried this, however, got WA on pretest 8:- sorting intervals of one venue with storing index with also. then computed $max$ and $min$ suffixes on intervals of second venue, however, made with indexes after sorting the first one. then applied two-pointer, — on 2 intervals such they don't collide then all the intervals behind the latter interval won't collide with former and we have to check if the corresponding interval of former interval in the second venue will collide in with all the corresponding intervals behind the latter.
•  » » 21 month(s) ago, # ^ |   +37 My idea was the following.Suppose you have a graph for each venue. Vertices are the intervals, we connect them only if they don’t intersect. The problem asks if those two graphs are equal. The size of each graph is quadratic, so you can’t just create them and compare. My idea was to make the hash of each graph and compare them. For each vertex you can get the sum of its neighbors indices multiplied by some power of 2s .You can check out the hashing method in more details in my solution.Did anyone else solve the same way with hashing?
•  » » » 21 month(s) ago, # ^ | ← Rev. 3 →   +6 I check all intervals that start after the current one and all intervals that finish before the current one on both sets and check that their hashes are equal. Hashes are xor of random 64 bit numbers assigned to each interval.Update: Idea was correct, there was a bug in the code
•  » » » » 21 month(s) ago, # ^ |   +5 I tried the same hash. Got WA on test 16.
•  » » » » 21 month(s) ago, # ^ |   0 I did the same, but instead of using xor, I used multiplication on Zp for large prime p (1000000007)
•  » » » 21 month(s) ago, # ^ |   0 I also used hash, but I wonder if there are other ways to solve it (deterministic, also easier to implement.)
•  » » » » 21 month(s) ago, # ^ |   0 68193999 2 segments [u,v] and [x, y] are NOT intersecting if either y < u or v < x. With the use of multisets, you can bulk check if a segment is NOT intersecting with any of many other segments. This will take O(logN) time. Do this for each segment and you get O(NlogN) time. I saw many solutions with segment trees, this one uses only STL.
•  » » » 21 month(s) ago, # ^ |   0 I solve it with hashing too, but way different that what you are doing. I hash for every element the set of neighbors and compare each pair of sets.
•  » » » 21 month(s) ago, # ^ |   0 For each vertex you can get the sum of its neighbors indices multiplied by some power of 2s How do you do that if it's a complete graph?
•  » » » » 21 month(s) ago, # ^ |   0 Sort based on left coordinate and use suffix sums. Then do the symmetric procedure with reversing the segments.
•  » » 21 month(s) ago, # ^ |   0 In D, I figured out one observation, say intervals at the same indices at venue A and venue B must have the same number of overlapping intervals. This is a necessary condition and we can also easily prove by induction that it is sufficient condition as well. Now the task is to calculate the number of overlapping intervals for each index which can be easily calculated using sorting.
•  » » » 21 month(s) ago, # ^ |   0 Interesting. I realized it was necessary but it wasn't evident to me that it was sufficient
•  » » » » 21 month(s) ago, # ^ |   0 It is sufficient when n=2, Now say it is sufficient for n=k(Somehow we figured out the number of overlapping intervals for each index), For n=k+1 if we have updated counts and result for n=k we can easily update it for n=k+1, Hence It is sufficient.
•  » » » 21 month(s) ago, # ^ |   +11 Umm, no. That is not sufficient. I am not sure how this passed, I have hacked your solution :). Poor test data?Here's a counter case: 4 1 5 1 5 2 8 7 10 7 10 2 8 9 20 9 20 
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Yes , the test cases are very weak for D
•  » » » » 21 month(s) ago, # ^ |   0 Oh gosh! I am lucky. :P
 » 21 month(s) ago, # |   +36 How to solve E?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +16 Let K be the sum of the points lying inside each triangle. The answer is: K * (N-4) / 2;
•  » » » 21 month(s) ago, # ^ |   +35 How to calculate K?
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 For each triangle, calculate the number of points in it. To do this, we calculate for each segment the number of points under it. Now we can calculate the number of points in the triangle for $O (1)$, we just need to analyze the cases.And don't forget about pragmas.
•  » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   -17 I thought there's some cleaner logic to compute this. But I guess it's easier if one already has that code for some other task sitting in their computer and pastes it straight away.
•  » » » » » » 21 month(s) ago, # ^ |   0 What about not computing K? xd
•  » » » » » » 21 month(s) ago, # ^ |   +90 I didn't use any prewritten code and it took me 15 minutes to solve this problem. Learn how to solve geometry problems instead of complaining.
•  » » » » » » 21 month(s) ago, # ^ |   -13 I think further simplification might make this easier.Instead of calculating no of points inside every triangle, we can just subtract no of convex quadrilaterals, which then gives;- $K = \binom{n}{4}- num of line segment intersections$Since diagonals of convex quadrilaterals intersect.I think line segment intersections is a well known problem. However, I didn't have sufficient time left to code it during the contest, so the formula is unverified, please let me know if there are any mistakes.
•  » » » » » » » 21 month(s) ago, # ^ |   0 How were you considering computing the number of segment intersections?
•  » » » » » » » » 21 month(s) ago, # ^ |   0 Ah, my bad. I thought Bentley ottoman would work fine, didn't remember about the no of intersections being in complexity.
•  » » » » 21 month(s) ago, # ^ |   +5 Fix the point which lies inside. make it center and sort the rest of the points ccw wrt the center. Now we can count the number of triangles using prefix sums of number of points that give positive cross product for each point.
•  » » » » 21 month(s) ago, # ^ | ← Rev. 3 →   +34 Goal : A point $p$ and a set of $N$ points $S$ are given. We want to compute the number of triangles containing $p$.We can easily know that the answer is "$N \times (N-1) \times (N-2)/6$ — (the number of triangles which do NOT contain $p$)". If the triangle $s_1 s_2 s_3$ does not contain $p$, then there is a straight line $l$ that splits $p$ and three points $s_1$, $s_2$ and $s_3$. Thus, we can design the algorithm below: Consider the line $l$, which passes the point $p$. Rotate $l$ about $p$. When $l$ touches a point of $S$, compute the number of points that are on the left side of $l$. Let $k$ be the number, then add $(k-1) \times (k-2)/2$ to the answer. Do the step 2. to 4. until $l$ is rotated by 360 deg. The naive algorithm is $O(N^2)$. But you can do it in $O(N lgN)$ with sorting points $S$ about $p$ — something like ccw-sortNow, whole the problem can be solved. Just do the steps above about all the $N$ points. The time complexity is $O(N^2 lgN)$.
 » 21 month(s) ago, # |   +41 Problem C was very nice.
•  » » 21 month(s) ago, # ^ |   +6 How to solve C? TIA
•  » » » 21 month(s) ago, # ^ |   +7 We can rewrite the sum as, in how many permutations, subarray with size k exists. Then we can sum these values from k = 1 to n. This technique can be called as contribution sum technique.Now, notice that, for a fixed k length, there can be n — k + 1 choices for min and max element. And there can be n — k + 1 subarrays in an n size permutation. So we can permute k elements in fact(k) ways, and other n — k elements as f[n — k] ways.So ways(k) = (n — k + 1) * (n — k + 1) * fact(k) * fact(n — k)
•  » » » » 21 month(s) ago, # ^ |   0 Can you explain better on why is there (n-k+1) choices for min and max and (n-k+1) subarrays in an n size permutation?
•  » » » » » 21 month(s) ago, # ^ |   0 k is the length of the sub-permutation, there are n-k+1 positions where it can start.
•  » » » » » » 21 month(s) ago, # ^ |   0 So It should not be k! * (n-k)! * (n-k+1)as k numbers can be permute in k! and it can be placed in (n-k+1) position of (n-k)! possible permutation of (n-k) numbers
•  » » » » » » » 21 month(s) ago, # ^ |   0 This n-k+1 is there twice. Once it is the number of positions where a subseq of len k can start. Second it is the number of possible smallest numbers of this subsequence.So you multiply that twice, and once with (n-k)!.Adding up for all possible k is answer.
•  » » » » » » » » 21 month(s) ago, # ^ |   0 got it !! thanx
•  » » » » 21 month(s) ago, # ^ |   0 I didn't get this part Now, notice that, for a fixed k length, there can be n — k + 1 choices for min and max elementfor eg : n = 5 [1,2,3,4,5] and k = 2 . I can have total 4 sub-arrays of size 2 . But how to count valid sub-arrays of size k in any permutation ?
•  » » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 min and max with difference k — 1.
•  » » 21 month(s) ago, # ^ |   -32 What was nice about it? :)
•  » » » 21 month(s) ago, # ^ |   +25 It was nice to me. :|
 » 21 month(s) ago, # |   +2 F: It is always possible to achieve a perfect matching. Proof using hall's theorem.Call the initial set of edges in $T_1$ original edges. Iterate on edges $(u, v)$ of $T_2$ and find any original edge $(a, b)$ in $T_1$ on the path between $u$ and $v$ (there will always exist an original edge, otherwise we have a cycle in $T_2$). Cut $(a, b)$ from $T_1$ and link $(u, v)$. We can use hall's theorem to prove a perfect matching among unmatched edges.Can we solve this problem without LCT?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   -10 Yes. Try to find constructive proof not using Hall.
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +18 My solution (pending systests) doesn't use a LCT (or something similar). My solution was to find an edge $(u, v)$ in $T_2$ such that $u$ is a leaf. Let $w$ be the first neighbour of $u$ in $T_1$ on the path from $u$ to $v$ (in $T_1$). Then we print $(u, w)\in T_1$ and $(u, v)\in T_2$, remove $(u, v)$ from $T_2$ and contract the edge $(u, w)$ in $T_1$. One can prove the resulting graphs are trees on $n-1$ vertices, correctness follows inductively. The contraction operation requires some careful bookkeeping with vectors/sets, but ultimately doesn't require anything fancy.
•  » » » 21 month(s) ago, # ^ |   0 Nice!
 » 21 month(s) ago, # |   -8 D was interesting to me ^^. Could you guys show your solution to this problem?
•  » » 21 month(s) ago, # ^ |   0 The main idea is check venue-sensitive set with size 2For each lecture, check if the list of lectures that intersect with it in venue $a$ is the same as the list of lectures that intersect with it in venue $b$Instead of comparing each element in two list, we'll check does any element that appear in this list but doesn't appear in the other list
 » 21 month(s) ago, # |   +11 What was the trick for C? So many people solved it, I haven't even got any idea how to solve it.
•  » » 21 month(s) ago, # ^ | ← Rev. 3 →   +1 for length k permutations, the sum is (n-k+1) * (n-k+1) * k! * (n-k)!eg n=4,k=2we have 12 23 34 (4-2+1 kinds)and for 12, it has 2! permutationsthe numbers left are 34, has (4-2)! permutationswe want to put 12 into ()3()4() , which have (4-2+1 blanks)
•  » » » 21 month(s) ago, # ^ |   0 Why we are multiplying by extra (n-k+1) ?If we consider k numbers then they can permuted in k! manner and can be placed in (n-k+1) position. So k! * (n-k+1) and rest (n-k) numbers can be permuted in (n-k)! mannerSo in total k! * (n-k+1) * (n-k)!
•  » » » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 k numbers could be 1~k, 2~k+1, 3~k+2, total n-k+1 kinds
 » 21 month(s) ago, # |   +38 I made a big strategic mistake :(
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +9 It is almost always not the right idea to start with the harder problems. Here is the explanation: It is more probable that you will get the easier problem quickly and harder problem will take more time. Submitting earlier ensures that you don't accumulate the penalty for the easier problems. Even in a simple scenario where you solve A in 3 minutes and E in 30 minutes, your penalty is 3 + 33 = 36 minutes. If you solve A later, you penalty for A is 33 minutes and so the total penalty is 63 minutes. I don't exactly know about how scoring works, but at least in the time penalty approach you can see how worse it can be to not solve an easier problem.
 » 21 month(s) ago, # |   0 In task D, why the answer for test case 3 is "YES"? We can attend 1 and 3 at A (1-2 and 3-7), but can't attend at B (5-9 and 6-11)
•  » » 21 month(s) ago, # ^ |   0 Your input format is a bit messed up — You cannot attend 1 and 3 at A (1-5/3-6) nor can you attend 1 and 3 at B (2-9/7-11)
•  » » » 21 month(s) ago, # ^ |   0 Oh, really, i thought format was sa, sb, ea, eb. Thank you
•  » » 21 month(s) ago, # ^ |   0 1 and 3 are 1-5 , 3-6 at A and 2-9 , 7-11 at B so we can't attend at A and neither at B
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 in A starts at time 1 and ends at 5. The times are ordered as start A, end A, start B, end B
 » 21 month(s) ago, # |   0 The difficulty of problemset was high a bit for me, but it was good problemset.
 » 21 month(s) ago, # |   +6 How to solve C?
•  » » 21 month(s) ago, # ^ |   +18 $\sum_{i=0}^{n} {(n - i)! * (n - i) * (i + 1)!}$
•  » » » 21 month(s) ago, # ^ | ← Rev. 2 →   -17 .
•  » » » 21 month(s) ago, # ^ |   +1 Can you explain, please?
 » 21 month(s) ago, # |   +11 Can anyone explain me solution of Problem C I wasn't able to find any pattern in answers neither I was able to think of any dp approach
•  » » 21 month(s) ago, # ^ |   +7 Let'x fix length of good segment, there is (n — len + 1) ways to choose starting number, (n — len + 1) ways to place those numbers, len! ways to permute those len numbers, (n-len)! ways to permute remaining numbers.
 » 21 month(s) ago, # | ← Rev. 2 →   +5 In problem D I created 2 segment tree one for a and one for bThen in each query I check if all cells between xa and ya is empty and if it true I mark in array that he can attend this lecture and make update query and makes all this cells occupied, (the same with xb, yb).at the end iterate over the attended array and if there is attended1 != attended2 I print Noif all have the same values I print Yes.I got Wa on test 17, anyone know why ?
 » 21 month(s) ago, # |   +85 E is a very interesting and original problem. The best problem of the decade
•  » » 21 month(s) ago, # ^ |   +23 Most geometry problems are like that.
•  » » 21 month(s) ago, # ^ |   0 Actually, it was very similar to problem D of Argentinian Programming Tournament 2019
•  » » 21 month(s) ago, # ^ |   0 But decade has just begin and it is the first contest.
 » 21 month(s) ago, # |   -25 how can I implement this for problem c: t=0 for (i=0;i
•  » » 21 month(s) ago, # ^ |   +6 Pre-compute factorials from 1 to n before implementing this loop.
•  » » » 21 month(s) ago, # ^ |   -8 ok now I feel stupid :(
 » 21 month(s) ago, # |   0 How to solve B ?
 » 21 month(s) ago, # | ← Rev. 3 →   -9 A-D were trivial, F and G too hard so I was stuck solving the geometry problem for a hour and a half. And of course as is usual with geometry problems, of that around 15 minutes was spent solving the problem, then the rest trying to fix case handling to avoid double-counting and issues with angles. Why did I even try?Could we please leave geometry to ICPC and have good problems in contests instead? :)EDIT: 180 lines and FIVE Fenwick trees later I think I'm done debugging.EDIT2: And my code for sorting by angle was too slow. After lots of constant optimisation of a $\mathcal{O}(n^{2} \log n)$ solution I finally got AC (68205536)
•  » » 21 month(s) ago, # ^ |   +32 My E is about 40~50 lines...
 » 21 month(s) ago, # |   +13 H2S E?
 » 21 month(s) ago, # |   +83 As the long and detailed header of my submission for problem F might suggest, I already knew problem F. I wanted to propose it as part of an online contest.I am happy about the rating boost I will get, but I am sad that I cannot use in a future contest the best problem I had ever invented. At least I have participated in the round, otherwise there would be only the sad part.
 » 21 month(s) ago, # |   +11 We are all waiting for the solutions ^^
 » 21 month(s) ago, # |   +6 How to solve E, I spend 1.5 hours but no idea. May be I only NEED 2 more points,then I can become CM:(
•  » » 21 month(s) ago, # ^ |   0 Sadly.... I need 92 more points.Because I got FST on problem D.
 » 21 month(s) ago, # |   -8 How do you solve C? My approach: write a stupid solution, get a table for small values of n <= 11, try to find a pattern. Unfortunately, both OEIS and me trying to figure out the pattern failed. How do you solve it then?
 » 21 month(s) ago, # |   +62 hello 2020 & goodbye rating again
 » 21 month(s) ago, # |   +24 Here's a cool reduction I made for $E$:Claim: Find the sum of number of points in all possible triangles in the given set. Divide this by $2$ and multiply by $n-4$, that's the answer.Proof: For any castle of $4$ points and a point $P$ which lies inside it, consider all the $4$ triangles made by taking the castle points $3$ at a time. Out of these $4$ triangles, $P$ will lie in exactly $2$ of them. Conversely, consider any triangle and any point $P$ lying inside it. If you add any of the other $n-4$ points to make the triangle into a quadrilateral, you will get a valid castle of the triangle points and this new point which will protect $P$.Thus, we have proven a two-one bijection between these two quantities.Now, if you could find the sum of number of points lying inside each triangle in $O(n^2)$, you have solved the problem!
•  » » 21 month(s) ago, # ^ |   0 cooooooool
•  » » 21 month(s) ago, # ^ |   0 I saw a few solution for E above, but this is the best written solution. Kudos and thanks!!!!
 » 21 month(s) ago, # |   0 How to get the editorial?
 » 21 month(s) ago, # | ← Rev. 3 →   -11 Is E about finding how many Concave (or) Convex Pentagons can be formed from N points? If so, then how?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 Almost. Let $f_n = (\text{number of pentagons with n points on convex hull})$. Answer is $f_3*2+f_4$. We know that $f_3+f_4+f_5 = \binom{n}{5}$. In my solution i found $f_3*3+f_4*4+f_5*5 = \sum_{i\neq j} \binom{\text{number of point p having }(a[i]-p)\times (a[j]-a[i])>0}{3}$. $f_3*2+f_4 = (f_3+f_4+f_5)*5 - (f_3*3+f_4*4+f_5*5)$. Finding $f_5$ is $\mathcal{O}(n^3)$ problem. 1146H - Satanic Panic
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +8 You haven't to do it. Consider a tuple of 5 points, the contribution of this tuple to answer is ((number of lines can split plane to 2 halfplanes and a half has 1 point, another one has 2 points) — 5). It is easier to solve base on the above observation.
 » 21 month(s) ago, # | ← Rev. 3 →   -8 Damnit, slightly late with F... if I'm not completely wrong. My idea is: consider paths in T1 corresponding to edges in T2 augmenting paths imply that if we create subtrees from them by merging overlapping (on edges) paths, then in each such subtree, there's either no unmatched path (edge in T2) or no unmatched edge in T1 this works for any graph T2, but T2 is a tree, so it should cover at most as many edges in T1 as its own number of edges — there must be no unmatched edge in T1 and the max. matching is equal to the number of edges covered by the paths (which is N-1 because they have the same size) we can proceed with simple DFS in T2 and for each edge (v, leaf), try to find the first edge in T1 on the path leaf->v that's unmatched and take this edge UPD: Yep, it works.
 » 21 month(s) ago, # |   +8 I had a noob bug at F, but I want to know can flow pass this problem ?
•  » » 21 month(s) ago, # ^ |   +10 Not intended, but one participant managed to squeeze it with push-relabel flow (We failed)
 » 21 month(s) ago, # |   +34 I love this problem set(especially, F&G), thank you problem setters!
•  » » 21 month(s) ago, # ^ |   +10 Thank you very much!
 » 21 month(s) ago, # |   0 I derived the formula for C with probability and found Expected number of framed segments with length i.
•  » » 21 month(s) ago, # ^ |   0 you could calculate for a given segment beginning at l with the length of t, in how many permutations this segment is framed? and then add all of the results for all possible _t_s by a for loop
 » 21 month(s) ago, # |   +30 Why geometry problem...
 » 21 month(s) ago, # |   -8 In E, if I manage to find for every point P:$a$ $-$ the number of points in the upper left side of P$b$ $-$ the number of points in the upper right side of P$c$ $-$ the number of points in the lower left side of P$d$ $-$ the number of points in the lower right side of PWon't the answer for point P be the sum of:$cnk(a + b,i)$ $*$ $cnk(c + d,4 - i)$$- cnk(a,i) * cnk(c,4 - i)$$-$ $cnk(b,i)$ $*$ $cnk(d,4 - i)$for every $1<=i<=3$ ?
•  » » 21 month(s) ago, # ^ |   +13 P = 0 0Points:1 13 11 2-2 -1-1 -10000
 » 21 month(s) ago, # |   +6 I just realize E's polygon is NOT necessary convex...
 » 21 month(s) ago, # | ← Rev. 3 →   +8 In problem G, the checker told me that I must place a wall between rock cells. However, I couldn't find the statement which specifies that point.Did I overlook something? Or was the statement incomplete?
•  » » 21 month(s) ago, # ^ |   +21 How to solve G?
•  » » » 21 month(s) ago, # ^ |   +23 It's unweighted matroid intersection. The universe is the set of all edges in the graph, and we'll try to remove as many edges from the graph as possible. We intersect two matroids: A cographic matroid (a set of edges belongs to the matroid iff we can erase this set without disconnecting the graph), A matroid limiting the number of edges incident to each black cell. In other words, the edges are partitioned into disjoint subsets, and each subset has the upper bound on the number of edges taken to the set. Fortunately, each edge belongs to only one subset, so this is easily a matroid (as a sum of disjoint uniform matroids). We then find the largest set belonging to the intersection. If you found enough edges to make the graph a tree, the answer is YES.
•  » » » » 21 month(s) ago, # ^ |   0 What's test 77 in G?
•  » » » » » 21 month(s) ago, # ^ |   0 Some anti-random cases.
•  » » » » » 21 month(s) ago, # ^ |   0 We used a bunch of hill-climbing to kill random solutions of G. kriii spent several days for preparing awesome tests of G. I think he will have a lot to talk about ;)
•  » » » » 21 month(s) ago, # ^ |   +4 Yesterday matroid intersection blog came up in the CF feed, and I decided to read it. After 15 min I thought "come on, what is the chance that I will ever encounter such an unusual construct" and gave up on it...
•  » » » 21 month(s) ago, # ^ |   +8 The problem is equivalent to finding a tree over the free cells such that all the leaves are white or (1,1). This can be seen as a matroid intersection. The two matroids to intersect are: Independent sets are sets of edges (pair of neighbouring free cells) without a cycle. Independent sets are sets of edges (pair of neighbouring free cells) such that any black cell different from (1,1) is contained in at most one such pair. [Not sure it is correct, since I was not able to code it]
 » 21 month(s) ago, # |   -29 more like Hello WW3
 » 21 month(s) ago, # | ← Rev. 4 →   0 Once again he showed who is the real boss (respect you 3000).
 » 21 month(s) ago, # |   -9 I want WWIII to begin before I become a newbie
 » 21 month(s) ago, # |   0 How to solve D? I was thinking at hashing the intersections after you sort the intervals as you would when you want to calculate the maximum number of intervals overlapping (put both start and end points in a vector and sort). Does this lead to anything? Is there a nicer solution?
•  » » 21 month(s) ago, # ^ |   0 Yes, it works. You can hash random weights for it to work better. I just xored all weights of intervals not intersecting with a specific one. This can be done by using 4 maps.
•  » » 21 month(s) ago, # ^ | ← Rev. 10 →   0 Yes, I solved it like this. We need to check for each interval i if its set of intersecting intervals is equal in both the graphs. We compare two sets by considering hashing a set ${a_1, a_2, \ldots}$ to a polynomial $p(x) = x^{a_1} + x^{a_2} + \ldots$. Then we can evaluate it at random points and check equality. The degree of the polynomial is $n$ so if you use a mod around $10^9$ the probability of failure is $10^{-4}$ by Schwartz-Zippel if you evaluate at a single point. I evaluate at four points for probability $10^{-16}$.68192135
 » 21 month(s) ago, # |   +31 Instead of "No subtasks!" you guys should mention "No Geometry!".
 » 21 month(s) ago, # |   +21 Gotta feel bad for tourist. TLE on Test 77 of G.
 » 21 month(s) ago, # | ← Rev. 2 →   +22 Thanks a lot for the round!My screencast, mostly trying to squeeze in incorrect solutions for F and G without much success :)
 » 21 month(s) ago, # |   +19 Good move ! by Retired_MiFaFaOvO ...Now , he will be the rank 1 ...
 » 21 month(s) ago, # |   +6 when will the virtual participation for this round start?
 » 21 month(s) ago, # | ← Rev. 2 →   +70 My randomised sol for D passed:If there exists a pair of segments which intersects in one of the events and not the other then answer is NO. So each segment has to intersect with the same exact other segments in each events. This implies that for any subset the number of intersections in each event has to be the same.So here's what I did: Take a random subset (50% chance of a segment being in it). Count number of intersections if Event A was chose, and same for Event B. If the number of intersections is diff output NO, otherwise repeat again with a diff subset(for 50 iterations). To count number of intersections, i sorted segment by left endpoint, then used binary search on each element.
•  » » 21 month(s) ago, # ^ |   +19 I reckon your power came from your new handle
 » 21 month(s) ago, # |   -13 i have a questionwhere can i read editorial!
 » 21 month(s) ago, # |   +83 Systests have been completed and upsolving is still unavailable. What's wrong?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   -9 System testing is at 100%.
 » 21 month(s) ago, # |   -86 왜 한글이 없나... 과연 어캐ㅔ 될까요
•  » » 21 month(s) ago, # ^ |   -12 It is because foreigners can't read Hangul.
 » 21 month(s) ago, # | ← Rev. 2 →   0 How to solve B ? Please explain someone....
 » 21 month(s) ago, # | ← Rev. 2 →   +7 I have a technical question.After this round I will become candidate master. but before my rating changes I registered for round 612 div2. Now... if I participate in it, will it be rated for me?
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   0 I don't think you will be able to participate for div2. If you become candidate master then you will have to register for div1, once the rating calculation is done.
 » 21 month(s) ago, # |   +17 And it's a moment right after contest. AND... Where is the editorial?)
•  » » 21 month(s) ago, # ^ |   0 It's because G is being rejudged.
 » 21 month(s) ago, # |   +6 Did they just rejudge G?
 » 21 month(s) ago, # |   0 i don't understand why test 3 in task B have output is 72. Can you explain for me !.
•  » » 21 month(s) ago, # ^ |   0 My output is 74.
•  » » » 21 month(s) ago, # ^ |   0 How are you counting?
•  » » » 21 month(s) ago, # ^ |   0 Try this. 2 2 1 2 2 3 4 if you are getting 6 instead of 4. Then you might be counting 1 2 3 4 and 3 4 1 2 twice.
•  » » 21 month(s) ago, # ^ |   0 I'm pretty sure that the test case is large enough that there is no good explanation that is not along the lines of "because this solution, proven correct, returns 72" or "if you look at the list of all concatenations and count those with an ascent, you get 72" here.
•  » » 21 month(s) ago, # ^ |   0 try: 2 2 1 3 2 2 4 
•  » » 21 month(s) ago, # ^ |   +3 In case it helps, check the output of this verbose brute-force solution. Brute-Force Solutiondef hasascent(L): for i in range(1, len(L)): if L[i - 1] < L[i]: return True return False # Read the input n = int(input()) A = [ list(map(int, input().split()))[1:] for i in range(n) ] # Brute force the answer answer = 0 for i in range(n): for j in range(n): T = A[i] + A[j] if hasascent(T): answer += 1 print(i, j, T) print(answer)  Output0 0 [62, 24, 39, 62, 24, 39] 0 1 [62, 24, 39, 17] 0 2 [62, 24, 39, 99] 0 3 [62, 24, 39, 60] 0 4 [62, 24, 39, 64] 0 5 [62, 24, 39, 30] 0 6 [62, 24, 39, 79, 29] 0 7 [62, 24, 39, 20, 73] 0 8 [62, 24, 39, 85, 37] 0 9 [62, 24, 39, 100] 1 0 [17, 62, 24, 39] 1 2 [17, 99] 1 3 [17, 60] 1 4 [17, 64] 1 5 [17, 30] 1 6 [17, 79, 29] 1 7 [17, 20, 73] 1 8 [17, 85, 37] 1 9 [17, 100] 2 0 [99, 62, 24, 39] 2 7 [99, 20, 73] 2 9 [99, 100] 3 0 [60, 62, 24, 39] 3 2 [60, 99] 3 4 [60, 64] 3 6 [60, 79, 29] 3 7 [60, 20, 73] 3 8 [60, 85, 37] 3 9 [60, 100] 4 0 [64, 62, 24, 39] 4 2 [64, 99] 4 6 [64, 79, 29] 4 7 [64, 20, 73] 4 8 [64, 85, 37] 4 9 [64, 100] 5 0 [30, 62, 24, 39] 5 2 [30, 99] 5 3 [30, 60] 5 4 [30, 64] 5 6 [30, 79, 29] 5 7 [30, 20, 73] 5 8 [30, 85, 37] 5 9 [30, 100] 6 0 [79, 29, 62, 24, 39] 6 2 [79, 29, 99] 6 3 [79, 29, 60] 6 4 [79, 29, 64] 6 5 [79, 29, 30] 6 6 [79, 29, 79, 29] 6 7 [79, 29, 20, 73] 6 8 [79, 29, 85, 37] 6 9 [79, 29, 100] 7 0 [20, 73, 62, 24, 39] 7 1 [20, 73, 17] 7 2 [20, 73, 99] 7 3 [20, 73, 60] 7 4 [20, 73, 64] 7 5 [20, 73, 30] 7 6 [20, 73, 79, 29] 7 7 [20, 73, 20, 73] 7 8 [20, 73, 85, 37] 7 9 [20, 73, 100] 8 0 [85, 37, 62, 24, 39] 8 2 [85, 37, 99] 8 3 [85, 37, 60] 8 4 [85, 37, 64] 8 6 [85, 37, 79, 29] 8 7 [85, 37, 20, 73] 8 8 [85, 37, 85, 37] 8 9 [85, 37, 100] 9 0 [100, 62, 24, 39] 9 7 [100, 20, 73] 72 
•  » » 21 month(s) ago, # ^ |   0 1 with all 102 with 9 (except 2)3 with 3(1,8,10)4 with 7(except 2,4,6)5 with 6(except 2,4,5,6)6 with 8(except 6,2)7 with 9(except 2)8 with all 109 with 8(except 2,6)10 with 2(1,8)total 72
 » 21 month(s) ago, # | ← Rev. 2 →   0 Does anyone know how to analyse the complexity of network flow(the number of edges can be $O(n\log n)$) in F？
•  » » 21 month(s) ago, # ^ | ← Rev. 2 →   +2 There can be $\Theta(n^2)$ edges in the matching graph of F.EDIT: Consider $T_1$ the path with vertices $(1,2), (2,3), (3, 4), \dots$, and $T_2$ a path with edges $(1, n), (n, 2), (2, n-1), \dots$. Then the $i^{th}$ edge of $T_2$ covers $n-i$ edges of $T_1$, giving the matching graph $\Theta(n^2)$ edges.
•  » » » 21 month(s) ago, # ^ |   0 The number of edges can be $O(n\log n)$ using some optimization.
•  » » 21 month(s) ago, # ^ |   0 It's $O(n\sqrt{n}\log{n})$.For proof take a look at the editorial of this PrinceOfPersia's problem: ALT
 » 21 month(s) ago, # |   +5 I have a query : If a participant registers for a Div. 2 contest before rating change, and then enters Div. 1 after rating change, will Div. 2 be rated for him/her or do they require to re — register or something like that?
 » 21 month(s) ago, # |   0 I think solutions for problem G are rejudged.
 » 21 month(s) ago, # |   -24 Just solved D with a 2D segment tree (more like a Dynamic segment tree + fenwick tree ) !https://codeforces.com/contest/1284/submission/68203222
 » 21 month(s) ago, # |   +89 found this in tourist's code lol
•  » » 21 month(s) ago, # ^ |   0 what does it mean??
 » 21 month(s) ago, # |   +39 "Strong testcases on problem D.." xDCheck this out -> Problem D: 68195434
•  » » 21 month(s) ago, # ^ |   +3 Now they are a little stronger
•  » » 21 month(s) ago, # ^ |   0 this works pog
 » 21 month(s) ago, # | ← Rev. 2 →   +6 gamegame will win IOI2020!
 » 21 month(s) ago, # | ← Rev. 3 →   -8 Hi Guys,In the problem E, very very high precision is needed. Can anyone calculate?(or explain)In 68214305 24 digits of PI couldn't pass.But 68214338 using cos(-1.0) (more than 30 digits precision) is accepted.Regarding the limits (and no three point collinear), how is it possible?Note: M_PI gets compile error(not in my PC tho)... Purely correct submission(in 70 min left) would be AC if it could compile T-TNote2: arctan(1/1e9) is like 1e-10 different than the actual PI, soo 1e-24... how???
•  » » 21 month(s) ago, # ^ |   0 Don't use doubles to check on which side of a line a point lies (or to sort rays with common origin by angle, which is roughly equivalent). Use cross product instead
 » 21 month(s) ago, # |   0 problem D is too difficult to understand the request
 » 21 month(s) ago, # |   0 Can anyone please explain why my code for D is getting TLE? https://codeforces.com/contest/1284/submission/68243271
 » 21 month(s) ago, # |   0 I implemented B according to editorial in java, can anybody tell what is wrong with my code. https://codeforces.com/contest/1284/submission/68318055
 » 21 month(s) ago, # |   -10 One time I can be red °^°
 » 17 months ago, # |   0 So good. emm... However, I am still UNRATED! OMG!