結果
| 問題 | No.965 門松列が嫌い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-04 11:09:18 |
| 言語 | Rust (1.99.1 + proconio + num + itertools + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 522 bytes |
| 記録 | |
| コンパイル時間 | 4,031 ms |
| コンパイル使用メモリ | 173,796 KB |
| 実行使用メモリ | 9,812 KB |
| 最終ジャッジ日時 | 2026-12-04 11:09:24 |
| 合計ジャッジ時間 | 2,593 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 8 WA * 1 |
ソースコード
use std::io::stdin;
fn main() {
let (a, b, c) = read_three_u32();
let second = a.max(c);
let third = a.min(c);
let ans = (b - second).min(second - third);
println!("{}", ans);
}
fn read_vec_u32() -> Vec<u32> {
let mut buffer = String::new();
stdin().read_line(&mut buffer).unwrap();
buffer
.trim()
.split_whitespace()
.map(|s| s.parse().unwrap())
.collect()
}
fn read_three_u32() -> (u32, u32, u32) {
let v = read_vec_u32();
(v[0], v[1], v[2])
}