提出 #29687520
ソースコード 拡げる
#include<stdio.h>
int main(void)
{
long i,j,cnt=0,N,M,f;
long t[N],h[M];
scanf("%ld %ld",&N,&M);
for(i=0;i<N;i++){
scanf("%ld",&t[i]);
}
for(i=0;i<M;i++){
scanf("%ld",&h[i]);
}
for(i=0;i<N;i++){
for(j=0;j<M;j++){
if(t[i]==h[j]){
h[j]=-998;
t[i]=-999;
cnt++;
}
}
}
if(M==cnt)
printf("Yes");
else
printf("No");
return 0;
}
提出情報
コンパイルエラー
./Main.c: In function ‘main’:
./Main.c:6:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
6 | scanf("%ld %ld",&N,&M);
| ^~~~~~~~~~~~~~~~~~~~~~
./Main.c:8:3: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
8 | scanf("%ld",&t[i]);
| ^~~~~~~~~~~~~~~~~~
./Main.c:11:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
11 | scanf("%ld",&h[i]);
| ^~~~~~~~~~~~~~~~~~
ジャッジ結果
| セット名 | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 200 | ||||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | example_00.txt, example_01.txt, example_02.txt |
| All | example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_b_00.txt, random_b_01.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| example_00.txt | AC | 5 ms | 1688 KiB |
| example_01.txt | AC | 1 ms | 1580 KiB |
| example_02.txt | AC | 1 ms | 1680 KiB |
| hand_00.txt | WA | 4 ms | 1732 KiB |
| hand_01.txt | AC | 3 ms | 1688 KiB |
| hand_02.txt | AC | 3 ms | 1736 KiB |
| hand_03.txt | AC | 1 ms | 1580 KiB |
| hand_04.txt | AC | 2 ms | 1660 KiB |
| random_00.txt | AC | 3 ms | 1680 KiB |
| random_01.txt | WA | 3 ms | 1732 KiB |
| random_02.txt | WA | 3 ms | 1664 KiB |
| random_03.txt | AC | 3 ms | 1732 KiB |
| random_04.txt | WA | 4 ms | 1664 KiB |
| random_05.txt | AC | 3 ms | 1696 KiB |
| random_06.txt | WA | 3 ms | 1688 KiB |
| random_07.txt | WA | 3 ms | 1724 KiB |
| random_08.txt | AC | 3 ms | 1692 KiB |
| random_09.txt | WA | 3 ms | 1728 KiB |
| random_b_00.txt | AC | 2 ms | 1736 KiB |
| random_b_01.txt | AC | 1 ms | 1584 KiB |