結果
問題 |
No.1443 Andd
|
ユーザー |
![]() |
提出日時 | 2025-04-16 15:58:38 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 460 bytes |
コンパイル時間 | 407 ms |
コンパイル使用メモリ | 81,520 KB |
実行使用メモリ | 300,780 KB |
最終ジャッジ日時 | 2025-04-16 16:00:45 |
合計ジャッジ時間 | 5,663 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 1 TLE * 1 -- * 18 |
ソースコード
N = int(input()) A = list(map(int, input().split())) current = set() current.add((0, 0)) for a in A: new_current = set() for (u, l) in current: # Add operation add_l = l + a new_u_add = u + (add_l // 1024) new_l_add = add_l % 1024 new_current.add((new_u_add, new_l_add)) # AND operation new_l_and = l & a new_current.add((0, new_l_and)) current = new_current print(len(current))