結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-01-22 19:05:59 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 826 bytes |
| コンパイル時間 | 3,594 ms |
| コンパイル使用メモリ | 74,284 KB |
| 実行使用メモリ | 50,400 KB |
| 最終ジャッジ日時 | 2024-12-26 00:56:56 |
| 合計ジャッジ時間 | 6,377 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 9 |
ソースコード
package me.yukicoder.lv1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class No0216 {
public static void main(String[] args) {
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
int cnt = Integer.parseInt(br.readLine());
String[] a = br.readLine().split(" ");
String[] b = br.readLine().split(" ");
int[] score = new int[cnt];
int[] cntSolved = new int[cnt];
int sumScore = 0;
int kScore = 0;
for (int i = 0; i < cnt; i++) {
score[i] = Integer.parseInt(a[i]);
cntSolved[i] = Integer.parseInt(b[i]);
sumScore += score[i];
kScore += cntSolved[i] == 0 ? score[i] : 0;
}
System.out.println((sumScore / 2) <= kScore ? "YES" : "NO");
} catch (IOException e) {
e.printStackTrace();
}
}
}