結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2019-03-15 21:18:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 533 ms |
コンパイル使用メモリ | 65,792 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-01 20:06:31 |
合計ジャッジ時間 | 1,449 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>#include <algorithm>using namespace std;int n;int a[101], b[101], c[101];int main(){cin >> n;for (int i = 0; i < n; i++)cin >> a[i];for (int i = 0; i < n; i++){cin >> b[i];c[b[i]] += a[i];}bool f = 0;for (int i = 1; i <= 100; i++){if (c[0] < c[i])f = 1;}cout << (f ? "NO" : "YES") << endl;}