結果

問題 No.1673 Lamps on a line
ユーザー osrgy01osrgy01
提出日時 2022-02-01 15:23:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 179 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 10,552 KB
実行使用メモリ 12,240 KB
最終ジャッジ日時 2023-09-02 02:31:14
合計ジャッジ時間 6,317 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,240 KB
testcase_01 AC 15 ms
7,828 KB
testcase_02 AC 334 ms
7,816 KB
testcase_03 AC 326 ms
7,832 KB
testcase_04 AC 584 ms
7,784 KB
testcase_05 AC 41 ms
7,816 KB
testcase_06 AC 499 ms
7,748 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, Q = map(int, input().split())
ans = [0] * (N + 1)

for _ in range(Q):
    L, R = map(int, input().split())
    for i in range(L, R + 1):
        ans[i] ^= 1
    print(sum(ans))
0