結果

問題 No.725 木は明らかに森である
ユーザー chacoder1
提出日時 2020-11-22 14:17:50
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 193,492 KB
最終ジャッジ日時 2025-01-16 04:22:31
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  string S;
  cin>>S;
  if(S.length()<7){
    cout<<S<<endl;
    return 0;
  }
  for(int i=0;i<S.length()-6;i++){
    if(S.substr(i,7)=="treeone"){
      S.replace(i,7,"forest");
      i+=5;
    }
  }
  cout<<S<<endl;
  return 0;
}
0