結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
|
提出日時 | 2020-04-27 23:44:57 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 703 bytes |
コンパイル時間 | 12,445 ms |
コンパイル使用メモリ | 379,360 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-22 15:36:34 |
合計ジャッジ時間 | 13,636 ms |
ジャッジサーバーID (参考情報) |
judge5 / 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<(i64, usize)> = (0..n) .map(|i| { ( itr.next().unwrap().parse::<i64>().unwrap() - 30000 * itr.next().unwrap().parse::<i64>().unwrap(), i + 1, ) }) .collect(); a.sort(); a.reverse(); if a[0].0 * 6 >= 3000000 { println!("YES"); for _ in 0..6 { println!("{}", a[0].1); } } else { println!("NO",); } }