I was doing Problem 1033D and I was stuck. Later, one of my friends got Accepted first try. Seems like the only difference is that I was using C++17 and my friend was using C++20. Can someone explain why C++17 didn't work but C++20 did?
I was doing Problem 1033D and I was stuck. Later, one of my friends got Accepted first try. Seems like the only difference is that I was using C++17 and my friend was using C++20. Can someone explain why C++17 didn't work but C++20 did?
# | User | Rating |
---|---|---|
1 | jiangly | 3846 |
2 | tourist | 3799 |
3 | orzdevinwang | 3706 |
4 | jqdai0815 | 3682 |
5 | ksun48 | 3590 |
6 | Ormlis | 3533 |
7 | Benq | 3468 |
8 | Radewoosh | 3463 |
9 | ecnerwala | 3451 |
9 | Um_nik | 3451 |
# | User | Contrib. |
---|---|---|
1 | cry | 165 |
2 | -is-this-fft- | 160 |
2 | Qingyu | 160 |
4 | atcoder_official | 157 |
5 | Dominater069 | 155 |
6 | adamant | 154 |
7 | djm03178 | 151 |
8 | luogu_official | 149 |
9 | awoo | 147 |
10 | Um_nik | 146 |
Name |
---|
u'r so dumb
u'r so dumb
probably because of cbrt implemented in c++17.
ur so dumbbbbbbbbbbb
because skibidi is a sigma and you have a level 10 gyat
In some problems like 1137C - Museums Tour, C++17 can AC more easy but C++20 or 23 maybe a bit harder.
They're fun features :)
Different compiler may feature different libraries, and therefore some of the functions you applied to your code file may not work at best status if run in old (or new) compilers.
Maybe you used %lld (sorry I don't know exactly what it was spelled) instead of INT64MAX for the datatype? I'm not very sure myself, I'm saying this because that datatype requirement was shown for one of my problems in order to solve, but it can be worth a shot if you haven't quite examined your datatypes as thoroughly as you did the logic of your program?
Though, it would help to give the source programs of both your friend and you so we have more information to understand if it was the compiler.
I replaced sqrt with sqrtl and cbrt with cbrtl in your code, and it AC'd: 310420549
Thanks a lot!