I'm stuck in test case #10 in D. The test case has n = 20000. Is there a way I can see the complete test case?
I'd be thankful if someone can review my solution: https://codeforces.net/contest/1272/submission/166760372
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
I'm stuck in test case #10 in D. The test case has n = 20000. Is there a way I can see the complete test case?
I'd be thankful if someone can review my solution: https://codeforces.net/contest/1272/submission/166760372
Name |
---|
I am not sure if seeing it will help you out in some way, but basically you can output the vector for example saying if the first number == 33125630.
From testcase #5 onwards, the values are in the range of 10^7 — 10^9 and n is 20000. I feel, I am probably missing some edge case. I have been thinking about it for two days. I am unable to see. I have seen solutions from the editorial as well as top rankers from the contest. They have slightly different implementation which is clearer than my solution. However, I'm not over invested in my solution and really want case I'm. missing.
N is 200000.
Yes. Sorry. N is 200000 from testcase#5 onwards.
Any reason behind doing space optimized solution?
I did not think about it as dp at all. I just thought that to calculate the answer I don't need more than 3 values at once. It is a coincidence that the solution is a space optimized dp.
Does s denote a max with 1 deleted element and f with all consecutive elements?
Yes
Last else if states that v3 > v1, but if it is less then all variables reset to 0/1. Consider the case when v3 <= v1, but v2 > v1.
I am actually not quite sure if we can consider such case having only 3 variables. I'll try once more in a bit, but I might assume it either needs a bit more of variables or is impossible.
Nope, I can't find a way to solve it using 5 variables only.
Take a look at Ticket 15977 from CF Stress for a counter example.