結果

問題 No.1673 Lamps on a line
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-09-10 21:23:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 157 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,536 KB
実行使用メモリ 15,588 KB
最終ジャッジ日時 2023-09-02 15:42:38
合計ジャッジ時間 5,930 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
14,848 KB
testcase_01 AC 16 ms
7,824 KB
testcase_02 AC 347 ms
7,840 KB
testcase_03 AC 342 ms
7,764 KB
testcase_04 AC 593 ms
7,776 KB
testcase_05 AC 44 ms
7,756 KB
testcase_06 AC 511 ms
7,864 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n, q = map(int, input().split())
lis = [0] * n
for _ in range(q):
	l, r = map(int, input().split())
	for i in range(l - 1, r):
		lis[i] ^= 1
	print(sum(lis))
0