結果
問題 | No.431 死亡フラグ |
ユーザー |
|
提出日時 | 2017-10-15 18:55:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 731 bytes |
コンパイル時間 | 10,385 ms |
コンパイル使用メモリ | 401,072 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-17 17:54:05 |
合計ジャッジ時間 | 11,174 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 |
ソースコード
#![allow(unused_macros, unused_imports, dead_code)] use std::io::*; use std::collections::*; fn read_line() -> String { let mut s = String::new(); stdin().read_line(&mut s).unwrap(); s } macro_rules! from_line { ($($a:ident : $t:ty),+) => { $(let $a: $t;)+ { let _line = read_line(); let mut _it = _line.trim().split_whitespace(); $($a = _it.next().unwrap().parse().unwrap();)+ assert!(_it.next().is_none()); } }; } fn main() { from_line!(d1: u32, d2: u32, d3: u32, s: u32); println!("{}", if s > 0 || d1 + d2 + d3 < 2 { "SURVIVED" } else { "DEAD" }); }