結果
| 問題 | No.1673 Lamps on a line |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-03 02:12:57 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 191 bytes |
| 記録 | |
| コンパイル時間 | 287 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 31,648 KB |
| 最終ジャッジ日時 | 2024-07-20 21:16:42 |
| 合計ジャッジ時間 | 6,135 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 TLE * 1 -- * 5 |
ソースコード
N,Q = map(int,input().split())
lr = [list(map(int,input().split()))for _ in range(Q)]
s = [0]*(N+1)
for l,r in lr:
for i in range(l-1,r):
s[i]+=1
s[i]%=2
print(sum(s))