結果
問題 | No.3108 Luke or Bishop |
ユーザー |
![]() |
提出日時 | 2025-04-18 23:20:11 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 683 bytes |
コンパイル時間 | 12,167 ms |
コンパイル使用メモリ | 400,948 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-04-18 23:20:26 |
合計ジャッジ時間 | 13,415 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
#![allow( dead_code, non_snake_case, unused_imports, unused_mut, unused_variables, while_true, unused_assignments, clippy::needless_range_loop, clippy::ptr_arg, clippy::type_complexity, clippy::unnecessary_cast )] use proconio::{input, marker::Usize1 as usize1, marker::Usize1 as us1}; use std::collections::{BinaryHeap, HashMap, HashSet, VecDeque}; fn sol() -> usize { input! { Gx: i64, Gy: i64, }; // 0 or 1 or 2 if Gx == 0 && Gy == 0 { return 0; } if Gx == 0 || Gy == 0 || Gx.abs() == Gy.abs() { return 1; } 2 } fn main() { let ans = sol(); println!("{}", ans); }