結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
kenji_shioya
|
| 提出日時 | 2016-06-11 06:53:20 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 681 bytes |
| コンパイル時間 | 4,583 ms |
| コンパイル使用メモリ | 74,940 KB |
| 実行使用メモリ | 54,476 KB |
| 最終ジャッジ日時 | 2024-10-09 12:48:40 |
| 合計ジャッジ時間 | 8,514 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 WA * 8 |
ソースコード
import java.util.*;
public class Exercise76{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] scores = new int[n];
int[] solved = new int[n];
int othersScore = 0;
int ksScore = 0;
for (int i = 0; i < n; i++){
scores[i] = sc.nextInt();
}
for (int i = 0; i < n; i++){
solved[i] = sc.nextInt();
}
for (int j = 0; j < n; j++){
if(solved[j] == 0){
ksScore += scores[j];
}else{
othersScore += scores[j];
}
}
if(ksScore < othersScore){
System.out.println("NO");
}else{
System.out.println("YES");
}
}
}
kenji_shioya