結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2019-08-19 13:50:54 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 696 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 28,928 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-04 05:56:44 |
合計ジャッジ時間 | 987 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> int main(void) { int numofquestion; int qscore[200]={0}; int score[200]={0}; int answer[200]={0}; scanf("%d",&numofquestion); for(int i=0;i<numofquestion;i++) { scanf("%d",&qscore[i]); } for(int i=0;i<numofquestion;i++) { scanf("%d",&answer[i]); score[answer[i]]+=qscore[i]; } bool IsKcanwin=true; for(int i=1;i<=100;i++) { if(score[0]<score[i]) { IsKcanwin=false; break; } } if(IsKcanwin==true) { printf("YES"); } else { printf("NO"); } }