結果
問題 |
No.814 ジジ抜き
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:23:41 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 500 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 82,024 KB |
実行使用メモリ | 77,080 KB |
最終ジャッジ日時 | 2025-06-12 18:23:50 |
合計ジャッジ時間 | 8,725 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | MLE * 23 |
ソースコード
n = int(input()) total_xor = 0 def compute_xor(n): mod = n % 4 if mod == 0: return n elif mod == 1: return 1 elif mod == 2: return n + 1 else: return 0 for _ in range(n): k, l, d = map(int, input().split()) s = 1 << d q = l // s r = l % s start = q end = q + k - 1 xor_q = compute_xor(end) ^ compute_xor(start - 1) upper = xor_q << d lower = r if k % 2 else 0 total_xor ^= (upper ^ lower) print(total_xor)