hi! Recently I found during hack of 57024850,but though it's take 15 second in testcase t=1,n=1000000000,x=100000000 my hacks fails.
It doesn't take time limit in hacks?? Sorry for my poor English.
Thank You!!
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 161 |
4 | Um_nik | 160 |
5 | atcoder_official | 159 |
6 | djm03178 | 157 |
7 | adamant | 153 |
8 | luogu_official | 150 |
9 | awoo | 149 |
10 | TheScrasse | 146 |
hi! Recently I found during hack of 57024850,but though it's take 15 second in testcase t=1,n=1000000000,x=100000000 my hacks fails.
It doesn't take time limit in hacks?? Sorry for my poor English.
Thank You!!
Name |
---|
umm try checking the constraints again its x<n and ur x and n are equal, it fails coz of that probs
its n=10^9,x=10^8
my bad my bad
I think it must be optimized by c++ itself
Run the code in custom invocation to see its running time in CF environment.
Try adding -O2 to your compilation flags locally, then it should be really fast.
Looks like it is fast enough, there are at most 10^10 operations, which should run in time.
10^10 operations should almost never run in time.