結果
問題 | No.231 めぐるはめぐる (1) |
ユーザー | kmtrc130 |
提出日時 | 2019-03-19 11:31:15 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 71 ms / 1,000 ms |
コード長 | 909 bytes |
コンパイル時間 | 5,832 ms |
コンパイル使用メモリ | 104,792 KB |
実行使用メモリ | 23,900 KB |
最終ジャッジ日時 | 2023-10-11 16:37:34 |
合計ジャッジ時間 | 5,888 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
21,776 KB |
testcase_01 | AC | 68 ms
21,712 KB |
testcase_02 | AC | 67 ms
21,756 KB |
testcase_03 | AC | 68 ms
21,732 KB |
testcase_04 | AC | 70 ms
21,688 KB |
testcase_05 | AC | 68 ms
23,836 KB |
testcase_06 | AC | 71 ms
23,900 KB |
testcase_07 | AC | 68 ms
21,784 KB |
testcase_08 | AC | 69 ms
21,792 KB |
testcase_09 | AC | 68 ms
23,732 KB |
testcase_10 | AC | 67 ms
21,912 KB |
testcase_11 | AC | 66 ms
23,756 KB |
testcase_12 | AC | 69 ms
23,864 KB |
コンパイルメッセージ
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(); } }