結果
| 問題 |
No.2374 ASKT Subsequences
|
| コンテスト | |
| ユーザー |
ニックネーム
|
| 提出日時 | 2023-07-07 22:32:09 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 366 bytes |
| コンパイル時間 | 118 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 17,820 KB |
| 最終ジャッジ日時 | 2024-07-21 18:41:50 |
| 合計ジャッジ時間 | 11,141 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 TLE * 1 -- * 13 |
ソースコード
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)
ニックネーム