結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2015-06-10 22:14:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 507 bytes |
コンパイル時間 | 512 ms |
コンパイル使用メモリ | 62,192 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 00:38:30 |
合計ジャッジ時間 | 1,356 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream>#include <vector>#include <algorithm>using namespace std;typedef long long LL;int main(){vector<LL> score(101);int N;cin >> N;vector<LL> val(N);for(int i = 0; i < N; i++){cin >> val[i];}for(int i = 0; i < N; i++){int p;cin >> p;score[p] += val[i];}if(score[0] >= *max_element(score.begin(), score.end())){cout << "YES" << endl;}else{cout << "NO" << endl;}return 0;}