結果
問題 |
No.998 Four Integers
|
ユーザー |
|
提出日時 | 2020-04-29 20:55:38 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 489 bytes |
コンパイル時間 | 19,029 ms |
コンパイル使用メモリ | 401,364 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 20:35:11 |
合計ジャッジ時間 | 19,432 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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 mut a: Vec<usize> = (0..4) .map(|_| itr.next().unwrap().parse().unwrap()) .collect(); a.sort(); let mut ok = true; for i in 0..3 { if a[i] + 1 != a[i + 1] { ok = false; } } if ok { println!("Yes",) } else { println!("No",) } }