結果

問題 No.216 FAC
コンテスト
ユーザー Maeda
提出日時 2025-03-28 10:32:20
言語 C
(gcc 15.2.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 556 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 397 ms
コンパイル使用メモリ 39,940 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2026-01-07 14:51:07
合計ジャッジ時間 1,151 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 3
other RE * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <stdio.h>

void main(void){
    int n = 0;
    scanf("%d",&n);
    int pointList[n] = {};
    for(int i = 0 ; i < n ; i++){
        scanf("%d",&pointList[i]);
    }
    int score[101] = {};
    for(int i = 0 ; i < n ; i++){
        int answer = 0;
        scanf("%d",&answer);
        score[answer] += pointList[i];
    }
    int max = score[0];
    for(int i = 0 ; i < 101 ; i++){
        if(max < score[i]){
            max = score[i];
        }
    }
    if(max <= score[0]){
        printf("YES");
    }else{
        printf("NO");
    }
    
}
0