結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
ruase_
|
| 提出日時 | 2025-08-15 00:39:30 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 586 bytes |
| コンパイル時間 | 1,152 ms |
| コンパイル使用メモリ | 115,916 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-08-15 00:39:32 |
| 合計ジャッジ時間 | 1,741 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 1 |
ソースコード
//
// Created by popop on 2025/08/15.
//
#include <iostream>
#include <sstream>
#include <iostream>
#include <string>
#include <regex>
using namespace std;
bool ReplaceOnce(std::string& s, const std::string& origin, const std::string& dest)
{
if (origin.empty()) return false;
std::size_t pos = s.find(origin);
if (pos == std::string::npos) return false;
s.replace(pos, origin.size(), dest);
return true;
}
int main()
{
string s;
cin >> s;
for (int _ = 0; _ < 25; _++) {
ReplaceOnce(s, "treeone", "forest");
}
cout << s << endl;
}
ruase_