結果
問題 |
No.725 木は明らかに森である
|
ユーザー |
|
提出日時 | 2018-08-25 20:45:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 477 bytes |
コンパイル時間 | 1,533 ms |
コンパイル使用メモリ | 168,700 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 20:35:19 |
合計ジャッジ時間 | 1,953 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 2 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFL 0x3f3f3f3f3f3f3f3f #define EPS (1e-10) using namespace std; typedef long long ll; typedef pair<int,int>P; string l="treeone"; signed main(){ string s;cin>>s; string t; string k; for(char c:s){ if(c==l[k.size()]){ k+=c; if(k.size()==l.size()){ t+="forest"; k=""; } } else{ t+=k;t+=c; k=""; } } t+=k; cout<<t<<endl; }