結果
問題 | No.2879 Range Flip Queries |
ユーザー | hiro1729 |
提出日時 | 2024-06-06 20:39:21 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 491 ms / 2,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 391 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 144,920 KB |
最終ジャッジ日時 | 2024-09-08 12:00:19 |
合計ジャッジ時間 | 17,548 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 34 ms
53,136 KB |
testcase_01 | AC | 34 ms
52,416 KB |
testcase_02 | AC | 35 ms
52,196 KB |
testcase_03 | AC | 251 ms
76,224 KB |
testcase_04 | AC | 259 ms
76,080 KB |
testcase_05 | AC | 254 ms
76,212 KB |
testcase_06 | AC | 252 ms
76,104 KB |
testcase_07 | AC | 250 ms
76,096 KB |
testcase_08 | AC | 41 ms
59,260 KB |
testcase_09 | AC | 36 ms
53,160 KB |
testcase_10 | AC | 42 ms
59,636 KB |
testcase_11 | AC | 40 ms
54,940 KB |
testcase_12 | AC | 43 ms
60,308 KB |
testcase_13 | AC | 391 ms
118,604 KB |
testcase_14 | AC | 422 ms
124,120 KB |
testcase_15 | AC | 298 ms
96,660 KB |
testcase_16 | AC | 171 ms
102,380 KB |
testcase_17 | AC | 321 ms
131,308 KB |
testcase_18 | AC | 478 ms
140,944 KB |
testcase_19 | AC | 484 ms
140,716 KB |
testcase_20 | AC | 458 ms
140,760 KB |
testcase_21 | AC | 472 ms
144,488 KB |
testcase_22 | AC | 468 ms
141,192 KB |
testcase_23 | AC | 482 ms
140,564 KB |
testcase_24 | AC | 468 ms
144,440 KB |
testcase_25 | AC | 491 ms
144,492 KB |
testcase_26 | AC | 485 ms
144,368 KB |
testcase_27 | AC | 479 ms
144,452 KB |
testcase_28 | AC | 487 ms
144,796 KB |
testcase_29 | AC | 420 ms
144,680 KB |
testcase_30 | AC | 409 ms
144,800 KB |
testcase_31 | AC | 421 ms
144,920 KB |
testcase_32 | AC | 412 ms
144,456 KB |
ソースコード
N, Q = map(int, input().split()) A = list(map(int, input().split())) c = [0] * (N + 1) # xor版いもす法 for _ in range(Q): L, R = map(int, input().split()) c[L - 1] ^= 1 c[R] ^= 1 for i in range(N): c[i + 1] ^= c[i] print(*[c[i] ^ A[i] for i in range(N)])