結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2020-06-03 20:27:46 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 468 bytes |
| コンパイル時間 | 884 ms |
| コンパイル使用メモリ | 81,976 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-25 10:17:22 |
| 合計ジャッジ時間 | 1,508 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include<iostream>
#include<math.h>
#include<string.h>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<deque>
using namespace std;
int main(){
string s;
cin >> s;
if(s.size()<7){
cout << s << endl;
return 0;
}
string ans="";
for(int i=0;i<s.size();i++){
if(s[i]=='t'&&s[i+1]=='r'&&s[i+2]=='e'&&s[i+3]=='e'&&s[i+4]=='o'&&s[i+5]=='n'&&s[i+6]=='e'){
ans+="forest";
i+=6;
}else{
ans+=s[i];
}
}
cout << ans << endl;
return 0;
}
mmn15277198