結果

問題 No.2374 ASKT Subsequences
ユーザー rlangevinrlangevin
提出日時 2023-07-07 22:04:03
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 372 ms
コンパイル使用メモリ 86,844 KB
実行使用メモリ 77,980 KB
最終ジャッジ日時 2023-09-28 23:21:24
合計ジャッジ時間 4,441 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,164 KB
testcase_01 AC 74 ms
71,280 KB
testcase_02 AC 77 ms
71,484 KB
testcase_03 AC 71 ms
71,472 KB
testcase_04 AC 70 ms
71,360 KB
testcase_05 WA -
testcase_06 AC 69 ms
71,412 KB
testcase_07 AC 71 ms
71,164 KB
testcase_08 WA -
testcase_09 AC 72 ms
71,276 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 104 ms
77,480 KB
testcase_26 WA -
testcase_27 AC 128 ms
77,684 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))

M = 2005        
ans = 0
for i in range(N):
    D = [0] * M
    for j in range(i + 1, N):
        D[A[j]] += 1
    now = 0
    for j in range(i - 1, -1, -1):
        if A[j] == A[i] - 10:
            ans += now
        now += D[A[j] + 1]
        
print(ans)
0