結果
問題 | No.2738 CPC To F |
ユーザー | mersnn621 |
提出日時 | 2024-04-20 14:07:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 289 bytes |
コンパイル時間 | 5,946 ms |
コンパイル使用メモリ | 284,400 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 09:40:17 |
合計ジャッジ時間 | 7,227 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 22 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; string a; cin >> a; string str1 = regex_replace(a, regex("CPCTCPC"), "CPCTF"); int count = 0; for(int i=0;i<str1.size()-4;i++){ if(str1.substr(i,5) == "CPCTF"){ count++; } } cout << count << endl; }