結果

問題 No.216 FAC
ユーザー nanophoto12nanophoto12
提出日時 2015-12-13 22:23:31
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 31 ms / 1,000 ms
コード長 617 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 113,384 KB
実行使用メモリ 27,420 KB
最終ジャッジ日時 2024-04-23 01:29:43
合計ジャッジ時間 2,599 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
25,236 KB
testcase_01 AC 29 ms
25,248 KB
testcase_02 AC 30 ms
25,504 KB
testcase_03 AC 29 ms
25,376 KB
testcase_04 AC 29 ms
27,276 KB
testcase_05 AC 30 ms
25,244 KB
testcase_06 AC 30 ms
27,288 KB
testcase_07 AC 29 ms
25,376 KB
testcase_08 AC 29 ms
25,380 KB
testcase_09 AC 29 ms
25,368 KB
testcase_10 AC 29 ms
25,236 KB
testcase_11 AC 29 ms
27,160 KB
testcase_12 AC 30 ms
25,264 KB
testcase_13 AC 29 ms
25,244 KB
testcase_14 AC 30 ms
22,972 KB
testcase_15 AC 30 ms
25,244 KB
testcase_16 AC 29 ms
25,264 KB
testcase_17 AC 31 ms
27,420 KB
testcase_18 AC 29 ms
25,112 KB
testcase_19 AC 29 ms
25,504 KB
testcase_20 AC 30 ms
25,380 KB
testcase_21 AC 29 ms
25,240 KB
testcase_22 AC 29 ms
23,088 KB
testcase_23 AC 30 ms
25,012 KB
testcase_24 AC 30 ms
27,164 KB
testcase_25 AC 28 ms
23,348 KB
testcase_26 AC 29 ms
25,364 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

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");
		}
	}
}
0