結果
問題 | No.647 明太子 |
ユーザー | tails |
提出日時 | 2018-02-09 22:40:41 |
言語 | C (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 35 ms / 4,500 ms |
コード長 | 365 bytes |
コンパイル時間 | 132 ms |
コンパイル使用メモリ | 29,312 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 02:31:32 |
合計ジャッジ時間 | 984 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 1 ms
5,376 KB |
testcase_03 | AC | 1 ms
5,376 KB |
testcase_04 | AC | 1 ms
5,376 KB |
testcase_05 | AC | 1 ms
5,376 KB |
testcase_06 | AC | 1 ms
5,376 KB |
testcase_07 | AC | 1 ms
5,376 KB |
testcase_08 | AC | 1 ms
5,376 KB |
testcase_09 | AC | 2 ms
5,376 KB |
testcase_10 | AC | 2 ms
5,376 KB |
testcase_11 | AC | 1 ms
5,376 KB |
testcase_12 | AC | 2 ms
5,376 KB |
testcase_13 | AC | 3 ms
5,376 KB |
testcase_14 | AC | 27 ms
5,376 KB |
testcase_15 | AC | 4 ms
5,376 KB |
testcase_16 | AC | 2 ms
5,376 KB |
testcase_17 | AC | 32 ms
5,376 KB |
testcase_18 | AC | 35 ms
5,376 KB |
testcase_19 | AC | 4 ms
5,376 KB |
testcase_20 | AC | 4 ms
5,376 KB |
testcase_21 | AC | 2 ms
5,376 KB |
testcase_22 | AC | 11 ms
5,376 KB |
testcase_23 | AC | 1 ms
5,376 KB |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | n;m; | ^ main.c:1:1: warning: type defaults to 'int' in declaration of 'n' [-Wimplicit-int] main.c:1:3: warning: data definition has no type or storage class 1 | n;m; | ^ main.c:1:3: warning: type defaults to 'int' in declaration of 'm' [-Wimplicit-int] main.c:2:1: warning: data definition has no type or storage class 2 | a[11111]; | ^ main.c:2:1: warning: type defaults to 'int' in declaration of 'a' [-Wimplicit-int] main.c:3:1: warning: data definition has no type or storage class 3 | b[11111]; | ^ main.c:3:1: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int] main.c:4:1: warning: data definition has no type or storage class 4 | c[11111]; | ^ main.c:4:1: warning: type defaults to 'int' in declaration of 'c' [-Wimplicit-int] main.c:5:1: warning: data definition has no type or storage class 5 | d; | ^ main.c:5:1: warning: type defaults to 'int' in declaration of 'd' [-Wimplicit-int] main.c:6:1: warning: data definition has no type or storage class 6 | x;y; | ^ main.c:6:1: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int] main.c:6:3: warning: data definition has no type or storage class 6 | x;y; | ^ main.c:6:3: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int] main.c:8:1: warning: return type defaults to 'int' [-Wimplicit-int] 8 | main(i,j){ | ^~~~ main.c: In function 'main': main.c:8:1: warning: type of 'i' defaults to 'int' [-Wimplicit-int] main.c:8:1: warning: type of 'j' defaults to 'int' [-Wimplicit-int] main.c:10:1: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 10 | scanf("%d",&n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | n;m; main.c:10:1: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuilti
ソースコード
n;m; a[11111]; b[11111]; c[11111]; d; x;y; main(i,j){ scanf("%d",&n); for(i=1;i<=n;++i){ scanf("%d%d",&a[i],&b[i]); } scanf("%d",&m); for(j=1;j<=m;++j){ scanf("%d%d",&x,&y); for(i=1;i<=n;++i){ if(x<=a[i]&&y>=b[i]){ ++c[j]; } } if(d<c[j]){ d=c[j]; } } if(d==0){ puts("0"); }else{ for(j=1;j<=m;++j){ if(c[j]==d){ printf("%d\n",j); } } } }