結果

問題 No.1673 Lamps on a line
コンテスト
ユーザー hiraku
提出日時 2021-09-11 08:57:25
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 206 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 562 ms
コンパイル使用メモリ 20,828 KB
実行使用メモリ 44,092 KB
最終ジャッジ日時 2026-03-06 19:16:40
合計ジャッジ時間 8,458 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 2
other RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N, Q = map(int, input().split())
LR = [list(map(int, input().split())) for _ in range(Q)]
la = [0] * N
for l, r in LR:
    la[l - 1] += 1
    la[r - 1] -= 1
    
ams = sum(i % 2 == 1 for i in la)
print(ans)
0