# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | jiangly | 3740 |
3 | Radewoosh | 3652 |
4 | Benq | 3626 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3612 |
7 | ecnerwala | 3587 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3485 |
# | User | Contrib. |
---|---|---|
1 | awoo | 163 |
2 | maomao90 | 160 |
3 | adamant | 156 |
4 | atcoder_official | 155 |
5 | cry | 153 |
6 | maroonrk | 152 |
6 | nor | 152 |
8 | -is-this-fft- | 148 |
8 | SecondThread | 148 |
10 | Petr | 147 |
Name |
---|
you're using c++14 while they're using c++ 20
maybe its because the language? (one is C++ 14 and other is C++ 20)
gcc 6-32 uses
uint32_t
assize_t
, but gcc 13-64 usesuint64_t
.The
string::npos
is defined assize_type npos = -1
. Thus in the wrong submission, it is interpreted as $$$2^{32}-1$$$, and then cast intolong long
so eitheria
orib
will get $$$2^{32}-1$$$ instead of $$$-1$$$.In the accepted submission,
string::npos
is interpreted as $$$2^{64}-1$$$, soia
orib
can get the expected $$$-1$$$.To avoid this error, you can declare
auto ia = s.find(..)
, and usestring::npos
instead of-1
explicitly.