結果
| 問題 | No.3110 Like CPCTF? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-18 22:33:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 201 bytes |
| 記録 | |
| コンパイル時間 | 520 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2025-04-18 22:34:04 |
| 合計ジャッジ時間 | 1,704 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 6 WA * 10 |
ソースコード
n=int(input()) if n<5: print(0) quit() s=input() ans=0 for i in range(n-4): for j in range(i+1,n-2): if s[i]==s[j]: if set(s[i+1:j]) > set(s[j+1:]) or len(set(s[j+1:]))>3: ans+=1 print(ans)