結果

問題 No.725 木は明らかに森である
ユーザー Pocket7878
提出日時 2018-09-09 23:26:29
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 341 bytes
コンパイル時間 675 ms
コンパイル使用メモリ 55,416 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 11:26:03
合計ジャッジ時間 1,074 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
    string s;
    const string from = "treeone";
    const string to = "forest";
    cin >> s;
    auto pos = s.find(from);
    if (pos == string::npos) {
        cout << s << endl;
    } else {
        cout << s.replace(pos, from.length(), to);
    }
    return 0;
}
0