結果
| 問題 | No.2055 12x34... |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-28 16:09:13 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 220 bytes |
| 記録 | |
| コンパイル時間 | 2,150 ms |
| コンパイル使用メモリ | 81,888 KB |
| 実行使用メモリ | 538,976 KB |
| 最終ジャッジ日時 | 2026-09-28 17:16:36 |
| 合計ジャッジ時間 | 7,910 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 31 RE * 4 MLE * 1 |
ソースコード
from collections import defaultdict
N=int(input())
A=list(map(int,input().split()))
d=defaultdict(int)
cnt=defaultdict(int)
for i in range(N):
cnt[A[i]]+=1
d[A[i]]+=d[A[i]-1]+cnt[A[i]-1]
print(sum(d.values()))