結果
| 問題 | No.3184 Make Same |
| コンテスト | |
| ユーザー |
miztom
|
| 提出日時 | 2025-06-20 21:40:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 152 ms / 2,000 ms |
| + 26µs | |
| コード長 | 231 bytes |
| 記録 | |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 138,012 KB |
| 最終ジャッジ日時 | 2026-07-12 15:01:52 |
| 合計ジャッジ時間 | 10,020 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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