結果
| 問題 | No.857 素振り |
| コンテスト | |
| ユーザー |
pazzle1230
|
| 提出日時 | 2019-08-09 21:22:19 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 0 ms / 1,000 ms |
| + 874µs | |
| コード長 | 654 bytes |
| 記録 | |
| コンパイル時間 | 702 ms |
| コンパイル使用メモリ | 184,504 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-18 12:24:35 |
| 合計ジャッジ時間 | 2,315 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 |
コンパイルメッセージ
warning: unused import: `std::collections::HashSet` --> src/main.rs:1:5 | 1 | use std::collections::HashSet; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
ソースコード
use std::collections::HashSet;
#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
buf.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
let mut buf = String::new();
std::io::stdin().read_line(&mut buf).unwrap();
buf.trim().split_whitespace()
.map(|x| x.parse().ok().unwrap()).collect()
}
fn main() {
let xyz = read_vec::<u64>();
let mut res = xyz[2];
if xyz[2] >= xyz[0] {
res -= 1;
}
if xyz[2] >= xyz[1] {
res -= 1;
}
println!("{}", res);
}
pazzle1230