結果
| 問題 |
No.3184 Make Same
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-20 21:35:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 432 ms |
| コンパイル使用メモリ | 82,648 KB |
| 実行使用メモリ | 132,964 KB |
| 最終ジャッジ日時 | 2025-06-20 21:35:28 |
| 合計ジャッジ時間 | 9,854 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 4 WA * 20 |
ソースコード
N=int(input())
A=list(map(int,input().split()))
ans=[]
i=N-2
d=0
while i>=0:
while i>0 and A[i]==A[i+1]:
i-=1
if A[-1]-A[i]-d==0:break
ans.append((1,i+1,A[-1]-A[i]-d))
d+=A[-1]-A[i]-d
i-=1
print(len(ans))
for a in ans:
print(*a)