結果

問題 No.725 木は明らかに森である
ユーザー ruase_
提出日時 2025-08-15 00:30:30
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 628 bytes
コンパイル時間 2,665 ms
コンパイル使用メモリ 114,968 KB
実行使用メモリ 6,272 KB
最終ジャッジ日時 2025-08-15 00:30:35
合計ジャッジ時間 2,652 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 3 RE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

//
// 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