結果
| 問題 | No.725 木は明らかに森である |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-11 00:35:44 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| 記録 | |
| コンパイル時間 | 145 ms |
| コンパイル使用メモリ | 41,236 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-17 07:29:30 |
| 合計ジャッジ時間 | 927 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 4 |
ソースコード
#include <cstdio>
#include <cstring>
int main(){
const char Tree[8]="treeone";
char str[100+1];
scanf("%s",str);
for(int pos=0;pos<strlen(str);pos++){
int k=0;
for(;pos+k<strlen(str) && k<7;k++){
if(str[pos+k]!=Tree[k])break;
}
if(k==7){
printf("forest");pos+=7-1;
}else{
for(int l=0;l<=k;l++)printf("%c",str[pos+l]);
pos+=k;
}
}printf("\n");
return 0;
}