結果

問題 No.1673 Lamps on a line
ユーザー first_vil
提出日時 2021-09-10 21:23:53
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 193 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,352 KB
実行使用メモリ 69,480 KB
最終ジャッジ日時 2024-06-11 22:17:48
合計ジャッジ時間 1,545 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

n,q=map(int,input().split())
cnt=0
f=[0]*(n+10)
for _ in range(p):
    l,r=map(int,input().split())
    for i in range(l,r+1):
        cnt-=f[i]
        f[i]^=1
        cnt+=f[i]
    print(cnt)
0