結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2019-01-25 01:46:14 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 758 bytes |
コンパイル時間 | 883 ms |
コンパイル使用メモリ | 108,288 KB |
実行使用メモリ | 19,584 KB |
最終ジャッジ日時 | 2024-09-16 04:44:38 |
合計ジャッジ時間 | 2,529 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 19 RE * 5 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Linq; class Program { static void Main(string[] args) { // 入力 var N = int.Parse(Console.ReadLine()); var points = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var solvers = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var results = solvers.Zip(points, (number, score) => new { N = number, S = score }).ToList(); var r2 = results.GroupBy(x => new { x.N }).Select(x => new { N = x.Key.N, S = x.Sum(d => d.S) }).ToList(); var myScore = r2.Where(x => x.N == 0).Max(x => x.S); var max = r2.Max(x => x.S); if (myScore >= max) Console.WriteLine("YES"); else Console.WriteLine("NO"); } }