結果
問題 |
No.216 FAC
|
ユーザー |
|
提出日時 | 2019-01-25 00:41:11 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 815 bytes |
コンパイル時間 | 1,027 ms |
コンパイル使用メモリ | 112,604 KB |
実行使用メモリ | 29,196 KB |
最終ジャッジ日時 | 2024-09-16 04:44:32 |
合計ジャッジ時間 | 2,612 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 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; class Program { static void Main(string[] args) { // 入力 var N = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); var b = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList(); // スコア計算 int myScore = 0; int otherScore = 0; for (int i=0; i < N; i++) { if (b[i] == 0) myScore += a[i]; if (b[i] == 1) otherScore += a[i]; } Console.WriteLine("oh->{0} : my->{1} | max->{2} : min->{3}", otherScore, myScore, a.Max(), a.Min()); // 出力 Console.WriteLine(( myScore >= otherScore || myScore >= a.Max()) ? "YES" : "NO"); } }