結果
問題 | No.1673 Lamps on a line |
ユーザー | james |
提出日時 | 2021-09-10 21:57:47 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 268 bytes |
コンパイル時間 | 197 ms |
コンパイル使用メモリ | 10,624 KB |
実行使用メモリ | 7,900 KB |
最終ジャッジ日時 | 2023-09-02 17:19:55 |
合計ジャッジ時間 | 6,753 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,864 KB |
testcase_01 | AC | 16 ms
7,776 KB |
testcase_02 | AC | 369 ms
7,844 KB |
testcase_03 | AC | 350 ms
7,900 KB |
testcase_04 | AC | 629 ms
7,852 KB |
testcase_05 | AC | 46 ms
7,876 KB |
testcase_06 | AC | 538 ms
7,852 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
N,Q = map(int,input().split()) lamp = [0] * N for i in range(Q): Li,Ri = map(int,input().split()) for j in range(Li,Ri+1): if lamp[j-1] == 0: lamp[j-1] = 1 else: lamp[j-1] = 0 print(len([1 for k in lamp if k == 1]))