結果
問題 | No.725 木は明らかに森である |
ユーザー |
![]() |
提出日時 | 2018-09-06 08:54:30 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 354 bytes |
コンパイル時間 | 2,552 ms |
コンパイル使用メモリ | 162,788 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 12:38:58 |
合計ジャッジ時間 | 2,308 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; void hawawa(){ string str; cin >> str; for (int i = 0; i + 7 <= str.size(); i++) { if (str.substr(i, 7) == "treeone") { str = str.substr(0, i) + "forest" + str.substr(i + 7); i += 5; } } cout << str << "\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); hawawa(); return 0; }