結果
| 問題 | No.1511 A ? B Problem |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-21 21:32:32 |
| 言語 | Rust (1.94.0 + proconio + num + itertools) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 768 ms |
| コンパイル使用メモリ | 189,808 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-26 10:34:35 |
| 合計ジャッジ時間 | 3,725 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 |
コンパイルメッセージ
warning: function `input` is never used
--> src/main.rs:9:4
|
9 | fn input<T: std::str::FromStr>() -> T {
| ^^^^^
|
= note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default
ソースコード
fn main() {
let (a, b) : (u32, u32) = input_t();
println!("{}", (a|b) - (a&b))
}
fn input<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
fn input_t<T: std::str::FromStr, U: std::str::FromStr>() -> (T, U) {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let s = s.trim().split_whitespace().collect::<Vec<&str>>();
(s[0].parse().ok().unwrap(), s[1].parse().ok().unwrap())
}