結果

問題 No.216 FAC
ユーザー face4face4
提出日時 2018-04-21 17:50:49
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 398 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 66,164 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 05:25:47
合計ジャッジ時間 1,386 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 + 100);
    if(min == B)    cout << "YES";
    else            cout << "NO";
    cout << endl;

    return 0;
}
0