結果
| 問題 |
No.208 王将
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-09 23:30:21 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 551 bytes |
| コンパイル時間 | 13,272 ms |
| コンパイル使用メモリ | 380,660 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 01:30:13 |
| 合計ジャッジ時間 | 14,421 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
ソースコード
use std::io::*;
fn main() {
let mut s: String = String::new();
std::io::stdin().read_to_string(&mut s).ok();
let mut itr = s.trim().split_whitespace();
let x: i64 = itr.next().unwrap().parse().unwrap();
let y: i64 = itr.next().unwrap().parse().unwrap();
let x2: i64 = itr.next().unwrap().parse().unwrap();
let y2: i64 = itr.next().unwrap().parse().unwrap();
if x2 < x && y2 < y && x2 == y2 && x == y {
println!("{}", std::cmp::max(x, y) + 1);
} else {
println!("{}", std::cmp::max(x, y));
}
}