結果
| 問題 | No.647 明太子 |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2018-02-09 22:40:41 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
CE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 365 bytes |
| 記録 | |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 25,272 KB |
| 最終ジャッジ日時 | 2026-02-22 00:47:18 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
ただし、clay言語の場合は開発者のデバッグのため、公開されます。
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | n;m;
| ^
main.c:1:1: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: 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: error: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
main.c:8:1: error: return type defaults to 'int' [-Wimplicit-int]
8 | main(i,j){
| ^~~~
main.c: In function 'main':
main.c:8:1: warning: old-style function definition [-Wold-style-definition]
main.c:8:1: error: type of 'i' defaults to 'int' [-Wimplicit-int]
main.c:8:1: error: type of 'j' defaults to 'int' [-Wimplicit-int]
main.c:10:1: error: 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 implici
ソースコード
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);
}
}
}
}
tails