結果
| 問題 |
No.725 木は明らかに森である
|
| コンテスト | |
| ユーザー |
Kura
|
| 提出日時 | 2019-02-15 18:51:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 487 bytes |
| コンパイル時間 | 647 ms |
| コンパイル使用メモリ | 55,004 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-15 11:37:42 |
| 合計ジャッジ時間 | 1,459 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 6 RE * 1 |
ソースコード
#include<iostream>
#include<string>
using namespace std;
int main() {
string S;
cin >> S;
for (int i = 0; i < S.length() - 6; i++) {
if (S[i] == 't'&&S[i + 1] == 'r'&&S[i + 2] == 'e'&&S[i + 3] == 'e'&&S[i + 4] == 'o'&&S[i + 5] == 'n'&&S[i + 6] == 'e') {
S[i] = 'f'; S[i + 1] = 'o'; S[i + 2] = 'r'; S[i + 3] = 'e'; S[i + 4] = 's'; S[i + 5] = 't';
for (int j = i + 6; j < S.length() - 1; j++) {
S[j] = S[j + 1];
}
S[S.length() - 1] = '\0';
}
}
cout << S << endl;
}
Kura