結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2018-08-27 19:13:16 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 429 bytes |
コンパイル時間 | 471 ms |
コンパイル使用メモリ | 56,952 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 00:03:23 |
合計ジャッジ時間 | 1,440 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 WA * 2 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int a[101],b,score[100] = {}; for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < n; i++){ cin >> b; score[b] += a[i]; } if(score[0] >= *max_element(score+1,score+n)) cout << "YES" <<endl; else cout << "NO" << endl; return 0; }