結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-24 21:32:36 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 509 bytes |
| コンパイル時間 | 1,689 ms |
| コンパイル使用メモリ | 166,052 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-23 06:45:09 |
| 合計ジャッジ時間 | 2,242 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i=a; i<n; i++)
#define RREP(i, a, n) for(ll i=n-1; i>=a; i--)
typedef long long ll;
const ll mod =1e9+7;
const ll inf =1e18;
using namespace std;
string s;
int main() {
cin>>s;
ll idx=0;
ll num=s.find("treeone", idx);
while(num != string::npos){
REP(i, idx, num) cout<<s[i];
cout<<"forest";
idx=num+7;
num=s.find("treeone", idx);
}
REP(i, idx, s.size()) cout<<s[i];
cout<<endl;
return 0;
}