結果

問題 No.725 木は明らかに森である
ユーザー NOSS
提出日時 2018-10-29 20:28:01
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 371 bytes
コンパイル時間 1,773 ms
コンパイル使用メモリ 168,972 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-19 08:10:43
合計ジャッジ時間 2,336 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    vector<int> ls;
    int i = 0;
    cin >> s;
    while(s.find("treeone",i) != s.npos){
        i = s.find("treeone",i);
        ls.push_back(i);
        i++;
    }
    for(int k = ls.size()-1; k>=0; k--){
        s.replace(ls[k],ls[k]+7,"forest");
    }
    cout << s << endl;
    return 0;
}
0