結果
問題 | No.1673 Lamps on a line |
ユーザー | mahiro72 |
提出日時 | 2021-10-03 02:12:57 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 191 bytes |
コンパイル時間 | 491 ms |
コンパイル使用メモリ | 10,648 KB |
実行使用メモリ | 26,632 KB |
最終ジャッジ日時 | 2023-09-28 02:39:39 |
合計ジャッジ時間 | 6,213 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 13 ms
12,184 KB |
testcase_01 | AC | 13 ms
7,684 KB |
testcase_02 | AC | 207 ms
15,228 KB |
testcase_03 | AC | 208 ms
15,180 KB |
testcase_04 | AC | 360 ms
20,432 KB |
testcase_05 | AC | 32 ms
8,936 KB |
testcase_06 | AC | 323 ms
18,772 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
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))