結果
| 問題 | No.725 木は明らかに森である |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-28 23:35:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 480 bytes |
| 記録 | |
| コンパイル時間 | 428 ms |
| コンパイル使用メモリ | 56,032 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-18 11:19:05 |
| 合計ジャッジ時間 | 1,235 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 3 RE * 3 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
string replaceOtherStr(string &replacedStr, string from, 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;
replaceOtherStr(s, "treeone", "forest");
cout << s << endl;
return 0;
}