結果
問題 | No.627 ランダムウォークの軌跡 |
ユーザー |
|
提出日時 | 2020-02-09 12:37:17 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 488 bytes |
コンパイル時間 | 11,258 ms |
コンパイル使用メモリ | 377,468 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 05:52:19 |
合計ジャッジ時間 | 11,796 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
use std::io::Read; fn main() { let mut all_data = String::new(); std::io::stdin().read_to_string(&mut all_data).ok(); let mut all_data = all_data.trim().split('\n').map(|s| s.trim()); let t: usize = all_data.next().unwrap().parse().unwrap(); let mut pos: isize = 0; for i in all_data.take(t).map(|x| x.parse::<isize>().unwrap()) { if (i-pos).abs() != 1 { println!("F"); return; } pos = i; } println!("T"); }