結果
| 問題 | No.216 FAC |
| コンテスト | |
| ユーザー |
TatsuDX
|
| 提出日時 | 2016-09-09 00:35:34 |
| 言語 | Java (openjdk 26.0.2.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 70 ms / 1,000 ms |
| + 807µs | |
| コード長 | 464 bytes |
| 記録 | |
| コンパイル時間 | 2,496 ms |
| コンパイル使用メモリ | 85,968 KB |
| 実行使用メモリ | 46,132 KB |
| 最終ジャッジ日時 | 2026-09-23 18:51:32 |
| 合計ジャッジ時間 | 6,733 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), tmp;
int[] m = new int[101];
int[] t = new int[n];
for(int i = 0; i < n; i++){
t[i] = sc.nextInt();
}
for(int i = 0; i < n; i++){
m[sc.nextInt()] += t[i];
}
for(int i = 1; i < 101; i++){
if(m[0] < m[i]){
System.out.println("NO");
return;
}
}
System.out.println("YES");
}
}
TatsuDX