結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2016-01-05 23:20:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 380 bytes |
コンパイル時間 | 469 ms |
コンパイル使用メモリ | 54,364 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-19 11:32:40 |
合計ジャッジ時間 | 1,494 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 WA * 1 |
ソースコード
#include<iostream> using namespace std; int main(void) { int i, n, a[105], b[105], c[105] = { 0 }, ans = 0; cin >> n; for (i = 0; i < n; i++)cin >> a[i]; for (i = 0; i < n; i++)cin >> b[i]; for (i = 0; i < n; i++) { c[b[i]] += a[i]; } for (i = 1; i < 100; i++){ if (c[0] < c[i])ans = 1; } if (ans != 0)cout << "NO" << endl; else cout << "YES" << endl; return 0; }