結果
問題 | No.216 FAC |
ユーザー |
![]() |
提出日時 | 2015-07-08 03:10:18 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 1,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 205 ms |
コンパイル使用メモリ | 20,992 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-15 00:39:09 |
合計ジャッジ時間 | 869 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | scanf("%d", &n); | ^~~~~~~~~~~~~~~ main.c:14:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d", &a[i]); | ^~~~~~~~~~~~~~~~~~ main.c:19:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 19 | scanf("%d", &tmp); | ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void){int yesno = 1;int i,n;int a[110];int b[110];scanf("%d", &n);for(i=0;i<110;i++){a[i] = b[i] = 0;}for(i=0;i<n;i++){scanf("%d", &a[i]);}for(i=0;i<n;i++){int tmp;scanf("%d", &tmp);b[tmp] += a[i];}for(i=1;i<=100;i++){if(b[0] < b[i]){yesno = 0;break;}}if(yesno == 1 ){printf("YES\n");}else{printf("NO\n");}return 0;}