# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
Hello, as I write this blog its about 30 minutes before the Codeforces Round 984 (Div. 3), and I think I found the bug possibly caused by incoming contest.
Go to this link
Go to "Past contests" section and below you will see links to different pages (example link to page 2)
It redirects me to this link instead.
I'm not sure if this is intended? If this is a known bug or intended feature please kindly inform me, I will delete this blog.
Hi codeforces community!
So I was solving this problem: 1703G - Хороший ключ, плохой ключ
I wrote first solution: 283940469 ~ TLE
I wrote second solution: 283940935 ~ AC
Two programs are very similar to each other so i will list most notable differences between them:
C-array
a
of size N = 1e5
defined globally. Second solution uses vector
of size n
which is defined for each test casevector<vector<ll>>
dp
, with N
rows and each row is of size 31
and for each test it fills every row with vector<ll>(31, -1)
. Second solution uses similar dp
vector but has n
rows and is defined in the solve
functionn
, k
, dp
from the global scope. Second solution passes references to vectors
as parameters and variable k
also as parameters for each recursive call. I sincerely thought first solution would be faster than second solution.
So, my question is why is that first solution gets TLE but second solution gets AC?
Name |
---|