結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2015-12-13 22:23:31 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 1,000 ms |
コード長 | 617 bytes |
コンパイル時間 | 810 ms |
コンパイル使用メモリ | 106,368 KB |
実行使用メモリ | 19,200 KB |
最終ジャッジ日時 | 2024-10-15 00:43:54 |
合計ジャッジ時間 | 2,241 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
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 No216{class MainClass{public static void Main (string[] args){int[] scores = new int[101];Console.ReadLine ();var perScore = Console.ReadLine ().Split (' ').Select (v => Convert.ToInt32 (v)).ToArray ();var answer = Console.ReadLine ().Split (' ').Select (v => Convert.ToInt32 (v)).ToArray ();for (int i = 0; i < answer.Length; i++) {scores [answer [i]] += perScore [i];}if (scores [0] == scores.Max ()) {Console.WriteLine ("YES");return;}Console.WriteLine ("NO");}}}