結果
問題 | No.8063 幅優先探索 |
ユーザー |
![]() |
提出日時 | 2024-09-04 15:03:38 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 733 bytes |
コンパイル時間 | 13,279 ms |
コンパイル使用メモリ | 403,056 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-04 15:03:53 |
合計ジャッジ時間 | 13,366 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
use std::io; use std::io::prelude::*; fn main() { let stdin = io::read_to_string(io::stdin()).unwrap(); let mut stdin = stdin.split_whitespace(); let stdout = io::stdout(); let mut stdout = io::BufWriter::new(stdout.lock()); let _: isize = stdin.next().unwrap().parse::<isize>().unwrap(); let _: isize = stdin.next().unwrap().parse::<isize>().unwrap(); let sy: isize = stdin.next().unwrap().parse::<isize>().unwrap(); let sx: isize = stdin.next().unwrap().parse::<isize>().unwrap(); let gy: isize = stdin.next().unwrap().parse::<isize>().unwrap(); let gx: isize = stdin.next().unwrap().parse::<isize>().unwrap(); writeln!(stdout, "{}", (sx - gx).abs() + (sy - gy).abs()).unwrap_or(()); }