結果
| 問題 |
No.3184 Make Same
|
| コンテスト | |
| ユーザー |
miztom
|
| 提出日時 | 2025-06-20 21:40:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 216 ms / 2,000 ms |
| コード長 | 231 bytes |
| コンパイル時間 | 387 ms |
| コンパイル使用メモリ | 82,172 KB |
| 実行使用メモリ | 121,048 KB |
| 最終ジャッジ日時 | 2025-06-20 21:41:11 |
| 合計ジャッジ時間 | 12,277 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
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;c+=1
for j in range(l-1,r):a[j]+=1<<i
a.sort()
print(c,*s)
miztom