結果
問題 |
No.647 明太子
|
ユーザー |
![]() |
提出日時 | 2018-02-09 22:40:41 |
言語 | C (gcc 13.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 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 20 |
コンパイルメッセージ
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); } } } }