結果

問題 No.725 木は明らかに森である
ユーザー troro_kelptroro_kelp
提出日時 2018-08-25 13:59:03
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 1,161 bytes
コンパイル時間 967 ms
コンパイル使用メモリ 95,588 KB
実行使用メモリ 8,196 KB
最終ジャッジ日時 2023-09-08 05:38:10
合計ジャッジ時間 2,019 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
8,056 KB
testcase_01 AC 4 ms
8,196 KB
testcase_02 AC 3 ms
8,068 KB
testcase_03 AC 3 ms
8,124 KB
testcase_04 AC 4 ms
8,144 KB
testcase_05 AC 4 ms
8,016 KB
testcase_06 AC 3 ms
8,060 KB
testcase_07 AC 3 ms
8,196 KB
testcase_08 AC 4 ms
8,128 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>
#include <queue>
#include <numeric>
#include <climits>
#include <iterator>
#include <iomanip>
#include <stack>
#include <bitset>
#include <functional>
using namespace std;
const constexpr int INF = 1e9;
//typedef std::pair<std::string,double> P;
 
 
typedef long long ll;
typedef vector<int> VI;
    
vector<pair<int, int> > vp;
 
struct Less {
    bool operator()(const pair<int, int>& x, const pair<int, int>& y) const {
        return x.first > y.first;
    }
};
#define FOR(i, a, n) for (ll i = (ll)a; i<(ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)

ll GCD(ll a, ll b){
    if(b==0) return a;
    return GCD(b, a%b);
}
//グラフの隣接リスト
VI g[200010];
//頂点の入次数を管理
int h[100010];
int n, k;
string s;
ll a[200020];
int main(void) {
    cin >> s;
    for(int i=0; i<8; ++i){
        s+="a";
    }
    for(int i=0; i<s.size()-8; ++i){
        string temp = s.substr(i, 7);
        if(temp == "treeone"){
            cout << "forest";
            i+=6;
        }
        else cout << s[i];
    }
    cout << endl;
	return 0;
}
0