結果

問題 No.1673 Lamps on a line
ユーザー NatsubiSoganNatsubiSogan
提出日時 2021-09-10 21:25:07
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 260 bytes
コンパイル時間 366 ms
コンパイル使用メモリ 87,020 KB
実行使用メモリ 83,912 KB
最終ジャッジ日時 2023-09-02 15:48:21
合計ジャッジ時間 5,103 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
75,712 KB
testcase_01 AC 74 ms
71,432 KB
testcase_02 AC 124 ms
78,144 KB
testcase_03 AC 128 ms
77,856 KB
testcase_04 AC 143 ms
78,572 KB
testcase_05 AC 103 ms
77,580 KB
testcase_06 AC 140 ms
78,828 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
	import sys
	input = sys.stdin.buffer.readline
	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))
if __name__ == '__main__':
	main()
	
0