https://mirror.codeforces.com/contest/1526/submission/276695133
It outputs YES YES NO on my computer but YES NO NO on codeforces, for the first test case.
Can somebody help me figure it out? Thanks
# | User | Rating |
---|---|---|
1 | jiangly | 3977 |
2 | tourist | 3815 |
3 | jqdai0815 | 3682 |
4 | ksun48 | 3614 |
5 | orzdevinwang | 3526 |
6 | ecnerwala | 3514 |
7 | Benq | 3483 |
8 | hos.lyric | 3381 |
9 | gamegame | 3374 |
10 | heuristica | 3358 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | -is-this-fft- | 162 |
3 | Um_nik | 161 |
4 | atcoder_official | 159 |
5 | djm03178 | 157 |
5 | Dominater069 | 157 |
7 | adamant | 154 |
8 | luogu_official | 152 |
8 | awoo | 152 |
10 | TheScrasse | 148 |
https://mirror.codeforces.com/contest/1526/submission/276695133
It outputs YES YES NO on my computer but YES NO NO on codeforces, for the first test case.
Can somebody help me figure it out? Thanks
Name |
---|
Hey!
You should not use functions, which returns double, if you works with integers. Double converts to Int by removing float part and all doubles are stored with some precision. For e.g., if you make double x = 3, in fact it may be 2.999999999999999999999 instead of 3, so if u want convert it to Int, you will get 2, but not 3
pow() and log10() returns double, so it's better not to use them
You can find out more info about functions u use on cppreference.com
There is an example:
works good: 276247840
doesn't work: 276718137
and the difference is only in types: I used double instead of int in second case