結果
問題 | No.216 FAC |
ユーザー | fumi6328 |
提出日時 | 2018-08-27 19:35:47 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 433 bytes |
コンパイル時間 | 392 ms |
コンパイル使用メモリ | 57,000 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-05 00:53:33 |
合計ジャッジ時間 | 1,295 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int a[101],b,score[101] = {}; 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+101)) cout << "YES" <<endl; else cout << "NO" << endl; //return 0; }