| # | User | Rating |
|---|---|---|
| 1 | Benq | 3857 |
| 2 | jiangly | 3810 |
| 3 | maroonrk | 3534 |
| 4 | tourist | 3528 |
| 5 | Kevin114514 | 3510 |
| 6 | turmax | 3411 |
| 7 | Um_nik | 3387 |
| 8 | Radewoosh | 3367 |
| 9 | heuristica | 3322 |
| 10 | strapple | 3317 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | maspy | 150 |
| 3 | Um_nik | 146 |
| 4 | Errichto | 139 |
| 5 | adamant | 136 |
| 6 | maroonrk | 134 |
| 7 | DNR | 133 |
| 8 | Dominater069 | 131 |
| 9 | Proof_by_QED | 130 |
| 9 | AmShZ | 130 |
|
0
Can you tell me after how many minutes did it reflect in your submissions. It's been a while but I don't see any submission even though I submitted it twice. |
|
+7
Another way to think is that if there exists a pair that has a difference k, then it's always possible to do subtractions in some order because the relative difference between them is not going to change. |
|
+22
Also, it has become a trend to gain attention by relating 2 disjoint activities which has to be stopped. Otherwise that time is not far when we'll be seeing videos, "Art of proposing a girl by an IITian/NITian", "How I poop as a googler and you should too". |
|
+3
You are being too humble. It will easily cross 2100+ if you give 3-4 upcoming short contests. |
|
0
Yes, however going by constraint, you'll have to use dp. |
|
+5
Pick the maximum element and now the problem reduces to the even case and solving with respect to the Player 2 with slight modification on the basis of the index of maximum element. |
|
+3
https://atcoder.jp/contests/abc217/submissions/25610896 This is what I came up after the contest ended. I used deque and min heap. The idea is that whenever we have to do sorting, we move all the elements from deque to min heap. In this way, we don't have to do O(n*log(n)) for sorting rather just add elements to the heap in O(log(n)) time. When asked to add element, we add the elements in deque and while printing the front element, there will be 2 cases ->
|
|
0
Thanks! |
|
0
How to efficiently solve E ? I used priority queue but the method used by me gave TLE as expected. I was thinking of avoiding popping maximum and pushing max-1 to priority queue unless it becomes equal to the 2nd max. but could not implement it. |
|
+5
Obviously, the teams with rank 3212, 3208 etc. are qualified for regionals who managed to solved the easiest question with 7-9 penalties and that too after 1 hour. |
|
0
I saw it on Amritapuri website before the mock round but can not find such statement now. |
|
+7
Yeah, this rule is totally unfair to many teams for obvious reasons. |
|
+3
I get it why do you hate this country but I read your comment a few weeks back that you were still in 3rd year and willing to participate in ICPC Amritapuri prelims and here you are stating that you got a better job in Germany. It seems that you have deleted that comment. Proof — https://paste.pics/DCVHG |
|
0
I used 3 pointers approach. Sort all the three arrays, start from the beginning. If x[i] < x[j], then there are two possibilities i.e x[j] < x[k] then we get the valid triplet so increment the answer and all the pointers by 1, otherwise if x[j] > x[k], then we'll have to pickup a bigger element from the 3rd array so we increment k by 1. Similarly if x[i] > x[j], we'll have to pickup a bigger element from the 2nd array so we increment j by 1. Time Complexity of this method will be O(n*logn + n) = O(n*log(n)) as we are doing this in a single iteration after sorting all three arrays. Code |
|
+18
Benefits of upsolving XD |
|
+90
I have read several comments related to it by a user -is-this-fft- and I quote "cout.tie(NULL) does literally nothing because cout is already tied to NULL", "It sounds very strange when you consider what tie does. Every input or output stream in C++ is tied to an ostream or to null. Tyig cin to null means it's not tied to cout anymore which can speed things up. But cout is generally already tied to null." Link to the comments — https://codeforces.me/blog/entry/87419?#comment-756655, https://codeforces.me/blog/entry/83672?#comment-709924 |
|
+3
This was my approach during the contest. The first and last char should be 1 because if it is 0 at any of these positions then the string can't be complete {i.e they will look like (...( and (...) }. For the answer to exist, the count of 1 and 0 should be even (self explanatory) and the prefix sum in both the string should be >=0 at any index, if we give +1 for character being '1' and -1 for being '0' and total sum should be 0. (just like we do in checking balanced parenthesis). For finding the strings: For index with val = 1, put '(' for half the times and ')' for other half. {Eg- If the string is 11100111, then both the strings will be initialized by (((00))) } For index with val = 0, start with ( and alter for rest of the indices for the 1st string and for obtaining the 2nd string, start with ) and then alter. {Eg — If the string is 1001000011, then x = 1()1()()11, y = 1)(1)()(11 and one can be substituted by the above method } If you carefully observe, this procedure basically leads to prefix sum >= 0 at every index. |
| Name |
|---|


