結果

問題 No.3184 Make Same
ユーザー H20
提出日時 2025-09-25 00:14:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 4,262 ms
コンパイル使用メモリ 82,088 KB
実行使用メモリ 120,908 KB
最終ジャッジ日時 2025-09-25 00:14:48
合計ジャッジ時間 13,509 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split())) 
ANS = []
for i in reversed(range(30)):
    p = 2**i
    for j in range(N):
        if A[j] & p == 0:
            A[j]+=p
        else:
            break
    else:
        j+=1
    if j:
        ANS.append([1,j,p])
    A.sort()
print(len(ANS))
for a in ANS:
    print(*a)
0