提出 #549064


ソースコード 拡げる

#include<stdio.h>
int main(void){
int a[100000]={0},b=0,c=0,d,e,f=0;
scanf("%d%d",&b,&c);
for(d=0;d<b;d++){
scanf("%d",&e);
a[e]++;
}
for(d=0;d<c;d++){
scanf("%d",&e);
a[e]--;
}
for(d=0;d<100000;d++)
f+=a[d];
if(f>=0)printf("YES");else printf("NO");
printf("\n");
return 0;
}

提出情報

提出日時
問題 C - 旅館
ユーザ piburusu7
言語 C (GCC 4.9.2)
得点 0
コード長 294 Byte
結果 WA
実行時間 61 ms
メモリ 1188 KiB

コンパイルエラー

./Main.c: In function ‘main’:
./Main.c:4:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d%d",&b,&c);
 ^
./Main.c:6:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&e);
 ^
./Main.c:10:1: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
 scanf("%d",&e);
 ^

ジャッジ結果

セット名 Sample Dataset1 Dataset2
得点 / 配点 0 / 0 0 / 60 0 / 40
結果
AC × 3
WA × 1
AC × 19
WA × 10
AC × 38
WA × 17
セット名 テストケース
Sample 0-sample-1.txt, 0-sample-2.txt, 0-sample-3.txt, 0-sample-4.txt
Dataset1 0-sample-1.txt, 0-sample-2.txt, 0-sample-3.txt, 0-sample-4.txt, 1-max-0.txt, 1-max-1.txt, 1-max-2.txt, 1-max-3.txt, 1-max-4.txt, 1-random-00.txt, 1-random-01.txt, 1-random-02.txt, 1-random-03.txt, 1-random-04.txt, 1-random-05.txt, 1-random-06.txt, 1-random-07.txt, 1-random-08.txt, 1-random-09.txt, 1-random-10.txt, 1-random-11.txt, 1-random-12.txt, 1-random-13.txt, 1-random-14.txt, 1-random-15.txt, 1-random-16.txt, 1-random-17.txt, 1-random-18.txt, 1-random-19.txt
Dataset2 0-sample-1.txt, 0-sample-2.txt, 0-sample-3.txt, 0-sample-4.txt, 1-max-0.txt, 1-max-1.txt, 1-max-2.txt, 1-max-3.txt, 1-max-4.txt, 1-random-00.txt, 1-random-01.txt, 1-random-02.txt, 1-random-03.txt, 1-random-04.txt, 1-random-05.txt, 1-random-06.txt, 1-random-07.txt, 1-random-08.txt, 1-random-09.txt, 1-random-10.txt, 1-random-11.txt, 1-random-12.txt, 1-random-13.txt, 1-random-14.txt, 1-random-15.txt, 1-random-16.txt, 1-random-17.txt, 1-random-18.txt, 1-random-19.txt, 2-max-0.txt, 2-max-1.txt, 2-max-2.txt, 2-max-3.txt, 2-max-4.txt, 2-max-5.txt, 2-random-00.txt, 2-random-01.txt, 2-random-02.txt, 2-random-03.txt, 2-random-04.txt, 2-random-05.txt, 2-random-06.txt, 2-random-07.txt, 2-random-08.txt, 2-random-09.txt, 2-random-10.txt, 2-random-11.txt, 2-random-12.txt, 2-random-13.txt, 2-random-14.txt, 2-random-15.txt, 2-random-16.txt, 2-random-17.txt, 2-random-18.txt, 2-random-19.txt
ケース名 結果 実行時間 メモリ
0-sample-1.txt AC 25 ms 1188 KiB
0-sample-2.txt WA 24 ms 1176 KiB
0-sample-3.txt AC 25 ms 992 KiB
0-sample-4.txt AC 22 ms 1180 KiB
1-max-0.txt WA 22 ms 1180 KiB
1-max-1.txt WA 24 ms 1052 KiB
1-max-2.txt WA 24 ms 1052 KiB
1-max-3.txt WA 24 ms 1184 KiB
1-max-4.txt AC 25 ms 1184 KiB
1-random-00.txt AC 24 ms 1184 KiB
1-random-01.txt WA 22 ms 1052 KiB
1-random-02.txt AC 22 ms 1056 KiB
1-random-03.txt WA 25 ms 988 KiB
1-random-04.txt WA 25 ms 1180 KiB
1-random-05.txt WA 24 ms 1060 KiB
1-random-06.txt AC 26 ms 1068 KiB
1-random-07.txt AC 29 ms 1008 KiB
1-random-08.txt AC 25 ms 1180 KiB
1-random-09.txt AC 26 ms 1056 KiB
1-random-10.txt AC 25 ms 1184 KiB
1-random-11.txt AC 24 ms 1056 KiB
1-random-12.txt AC 24 ms 1052 KiB
1-random-13.txt AC 23 ms 1184 KiB
1-random-14.txt AC 25 ms 1188 KiB
1-random-15.txt WA 25 ms 1180 KiB
1-random-16.txt AC 25 ms 1056 KiB
1-random-17.txt AC 25 ms 1184 KiB
1-random-18.txt AC 25 ms 1180 KiB
1-random-19.txt AC 26 ms 1056 KiB
2-max-0.txt WA 61 ms 996 KiB
2-max-1.txt WA 59 ms 1056 KiB
2-max-2.txt AC 59 ms 1184 KiB
2-max-3.txt AC 58 ms 1176 KiB
2-max-4.txt WA 58 ms 1172 KiB
2-max-5.txt WA 61 ms 1056 KiB
2-random-00.txt AC 54 ms 992 KiB
2-random-01.txt AC 48 ms 1060 KiB
2-random-02.txt AC 51 ms 1172 KiB
2-random-03.txt AC 48 ms 1180 KiB
2-random-04.txt WA 38 ms 1176 KiB
2-random-05.txt AC 35 ms 1180 KiB
2-random-06.txt AC 37 ms 1172 KiB
2-random-07.txt AC 28 ms 1180 KiB
2-random-08.txt AC 53 ms 1052 KiB
2-random-09.txt AC 42 ms 1056 KiB
2-random-10.txt AC 34 ms 1104 KiB
2-random-11.txt AC 44 ms 1036 KiB
2-random-12.txt WA 55 ms 1176 KiB
2-random-13.txt AC 46 ms 1180 KiB
2-random-14.txt AC 30 ms 1180 KiB
2-random-15.txt AC 27 ms 1056 KiB
2-random-16.txt AC 38 ms 1176 KiB
2-random-17.txt AC 37 ms 1168 KiB
2-random-18.txt AC 36 ms 1176 KiB
2-random-19.txt WA 34 ms 1176 KiB