結果

問題 No.1129 Rating じゃんけん
ユーザー かりあげクン
提出日時 2020-08-05 10:49:16
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 614 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 986 ms
コンパイル使用メモリ 184,944 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-05 07:34:28
合計ジャッジ時間 1,981 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#[warn(unused_assignments)]
fn main() {
    let mut abcd = String::new();
    std::io::stdin().read_line(&mut abcd).ok();
    let abcd: Vec<i32> = abcd.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
    let a = abcd[0];
    let b = abcd[1];
    let c = abcd[2];
    let d = abcd[3];
    let ans = if a != c {
        if a > c {
            "null"
        } else {
            "tRue"
        }
    } else if b != d{
        let e = b - d;
        if e == -1 || e == 2 {
            "null"
        } else {
            "tRue"
        }
    } else {
        "Draw"
    };
    println!("{}", ans);
}
0