結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
cande398
|
| 提出日時 | 2017-10-16 00:40:45 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 1,000 ms |
| コード長 | 596 bytes |
| コンパイル時間 | 2,235 ms |
| コンパイル使用メモリ | 74,440 KB |
| 実行使用メモリ | 54,144 KB |
| 最終ジャッジ日時 | 2024-11-17 18:53:12 |
| 合計ジャッジ時間 | 5,536 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int[] sum = new int[101];
int i, num = sc.nextInt();
int[] score = new int[num];
for(i=0;i<num;i++){
score[i] = sc.nextInt();
}
for(i=0;i<num;i++){
sum[sc.nextInt()] += score[i];
}
for(i=1;i<101;i++){
if(sum[0] < sum[i]){
System.out.println("NO");
break;
}
if(i==100)System.out.println("YES");
}
}
}
cande398