結果

問題 No.2374 ASKT Subsequences
ユーザー 👑 H20H20
提出日時 2023-07-07 22:04:39
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 395 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 96,908 KB
最終ジャッジ日時 2023-09-28 23:22:24
合計ジャッジ時間 7,019 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,320 KB
testcase_01 AC 75 ms
71,200 KB
testcase_02 AC 75 ms
71,512 KB
testcase_03 AC 73 ms
71,112 KB
testcase_04 AC 76 ms
71,392 KB
testcase_05 AC 76 ms
71,104 KB
testcase_06 AC 75 ms
71,228 KB
testcase_07 AC 74 ms
71,296 KB
testcase_08 AC 74 ms
71,272 KB
testcase_09 AC 74 ms
71,200 KB
testcase_10 AC 78 ms
75,556 KB
testcase_11 AC 85 ms
76,260 KB
testcase_12 AC 79 ms
75,680 KB
testcase_13 AC 80 ms
75,740 KB
testcase_14 AC 90 ms
76,228 KB
testcase_15 AC 94 ms
76,528 KB
testcase_16 AC 87 ms
76,412 KB
testcase_17 AC 93 ms
76,492 KB
testcase_18 AC 97 ms
76,412 KB
testcase_19 AC 95 ms
76,512 KB
testcase_20 AC 100 ms
76,648 KB
testcase_21 AC 104 ms
76,820 KB
testcase_22 AC 98 ms
76,540 KB
testcase_23 AC 97 ms
76,604 KB
testcase_24 AC 94 ms
76,264 KB
testcase_25 TLE -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split())) 
#a1
#a2=a1+k+10
#a3=a1+10
#a4=a1+k+10+1=a2+1
A13 = []
A24 = []
for i in range(N):
    for j in range(i+1,N):
        if A[i]==A[j]-10:
            A13.append([i,j])
        if A[i]==A[j]-1:
            A24.append([i,j])
ans = 0
for a1,a3 in A13:
    for a2,a4 in A24:
        if a1<a2<a3<a4 and A[a1]+10<A[a2]:
            ans+=1
print(ans)
0