結果
| 問題 |
No.2738 CPC To F
|
| コンテスト | |
| ユーザー |
vwxyz
|
| 提出日時 | 2024-07-17 08:52:10 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 383 bytes |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 16,776 KB |
| 最終ジャッジ日時 | 2024-07-17 08:52:13 |
| 合計ジャッジ時間 | 2,204 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | WA * 22 |
ソースコード
N=int(input())
S=input()
idx=[]
for i in range(N):
if S[i]=="T":
if i<3 and S[i-3:i]!="CPC":
continue
if i+2<=N and S[i+1:i+2]=="F" or i+4<=N and S[i+1:i+4]=="CPC":
idx.append(i)
le=len(idx)
use=[]
for i in idx:
if use:
p=use[-1]
if S[p+1]=="C" and i-p<=6:
continue
use.append(i)
ans=len(use)
print(ans)
vwxyz