結果

問題 No.208 王将
コンテスト
ユーザー tnodino
提出日時 2023-07-09 18:05:33
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 1,000 ms
コード長 332 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 699 ms
コンパイル使用メモリ 197,840 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-03 14:56:59
合計ジャッジ時間 1,593 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

use proconio::input;
use proconio::fastout;
use std::cmp::max;

#[fastout]
#[allow(non_snake_case)]
fn main() {
    input! {
        x: isize,
        y: isize,
        x2: isize,
        y2: isize,
    }
    let mut ans = max(x, y);
    if x == y && x2 == y2 && 0 < x2 && x2 < x {
        ans += 1;
    }
    println!("{}", ans);
}
0