結果

問題 No.1673 Lamps on a line
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-09-10 21:23:39
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 157 bytes
コンパイル時間 693 ms
コンパイル使用メモリ 86,708 KB
実行使用メモリ 84,644 KB
最終ジャッジ日時 2023-09-02 15:43:40
合計ジャッジ時間 5,638 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
75,552 KB
testcase_01 AC 73 ms
71,332 KB
testcase_02 AC 264 ms
79,028 KB
testcase_03 AC 249 ms
79,044 KB
testcase_04 AC 316 ms
78,460 KB
testcase_05 AC 121 ms
78,372 KB
testcase_06 AC 282 ms
77,692 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