# | User | Rating |
---|---|---|
1 | jiangly | 3640 |
2 | Benq | 3593 |
3 | tourist | 3572 |
4 | orzdevinwang | 3561 |
5 | cnnfls_csy | 3539 |
6 | ecnerwala | 3534 |
7 | Radewoosh | 3532 |
8 | gyh20 | 3447 |
9 | Rebelz | 3409 |
10 | Geothermal | 3408 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | awoo | 164 |
3 | adamant | 163 |
4 | TheScrasse | 159 |
5 | nor | 158 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 151 |
8 | SecondThread | 147 |
9 | orz | 146 |
10 | pajenegod | 145 |
0
Here's my solution: Observation 1: If the xorOdd == xorEven, then xorOdd ^ xorEven == 0, which mean xor of all elements is equal to 0. This leads to observation 2: If n%4==0 then the answer is 0 to n-1. Consequentially, answer for n%4==3 is 1 to n. if n%4==2 then we take the answer for n-3, then we add 3 numbers of our choice (mine was 2^30, 2^29 and 2^30 + 2^29). if n%4==1 then we take answer for n-6, then we add 6 numbers. AC code: 170284159 |
+4
Bruh I knew how to solve D at 1h left but I got so many bugs it took me 1h past the contest to finally AC... |
+2
Because if bc/ad=x and x is an integer, then bc is divisible by ad by definition. |
0
yeah D statement is really confusing |
+3
|
0
tfw you solved D but not C |
+1
God I absolutely hate div2C kind of problem where you're just trying to find this tiny obscure property that doesn't even look too relevant but turns out to be literally the whole answer |
0
I assume what you meant is creating the longest subsequence by removing some elements in the original sequence. In this case, we can try to solve the problem greedily. First we construct a minheap. Then we will iterate through the original sequence using a pointer i.
I couldn't prove/disprove this idea, but it seems to work. |
Name |
---|