結果
| 問題 |
No.3184 Make Same
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-24 10:12:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 430 ms |
| コンパイル使用メモリ | 82,360 KB |
| 実行使用メモリ | 168,508 KB |
| 最終ジャッジ日時 | 2025-06-24 10:12:42 |
| 合計ジャッジ時間 | 11,873 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 1 WA * 23 |
ソースコード
N = int(input())
A = list(map(int,input().split()))
ans = []
amax = A[-1]
while A[0]<amax:
dmax = A[1]
v = amax-A[0]
ind = 0
for i in range(1,N):
if A[i]==amax:break
d = amax-A[i]
l = min(A[0]+d,A[i+1])
if l>dmax:
dmax = l
ind = i
ans.append((0,ind,amax-A[ind]))
for i in range(ind+1):
A[i] += amax-A[ind]
A = sorted(A)
print(len(ans))
for l,r,v in ans:
print(l,r,v)