結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
himo
|
| 提出日時 | 2019-09-26 18:36:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 540 bytes |
| コンパイル時間 | 1,342 ms |
| コンパイル使用メモリ | 161,044 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-23 08:04:41 |
| 合計ジャッジ時間 | 2,158 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 2 |
ソースコード
#include "bits/stdc++.h"
using namespace std;
int main(){
string s;
cin >>s;
for(int i=6;i<s.size();i++){
if(s.at(i-6)=='t'&&s.at(i-5)=='r'&&s.at(i-4)=='e'&&s.at(i-3)=='e'&&s.at(i-2)=='o'&&s.at(i-1)=='n'&&s.at(i)=='e'){
cout <<"forest";
s.at(i-6)='A';
s.at(i-5)='A';
s.at(i-4)='A';
s.at(i-3)='A';
s.at(i-2)='A';
s.at(i-1)='A';
s.at(i)='A';
}
}
for(int i=0;i<s.size();i++){
if(s.at(i)=='A'){
}
else {
cout <<s.at(i);
}
}
cout <<endl;
}
himo