結果

問題 No.3184 Make Same
ユーザー tkykwtnb
提出日時 2025-06-20 22:46:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 326 ms
コンパイル使用メモリ 82,556 KB
実行使用メモリ 140,816 KB
最終ジャッジ日時 2025-06-20 22:46:33
合計ジャッジ時間 12,272 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
N=int(input())
A=list(map(int,input().split()))
D=defaultdict(int)
for a in A:
    D[a]+=1
A=[(k,v) for k,v in D.items()]
A.sort()
ans=[]
r=0
for i in range(len(A)-1):
    r+=A[i][1]
    ans.append((1,r,A[i+1][0]-A[i][0]))
print(len(ans))
for a in ans:
    print(*a)
0