結果
| 問題 |
No.1443 Andd
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 23:18:48 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 441 bytes |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 82,280 KB |
| 実行使用メモリ | 209,544 KB |
| 最終ジャッジ日時 | 2025-04-15 23:20:30 |
| 合計ジャッジ時間 | 5,857 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 TLE * 1 -- * 18 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
current = {(0, 0)} # (U, L)
for ai in a:
next_set = set()
# Process addition
for (U, L) in current:
total = L + ai
new_U = U + (total // 1024)
new_L = total % 1024
next_set.add((new_U, new_L))
# Process AND
for (U, L) in current:
new_L = L & ai
next_set.add((0, new_L))
print(len(next_set))
current = next_set
lam6er