結果

問題 No.2374 ASKT Subsequences
ユーザー ニックネームニックネーム
提出日時 2023-07-07 22:32:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 366 bytes
コンパイル時間 462 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 82,100 KB
最終ジャッジ日時 2023-09-29 00:02:34
合計ジャッジ時間 11,964 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,204 KB
testcase_01 AC 78 ms
76,276 KB
testcase_02 AC 74 ms
71,296 KB
testcase_03 AC 83 ms
76,124 KB
testcase_04 AC 90 ms
76,148 KB
testcase_05 AC 82 ms
76,008 KB
testcase_06 AC 86 ms
76,260 KB
testcase_07 AC 113 ms
77,324 KB
testcase_08 AC 117 ms
77,124 KB
testcase_09 AC 128 ms
77,276 KB
testcase_10 AC 193 ms
77,408 KB
testcase_11 AC 138 ms
77,476 KB
testcase_12 AC 132 ms
77,152 KB
testcase_13 AC 122 ms
77,400 KB
testcase_14 AC 178 ms
77,132 KB
testcase_15 AC 250 ms
77,548 KB
testcase_16 AC 149 ms
77,088 KB
testcase_17 AC 402 ms
77,492 KB
testcase_18 AC 1,262 ms
77,388 KB
testcase_19 AC 1,028 ms
77,252 KB
testcase_20 TLE -
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int,input().split()))
s = set(a); m = max(a); ans = 0
for k in range(1,m):
    for t in range(1,m):
        p = [t,t+k+10,t+10,t+k+11]; f = True
        for v in p: f &= v in s
        if not f: continue
        dp = [1,0,0,0,0]
        for v in a:
            if v in p: i = p.index(v); dp[i+1] += dp[i]
        ans += dp[4]
print(ans)
0