結果
問題 |
No.231 めぐるはめぐる (1)
|
ユーザー |
![]() |
提出日時 | 2019-03-19 11:31:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 36 ms / 1,000 ms |
コード長 | 909 bytes |
コンパイル時間 | 2,733 ms |
コンパイル使用メモリ | 115,012 KB |
実行使用メモリ | 27,468 KB |
最終ジャッジ日時 | 2024-09-13 15:17:06 |
合計ジャッジ時間 | 2,489 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; class Program { public void Solve() { int N = int.Parse(Console.ReadLine()); List<int[]> GD = new List<int[]>(); for (int i = 0; i < N; i++) GD.Add(Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray()); // 最大効率の狩場 var max = GD.Select((x, i) => new { value = (x[0] - 30000 * x[1]), index = i }).OrderByDescending(x => x.value).ThenBy(x=>x.index).First(); int maxPoint = 30000 * 100; if (maxPoint <= max.value * 6) { Console.WriteLine("YES"); for (int i = 1; i <= 6; i++) Console.WriteLine(max.index + 1); } else { Console.WriteLine("NO"); } } static void Main() { var solver = new Program(); solver.Solve(); } }