結果
| 問題 |
No.2879 Range Flip Queries
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2024-09-08 15:32:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 246 bytes |
| コンパイル時間 | 864 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,640 KB |
| 最終ジャッジ日時 | 2024-09-08 15:33:08 |
| 合計ジャッジ時間 | 53,680 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 TLE * 15 |
ソースコード
N,Q=map(int,input().split())
A=list(map(int,input().split()))+[0]
for i in range(N,0,-1):
A[i]^=A[i-1]
for q in range(Q):
l,r=map(int,input().split())
l-=1
A[l]^=1
A[r]^=1
for i in range(1,N+1):
A[i]^=A[i-1]
print(*A[:-1])
vwxyz