結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-09-09 23:23:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 349 bytes |
| コンパイル時間 | 682 ms |
| コンパイル使用メモリ | 57,008 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-24 11:17:26 |
| 合計ジャッジ時間 | 1,822 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 3 RE * 3 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
const string from = "treeone";
const string to = "forest";
cin >> s;
unsigned int pos = s.find(from);
if (pos == string::npos) {
cout << s << endl;
} else {
cout << s.replace(pos, from.length(), to);
}
return 0;
}