結果

問題 No.8021 データベースの練習
コンテスト
ユーザー testestest
提出日時 2017-04-01 00:59:01
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
AC  
実行時間 332 ms / 5,000 ms
コード長 185 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 472 ms
コンパイル使用メモリ 28,228 KB
実行使用メモリ 28,964 KB
平均クエリ数 540.42
最終ジャッジ日時 2026-03-08 16:10:51
合計ジャッジ時間 4,609 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | a,b,c,d,n;
      | ^
main.c: In function ‘main’:
main.c:3:1: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
    3 | scanf("%d",&n);
      | ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
  +++ |+#include <stdio.h>
    1 | a,b,c,d,n;
main.c:6:9: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
    6 | fflush(!printf("SELECT count(*) FROM point WHERE x>%d AND x<%d AND y>%d AND y<%d;\n",a-1,b+1,c-1,d+1));
      |         ^~~~~~
main.c:6:9: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’

ソースコード

diff #
raw source code

a,b,c,d,n;
main(){
scanf("%d",&n);
while(n--){
scanf("%d%d%d%d",&a,&b,&c,&d);
fflush(!printf("SELECT count(*) FROM point WHERE x>%d AND x<%d AND y>%d AND y<%d;\n",a-1,b+1,c-1,d+1));
}
}
0