結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
|
提出日時 | 2020-04-27 23:51:25 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 641 bytes |
コンパイル時間 | 12,405 ms |
コンパイル使用メモリ | 379,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 15:51:06 |
合計ジャッジ時間 | 13,443 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
ソースコード
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 n: usize = itr.next().unwrap().parse().unwrap(); let mut a = Vec::new(); for i in 0..n { let b: usize = itr.next().unwrap().parse().unwrap(); let c: usize = itr.next().unwrap().parse().unwrap(); a.push((b - 30000 * c, i + 1)); } a.sort(); a.reverse(); if a[0].0 * 6 >= 3000000 { println!("YES"); for _ in 0..6 { println!("{}", a[0].1); } } else { println!("NO",); } }