結果

問題 No.3021 データベースの練習
ユーザー antaanta
提出日時 2017-03-31 22:40:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 423 ms / 5,000 ms
コード長 887 bytes
コンパイル時間 1,472 ms
コンパイル使用メモリ 163,260 KB
実行使用メモリ 24,252 KB
平均クエリ数 540.42
最終ジャッジ日時 2023-09-23 12:59:39
合計ジャッジ時間 5,539 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 102 ms
24,252 KB
testcase_01 AC 212 ms
23,952 KB
testcase_02 AC 273 ms
24,180 KB
testcase_03 AC 295 ms
23,364 KB
testcase_04 AC 274 ms
24,048 KB
testcase_05 AC 280 ms
23,340 KB
testcase_06 AC 126 ms
23,652 KB
testcase_07 AC 205 ms
23,400 KB
testcase_08 AC 281 ms
23,556 KB
testcase_09 AC 223 ms
23,592 KB
testcase_10 AC 198 ms
23,340 KB
testcase_11 AC 423 ms
23,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define rer(i,l,u) for(int (i)=(int)(l);(i)<=(int)(u);++(i))
#define reu(i,l,u) for(int (i)=(int)(l);(i)<(int)(u);++(i))
static const int INF = 0x3f3f3f3f; static const long long INFL = 0x3f3f3f3f3f3f3f3fLL;
typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<pair<int, int> > vpii; typedef long long ll;
template<typename T, typename U> static void amin(T &x, U y) { if (y < x) x = y; }
template<typename T, typename U> static void amax(T &x, U y) { if (x < y) x = y; }

int main() {
	int q;
	scanf("%d", &q);
	fflush(stdout);
	rep(i, q) {
			int A; int B; int C; int D;
			scanf("%d%d%d%d", &A, &B, &C, &D);
			fflush(stdout);
			printf("SELECT count(*) FROM point WHERE %d <= x AND x <= %d AND %d <= y AND y <= %d;\n",
				A, B, C, D);
			fflush(stdout);
		}
	return 0;
}
0