結果
| 問題 |
No.3288 Sloppy Land Grading
|
| コンテスト | |
| ユーザー |
13d0ccc0-b63b-11f0-9490-db448702d40f
|
| 提出日時 | 2025-10-31 22:01:41 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 1,167 bytes |
| コンパイル時間 | 12,071 ms |
| コンパイル使用メモリ | 400,056 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-31 22:01:57 |
| 合計ジャッジ時間 | 13,976 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
#[allow(unused_macros)]
// https://earthly.dev/blog/rust-macros/
macro_rules! exit_with_print {
($x: expr) => {
println!("{}", $x);
exit(0);
};
}
fn main() {
let mut out = BufWriter::new(stdout().lock());
input! {t: usize}
for _ in 0 .. t {
//input! {a: i64, b: i64, c: i64, x: i64, y: i64, z: i64}
input! {inp: [i64; 6]}
let posa = (inp[1] - inp[0]).abs() * inp[4] + (inp[2] - inp[0]).abs() * inp[5];
let posb = (inp[1] - inp[0]).abs() * inp[3] + (inp[2] - inp[1]).abs() * inp[5];
let posc = (inp[2] - inp[0]).abs() * inp[3] + (inp[2] - inp[1]).abs() * inp[4];
writeln!(out, "{} ", min(posa, min(posb, posc))).unwrap();
}
}
#[allow(unused_imports)]
use {
//ac_library::*,
//itertools::Itertools,
proconio::{fastout, input, marker::Bytes, marker::Chars, marker::Usize1},
//rustc_hash::{FxHashMap, FxHashSet},
std::{
cmp::{max, min, Reverse},
collections::{BTreeMap, BinaryHeap, VecDeque},
convert::TryInto,
io::{self, stdout, BufRead, BufWriter, Write},
num::*,
ops::BitXor,
process::exit,
},
};
13d0ccc0-b63b-11f0-9490-db448702d40f