結果

問題 No.3184 Make Same
ユーザー miztom
提出日時 2025-06-20 21:40:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 384 ms
コンパイル使用メモリ 82,052 KB
実行使用メモリ 102,524 KB
最終ジャッジ日時 2025-06-20 21:40:10
合計ジャッジ時間 9,170 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[*map(int,input().split())]
s=[];c=0
for i in range(30)[::-1]:
    l=r=0
    while r<n and a[r]&1<<i<1:r+=1;l=1
    if l<1:continue
    s+=l,r,1<<i;a.sort();c+=1
    for j in range(l-1,r):a[j]+=1<<i
print(c,*s)
0