結果
問題 | No.1673 Lamps on a line |
ユーザー |
![]() |
提出日時 | 2021-09-11 08:58:09 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 198 bytes |
コンパイル時間 | 473 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 34,380 KB |
最終ジャッジ日時 | 2024-06-22 14:09:14 |
合計ジャッジ時間 | 3,548 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 2 |
other | WA * 3 RE * 8 |
ソースコード
N, Q = map(int, input().split())LR = [list(map(int, input().split())) for _ in range(Q)]la = [0] * Nfor l, r in LR:la[l] += 1la[r] -= 1ans = sum(i % 2 == 1 for i in la)print(ans)