結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
![]() |
提出日時 | 2022-12-15 21:46:10 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 455 bytes |
コンパイル時間 | 12,809 ms |
コンパイル使用メモリ | 400,676 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 13:16:28 |
合計ジャッジ時間 | 13,856 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
ソースコード
fn main() {let mut xx = String::new();std::io::Read::read_to_string(&mut std::io::stdin(), &mut xx).ok();let xx: Vec<i64> = xx.split_whitespace().flat_map(str::parse).collect();let xx: Vec<Vec<i64>> = xx.chunks(2).map(|x| vec![x[0], -x[1]]).collect();let mut abc: Vec<usize> = (0..3).collect();abc.sort_unstable_by_key(|&i| &xx[i]);abc.reverse();for i in abc {println!("{}", ['A', 'B', 'C'][i]);}}