結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-15 02:57:21 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 659 bytes |
| コンパイル時間 | 1,385 ms |
| コンパイル使用メモリ | 106,496 KB |
| 実行使用メモリ | 19,328 KB |
| 最終ジャッジ日時 | 2024-06-28 12:52:24 |
| 合計ジャッジ時間 | 2,776 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
コンパイルメッセージ
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;
namespace _0216
{
class Program
{
static void Main(string[] args)
{
var n = int.Parse(Console.ReadLine());
var a = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
var b = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
var s1 = 0;
var s2 = 0;
for(var i = 0; i < n; i++){
if(b[i] == 0){
s1 += a[i];
}else{
s2 += a[i];
}
}
Console.WriteLine(s1 >= s2 ? "YES" : "NO");
}
}
}