Submission #1869388
Source Code Expand
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, VecDeque};
#[allow(unused_imports)]
use std::iter::FromIterator;
#[allow(unused_imports)]
use std::io::stdin;
mod util {
use std::io::stdin;
use std::str::FromStr;
use std::fmt::Debug;
#[allow(dead_code)]
pub fn line() -> String {
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.trim().to_string()
}
#[allow(dead_code)]
pub fn gets<T: FromStr>() -> Vec<T>
where
<T as FromStr>::Err: Debug,
{
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.split_whitespace()
.map(|t| t.parse().unwrap())
.collect()
}
}
#[allow(unused_macros)]
macro_rules! get {
($t:ty) => {
{
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.trim().parse::<$t>().unwrap()
}
};
($($t:ty),*) => {
{
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
(
$(iter.next().unwrap().parse::<$t>().unwrap(),)*
)
}
};
($t:ty; $n:expr) => {
(0..$n).map(|_|
get!($t)
).collect::<Vec<_>>()
};
($($t:ty),*; $n:expr) => {
(0..$n).map(|_|
get!($($t),*)
).collect::<Vec<_>>()
};
($t:ty ;;) => {
{
let mut line: String = String::new();
stdin().read_line(&mut line).unwrap();
line.split_whitespace()
.map(|t| t.parse::<$t>().unwrap())
.collect::<Vec<_>>()
}
};
}
#[allow(unused_macros)]
macro_rules! debug {
($($a:expr),*) => {
println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
}
}
fn main() {
let (a, b, c) = get!(u64, u64, u64);
if a % 2 == 0 || b % 2 == 0 || c % 2 == 0 {
println!("{}", 0);
return;
}
println!("{}", [a * b, b * c, a * c].into_iter().min().unwrap());
}
Submission Info
Submission Time |
|
Task |
A - Divide a Cuboid |
User |
hatoo |
Language |
Rust (1.15.1) |
Score |
200 |
Code Size |
2390 Byte |
Status |
AC |
Exec Time |
2 ms |
Memory |
4352 KB |
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
200 / 200 |
Status |
|
|
Set Name |
Test Cases |
Sample |
0_00.txt, 0_01.txt, 0_02.txt |
All |
0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt |
Case Name |
Status |
Exec Time |
Memory |
0_00.txt |
AC |
2 ms |
4352 KB |
0_01.txt |
AC |
2 ms |
4352 KB |
0_02.txt |
AC |
2 ms |
4352 KB |
1_00.txt |
AC |
2 ms |
4352 KB |
1_01.txt |
AC |
2 ms |
4352 KB |
1_02.txt |
AC |
2 ms |
4352 KB |
1_03.txt |
AC |
2 ms |
4352 KB |
1_04.txt |
AC |
2 ms |
4352 KB |
1_05.txt |
AC |
2 ms |
4352 KB |