結果

問題 No.725 木は明らかに森である
コンテスト
ユーザー ruase_
提出日時 2025-08-15 00:30:30
言語 C++23
(gcc 15.2.0 + boost 1.90.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 628 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,241 ms
コンパイル使用メモリ 196,332 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-07-14 01:08:18
合計ジャッジ時間 2,390 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 3 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//
// Created by popop on 2025/08/15.
//

#include <iostream>
#include <sstream>
#include <iostream>
#include <string>
#include <regex>



using namespace std;

std::string replaceOtherStr(std::string &replacedStr, std::string from, std::string to) {
    const unsigned int pos = replacedStr.find(from);
    const int len = from.length();

    if (pos == std::string::npos || from.empty()) {
        return replacedStr;
    }

    return replacedStr.replace(pos, len, to);
}

int main()
{
    string s;
    cin >> s;
    if (s.length() >= 7) {
        replaceOtherStr(s, "treeone", "forest");
    }

    cout << s << endl;




}
0