結果

問題 No.2374 ASKT Subsequences
ユーザー koki-masutanikoki-masutani
提出日時 2024-03-19 23:05:05
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 461 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 82,032 KB
最終ジャッジ日時 2024-03-19 23:05:11
合計ジャッジ時間 5,937 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
60,264 KB
testcase_01 AC 39 ms
53,460 KB
testcase_02 AC 39 ms
53,460 KB
testcase_03 AC 39 ms
53,460 KB
testcase_04 AC 45 ms
59,760 KB
testcase_05 AC 39 ms
53,460 KB
testcase_06 AC 39 ms
53,460 KB
testcase_07 AC 54 ms
64,196 KB
testcase_08 AC 51 ms
62,112 KB
testcase_09 AC 53 ms
64,200 KB
testcase_10 AC 74 ms
72,452 KB
testcase_11 AC 1,017 ms
75,600 KB
testcase_12 AC 186 ms
75,384 KB
testcase_13 AC 131 ms
75,364 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
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()))
ans = 0
for i in range(N - 3):
    for j in range(i + 1, N - 2):
        for k in range(j + 1, N - 1):
            for l in range(k + 1, N):
                if (
                    A[i] + 10 == A[k]
                    and A[j] + 1 == A[l]
                    and A[i] < A[j]
                    and A[j] > A[k]
                    and A[k] < A[l]
                ):
                    ans += 1
print(ans)
0