# | User | Rating |
---|---|---|
1 | Benq | 3783 |
2 | jiangly | 3710 |
3 | tourist | 3662 |
4 | Um_nik | 3526 |
5 | ko_osaga | 3500 |
6 | maroonrk | 3488 |
7 | ecnerwala | 3478 |
8 | inaFSTream | 3477 |
9 | fantasy | 3470 |
10 | QAQAutoMaton | 3428 |
# | User | Contrib. |
---|---|---|
1 | Um_nik | 185 |
2 | adamant | 177 |
2 | awoo | 177 |
4 | nor | 169 |
5 | maroonrk | 165 |
6 | -is-this-fft- | 163 |
7 | antontrygubO_o | 155 |
8 | ko_osaga | 151 |
8 | dario2994 | 151 |
10 | SecondThread | 148 |
I got a runtime error on the last Atcoder Regular Contest.
The problem is this .
My RE solution here .
I used (char) (k+'0') to convert the digit k to character.
for (int k = 1; k < 7; k++) {
if (!f[k]) {
ch[i][j] = (char)(k + '0');
break;
}
}
3 3
...
...
...
I always wrote (char) ('a'+k)
to get the kth letter from the alphabet and didn't get Runtime Error on any platform.
Why am I getting RE this time?
Name |
---|
RTE here:
when
ch[xx][yy] = '.'
,d = -2
. On my machine it somehow modify the value ofm
and cause RTE:|Ah! Thank you very much.
Didn't notice that.