結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-04-20 15:24:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 416 bytes |
コンパイル時間 | 1,789 ms |
コンパイル使用メモリ | 166,820 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 11:04:07 |
合計ジャッジ時間 | 2,428 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | WA * 22 |
ソースコード
#define DEBUG #include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; string S; cin >> S; long long ans = 0; for(int i = 0; i < N; i++){ string s = S.substr(i, 7); if(s == "CPCTCPC"){ ans++; i += 7; }else if(s == "CPCTF"){ ans++; i += 5; } } cout << ans << endl; return 0; }