結果
問題 | No.1673 Lamps on a line |
ユーザー | ossa_2019 |
提出日時 | 2021-09-11 01:07:01 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 324 bytes |
コンパイル時間 | 1,050 ms |
コンパイル使用メモリ | 87,040 KB |
実行使用メモリ | 321,248 KB |
最終ジャッジ日時 | 2023-09-03 16:11:38 |
合計ジャッジ時間 | 6,255 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 75 ms
70,944 KB |
testcase_01 | AC | 75 ms
71,036 KB |
testcase_02 | AC | 207 ms
93,872 KB |
testcase_03 | AC | 182 ms
93,800 KB |
testcase_04 | AC | 245 ms
104,568 KB |
testcase_05 | AC | 115 ms
77,532 KB |
testcase_06 | AC | 227 ms
99,396 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
ソースコード
from sys import stdin def main(inp, inps): N, Q = map(int, inp().split()) L, R = list(zip(*map(lambda x: list(map(int, x.split())), inps()))) now_bit = 0 for l, r in zip(L, R): now_bit ^= 2**r - 2**(l-1) print(sum(map(int, list(bin(now_bit)[2:])))) main(stdin.readline, stdin.readlines)