結果

問題 No.1444 !Andd
ユーザー lam6er
提出日時 2025-03-20 20:53:13
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 440 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 82,244 KB
実行使用メモリ 303,676 KB
最終ジャッジ日時 2025-03-20 20:53:55
合計ジャッジ時間 4,232 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other TLE * 1 -- * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))

current = {1}
found_zero = False

for i in range(n):
    ai = a[i]
    next_current = set()
    for x in current:
        next_current.add(x * ai)
        next_current.add(x & ai)
    current = next_current
    print(len(current))
    if len(current) == 1 and 0 in current:
        # Output 1 for all remaining steps
        for _ in range(n - i - 1):
            print(1)
        break
0