結果
| 問題 |
No.3184 Make Same
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-20 21:28:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 278 ms / 2,000 ms |
| コード長 | 642 bytes |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 82,976 KB |
| 実行使用メモリ | 144,084 KB |
| 最終ジャッジ日時 | 2025-06-20 21:28:47 |
| 合計ジャッジ時間 | 14,555 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
n = int(input())
a = list(map(int,input().split()))
#a = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# a.append(list(map(int,input().split())))
ans = []
t = 0
for i in reversed(range(30)):
x = (1<<i)
t += x
y = bisect.bisect_left(a,t)
if y == 0:continue
ans.append((1,y,x))
for j in range(y):
a[j] += x
a.sort()
#print(a)
assert len(set(a)) == 1
print(len(ans))
for i in ans:
print(*i)