結果
問題 | No.216 FAC |
ユーザー |
|
提出日時 | 2018-04-21 17:51:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 398 bytes |
コンパイル時間 | 501 ms |
コンパイル使用メモリ | 66,560 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 05:25:49 |
合計ジャッジ時間 | 1,371 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include<iostream>#include<algorithm>using namespace std;int main(){int A[100] = {}, B[101] = {}, n, x;cin >> n;for(int i = 0; i < n; i++) cin >> A[i];for(int i = 0; i < n; i++){cin >> x;B[x] += A[i];}int *min = max_element(B, B + 101);if(min == B) cout << "YES";else cout << "NO";cout << endl;return 0;}