結果
問題 |
No.725 木は明らかに森である
|
ユーザー |
![]() |
提出日時 | 2018-09-07 20:20:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 878 bytes |
コンパイル時間 | 693 ms |
コンパイル使用メモリ | 83,308 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 00:57:57 |
合計ジャッジ時間 | 1,188 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#include<iostream> #include<iomanip> #include<algorithm> #include<cmath> #include<vector> #include<string> #include<bitset> #include<queue> #include<set> #include<map> using namespace std; #define FOR(i,a,b) for (int i=(a);i<(b);++i) #define ROF(i,b,a) for (int i=(b);i>(a);--i) #define REP(i,n) FOR(i,0,n) #define PER(i,n) ROF(i,n-1,-1) typedef int i32; typedef long long int i64; typedef unsigned long long int ui64; typedef float f32; typedef double f64; typedef long double f128; typedef pair<int,int> Pi; constexpr int INF = 1e9 + 7; constexpr int dx[4] = {1,0,-1,0}, dy[4] = {0,1,0,-1}; int main() { string s; cin>>s; string ans = ""; int i = 0; while(i<s.size()) { if(s.substr(i,7)=="treeone") { ans += "forest"; i += 7; } else { ans += s[i]; i++; } } cout<<ans<<endl; }