結果
問題 |
No.2738 CPC To F
|
ユーザー |
|
提出日時 | 2024-04-20 17:48:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 468 bytes |
コンパイル時間 | 650 ms |
コンパイル使用メモリ | 72,404 KB |
実行使用メモリ | 13,640 KB |
最終ジャッジ日時 | 2024-10-12 13:44:53 |
合計ジャッジ時間 | 4,264 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | TLE * 1 -- * 21 |
ソースコード
#include <iostream> #include <vector> #include <set> #include <string> #include <algorithm> using namespace std; int main() { int n; string s; cin >> n >> s; while (s.find("CPCTCPC") != string::npos){ s.replace(s.find("CPCTCPC"), 7, "CPCTF"); } int count = 0; for (int i = 0; i < s.size(); i++) { if(s.find("CPCTF") != string::npos){ count++; } } cout << count; //cout << s; return 0; }