結果
| 問題 |
No.1444 !Andd
|
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-04-15 21:40:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 491 bytes |
| コンパイル時間 | 269 ms |
| コンパイル使用メモリ | 81,452 KB |
| 実行使用メモリ | 300,400 KB |
| 最終ジャッジ日時 | 2025-04-15 21:42:32 |
| 合計ジャッジ時間 | 4,019 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 19 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
current = {1}
result = []
zero_flag = False
for ai in a:
if zero_flag:
result.append(1)
continue
new_current = set()
for x in current:
mul = x * ai
new_current.add(mul)
and_val = x & ai
new_current.add(and_val)
current = new_current
cnt = len(current)
result.append(cnt)
if cnt == 1 and 0 in current:
zero_flag = True
print('\n'.join(map(str, result)))
lam6er