結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
signal_kernel
|
| 提出日時 | 2018-08-31 22:08:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 423 ms |
| コンパイル使用メモリ | 55,600 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-13 22:48:19 |
| 合計ジャッジ時間 | 915 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
ソースコード
#include <iostream>
#include <string>
int main()
{
std::string T = "treeone";
std::string F = "forest";
std::string S;
std::cin >> S;
size_t place = 0;
size_t tree;
while (place < S.length())
{
tree = S.find(T, place);
if (tree == -1) { break; }
S.replace(tree, T.length(), F);
place = tree + F.length();
}
std::cout << S << std::endl;
return 0;
}
signal_kernel