結果
| 問題 | No.725 木は明らかに森である |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-14 13:44:39 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 77µs | |
| コード長 | 585 bytes |
| 記録 | |
| コンパイル時間 | 647 ms |
| コンパイル使用メモリ | 176,232 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-10-14 13:44:42 |
| 合計ジャッジ時間 | 2,627 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 |
コンパイルメッセージ
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:15:22
|
15 | for j in (0..7){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
15 - for j in (0..7){
15 + for j in 0..7 {
|
ソースコード
use proconio::input;
fn main(){
input!{
s:String,
}
let c:Vec<char>=s.chars().collect();
let mut q=0;
let m=c.len();
let k:Vec<char>="treeone".chars().collect();
while q<m{
if q+7>m{
print!("{}",c[q]);q+=1
} else {
let mut s=1;
for j in (0..7){
if c[q+j]!=k[j]{
s=0;break;
}
}
if s==1{
print!("{}","forest");q+=7
} else {
print!("{}",c[q]);q+=1;
}
}
}
}