結果
| 問題 | 
                            No.725 木は明らかに森である
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-09-09 23:29:26 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 373 bytes | 
| コンパイル時間 | 758 ms | 
| コンパイル使用メモリ | 57,280 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-24 11:32:39 | 
| 合計ジャッジ時間 | 1,288 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 6 WA * 3 | 
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
    string s;
    const string from = "treeone";
    const string to = "forest";
    cin >> s;
    string::size_type pos = 0;
    while ((pos = s.find(from, pos)) != string::npos) {
        s.replace(pos, from.length(), to);
        pos += from.length();
    }
    cout << s << endl;
    return 0;
}