結果

問題 No.725 木は明らかに森である
ユーザー rhincodon66rhincodon66
提出日時 2019-02-10 03:49:51
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 417 bytes
コンパイル時間 1,541 ms
コンパイル使用メモリ 166,836 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-17 20:46:59
合計ジャッジ時間 2,366 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
4,376 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define pb push_back
#define mp make_pair
#define rep(i,n) for(int i=0;i<(n);++i)

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	string s;cin >> s;
	int n=s.size();
	string t="treeone",u="forest",ans="";
	rep(i,n-6){
		if(s.substr(i,7)==t){
			ans+=u;
			i+=6;
		}
		else ans+=s.at(i);
	}
	cout << ans << endl;
}
0