結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2015-12-13 18:11:14 |
言語 | Java (openjdk 23) |
結果 |
RE
|
実行時間 | - |
コード長 | 575 bytes |
コンパイル時間 | 3,445 ms |
コンパイル使用メモリ | 74,708 KB |
実行使用メモリ | 54,568 KB |
最終ジャッジ日時 | 2024-09-15 11:44:57 |
合計ジャッジ時間 | 8,119 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 RE * 15 |
ソースコード
public class No_216 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); int n = sc.nextInt(); int[] score = new int[n]; int[] user = new int[n]; for (int i = 0; i < n; i++) { score[i] = sc.nextInt(); } for (int i = 0; i < n; i++) { int j = sc.nextInt(); user[j] += score[i]; } sc.close(); boolean b = true; for (int i = 1; i < n; i++) { if (user[0] < user[i]) { b = false; break; } } if (b) { System.out.println("YES"); } else { System.out.println("NO"); } } }