結果

問題 No.8021 データベースの練習
ユーザー Naoyk1212
提出日時 2017-04-27 16:32:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 416 ms / 5,000 ms
コード長 299 bytes
コンパイル時間 1,479 ms
コンパイル使用メモリ 157,048 KB
実行使用メモリ 25,232 KB
平均クエリ数 1.00
最終ジャッジ日時 2024-07-16 12:51:20
合計ジャッジ時間 5,779 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:69: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long long int’ [-Wformat=]
   10 |                 printf("SELECT count(*) FROM point WHERE x BETWEEN %d AND %d AND y BETWEEN %d AND %d;", a, b, c, d);
      |                                                                    ~^                                   ~
      |                                                                     |                                   |
      |                                                                     int                                 long long int
      |                                                                    %lld
main.cpp:10:76: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long long int’ [-Wformat=]
   10 |                 printf("SELECT count(*) FROM point WHERE x BETWEEN %d AND %d AND y BETWEEN %d AND %d;", a, b, c, d);
      |                                                                           ~^                               ~
      |                                                                            |                               |
      |                                                                            int                             long long int
      |                                                                           %lld
main.cpp:10:93: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long long int’ [-Wformat=]
   10 |                 printf("SELECT count(*) FROM point WHERE x BETWEEN %d AND %d AND y BETWEEN %d AND %d;", a, b, c, d);
      |                                                                                            ~^                 ~
      |                                                                                             |                 |
      |                                                       

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
	int q;
	cin >> q;
	int a, b, c, d;
	for(int i = 0; i < q; i++){
		cin >> a >> b >> c >> d;
		printf("SELECT count(*) FROM point WHERE x BETWEEN %d AND %d AND y BETWEEN %d AND %d;", a, b, c, d);
		fflush(stdout);
	}
}
0