| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3611 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | Radewoosh | 3415 |
| 8 | Um_nik | 3376 |
| 9 | maroonrk | 3361 |
| 10 | XVIII | 3345 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 162 |
| 2 | adamant | 148 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 143 |
| 5 | errorgorn | 141 |
| 6 | cry | 138 |
| 7 | Proof_by_QED | 136 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 10 | soullless | 133 |
|
+1
solve slightly difficult problems (1600 — 1900). I think it will help you. |
|
0
Nice Explanation... Thanks a lot... |
|
On
CodingBeast23 →
Want to know Hint for Question : Google India Summer Internship Program 2021 — Coding Test — 16 August (Ended), 6 years ago
0
How to solve this with prefix sum? Can you explain a little more... |
|
On
CodingBeast23 →
Want to know Hint for Question : Google India Summer Internship Program 2021 — Coding Test — 16 August (Ended), 6 years ago
+4
Process all the queries of type 0 and store the type 1 query in a vector of arrays (say End). Now after getting all the elements, You have some ranges(starting from 1st element). You just have to take Xor all the elements of a particular range with the calculated value. Lets say we have a variable Xor which is the current value with which we have to take the xor with the i-th element of the given array. Initially Xor = xor(all X of type 1 query). Now as you procees forward and leave a range You again take xor of the value proviede for the given range(which ended right before) which will compensate the original Xor taken of all the values provided... Not clear...? Have a look at the code and read above strategy again. Hope it is clear now. |
|
0
Just wait for the open hacking phase to finish. You will have your answer. |
|
0
Just look at what you have got at the end.... What I meant to say is, You can always get a0 , a2, A4, a6, a8, a10. In simple words, Whatever the 5 elements you choose to get at the end, you can always get one more element together with your 5 elements... Now you decide, which one is optimal. |
|
+8
Dear gotexans, We appreciate your hardword, and Not-to-GiveUp attitude... Rejection Count 72 is a very large number I think... |
|
0
You have to delete at least (n-1)/2 elements. If you delete more that that, The sum of the elements would surely be lesser |
|
+6
If you have tried D, then you would have found that the circular value will consist of (n+1)/2 elements of the given circular array. Just imagine how the solution would look like. Soon you will find that answer = max(...alternate elements.... + a[i] + a[i+1] + .....altername elements...) |
|
0
Yeah...! This is possible, You just have to store the state values. And whenever you encounter an already solved state, you can get the value in O(1) time. (DYNAMIC PROGRAMMING) |
|
0
1:- Learn ds (array, stack, queue, set, map) Note: BY LEARNING I MEAN, YOU SHOULD i) BE FAMILIAR WITH ALL THE STADARD QUESTIONS... ii) BE ABLE TO SOLVE A LITTLE TWISTED QUESTIONS ON ITS BASIS. 2:- Learn algo (binary search, graph, dp, string algos, etc) You will find graph and dp covers huge range of problems... gfg and cp algorithm are good sites to learn...... (This answer was out of my experience till now, it may difer from person to person) |
|
0
Whosoever solves problem E. Please let me know how the complexity of the solution is O(n^4). |
|
0
A different approach for problem D here Using gcd |
|
0
Awesome hard work.! Indeed, this was the need...! |
|
+1
You have done the same thing... what I did. Don't know why WA on test3. Just a matter of some kind of bad luck :( |
|
0
I am not able to understand why have you written worst = min(n,1+x+y-2); |
|
+14
For the problem B The worst position is min(n,x+y-1) Reason: we can always arrange (first k natural)(we have this set 2 times) numbers with minumum sum k+1. eg. k=5 we have set1 = 1,2,3,4,5 and set2= 1,2,3,4,5 so to get the minumum sum we can arrange 1+5, 2+4, 3+3 (=6) so if x+y is 6 we can have at most 5 players ahead of Nikolay. in general we can have at most x+y-1 players ahead of Nilolay. The best position is 1 if x+y<=n by the logic mentioned above else (when x+y>n) we will try to find the number of pairs of a and b such that a+b>x+y to do this efficiently lets have a target=min(n+n,x+y+1) to reach the target set a=n so b=target-a thus b is the best position achievable. |
|
+1
How to solve C2??? |
|
0
What is the logic behind Div2/E solution? I am not able to get it. Someone please help.... |
|
0
while traversing in each column(say j), if any element(x) is found which belong to column j in the final matrix. Then find no of moves required in the cyclic shift of this column so that x reaches to its correct position. Maintain a map[mv,fre] mv: no of moves required so that x reaches to its correct position in the cyclic shift. fre: frequency of such elements which reaches to its correct position after mv moves in the cyclic shift. Now, for each column min no of moves required(say min_col) is the n-max(difference between freq and mv). So the ans is sum of all min_col For better understanding have a look |
|
0
Definitely interested, we can perform better under the guidance of experienced persons. It is upto us how to use this program... |
|
0
To find the minimum number of moves of opposite parity. We construct a graph(g) in the following manner. g[i] is a vector containing all indexes which reaches to position i in one move only. Now we traverse the graph(for odd and even values separately). For instance, traversing with odd values. First push all the nodes in a queue. Now while traversing the graph if any even value node is encountered. Then the number of moves required = number of moves required by the parent + 1 and then push it into the queue. In this process all the even nodes with moves required 1 is encountered first, then 2,3,4..... Same is done for the even value nodes. For better understanding refer to my solution. link |
|
0
What is the logic behind problem E |
|
0
For each element, remove it and then maximize the ans. For this we try to maintain two arrays(st[n] and ed[n]) st[i] will store the length of contiguous subarray starting from pos i. ed[i] --------------------------------------------- ending at pos i. Now if you remove the i-th element check the answer after merging left subarray and right subarray if possible to merge(left element < right element) and maximize the ans. |
|
0
tyr out this one 30 60 9 4 one of the answer would be 4 6 20 |
|
0
you have to find whether it is possible to have different numbers on different edges or not. |
|
0
for problem D1, for n>=4 you just have to find any node having only 2 members. If there exixt such a node, the answer is NO otherwise YES. You can see here (https://mirror.codeforces.com/contest/1189/submission/56606643) |
|
0
Just have a look at the code. You will surely get it.Your text to link here... |
| Name |
|---|


