結果
問題 | No.447 ゆきこーだーの雨と雪 (2) |
ユーザー | oemon |
提出日時 | 2016-11-18 23:52:54 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,805 bytes |
コンパイル時間 | 1,159 ms |
コンパイル使用メモリ | 115,104 KB |
実行使用メモリ | 32,652 KB |
最終ジャッジ日時 | 2024-05-04 19:04:35 |
合計ジャッジ時間 | 2,859 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
27,484 KB |
testcase_01 | AC | 36 ms
25,824 KB |
testcase_02 | AC | 38 ms
25,648 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
コンパイルメッセージ
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; namespace C { class Program { static void Main(string[] args) { var N = int.Parse(Console.ReadLine()); var Ls = Console.ReadLine().Split(' ').Select(l => int.Parse(l)).ToArray(); var T = int.Parse(Console.ReadLine()); var NamePs = Enumerable.Range(0, T) .Select(i => Console.ReadLine().Split(' ')) .ToArray(); var results = new Dictionary<string, int[]>(); var juni = Enumerable.Range(0, N).Select(i => 1).ToArray(); var update = T; foreach (var nameP in NamePs) { var name = nameP[0]; var p = (int)(nameP[1][0]) - 65; if (!results.ContainsKey(name)) { results.Add(name, new int[N + 2]); } results[name][p] = (int)Math.Floor((double)(50 * Ls[p]) + (double)(50 * Ls[p]) / (0.8 + 0.2 * (double)juni[p])); results[name][N] = T; juni[p]++; T--; } foreach (var result in results) { result.Value[N + 1] = result.Value.Sum(); } var ordered = results.OrderByDescending(r => r.Value[N + 1]).ThenByDescending(r => r.Value[N]); var count = 1; foreach (var result in ordered) { Console.WriteLine(string.Join(" ", new[] { count.ToString(), result.Key, string.Join(" ", result.Value.Take(N)), result.Value.Take(N).Sum().ToString() })); count++; } } } }