結果

問題 No.8021 データベースの練習
ユーザー masamasa
提出日時 2017-03-31 22:38:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 417 ms / 5,000 ms
コード長 423 bytes
コンパイル時間 884 ms
コンパイル使用メモリ 71,692 KB
実行使用メモリ 25,232 KB
平均クエリ数 540.42
最終ジャッジ日時 2024-07-16 12:36:29
合計ジャッジ時間 4,797 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;

int main() {
	int n;
	cin >> n;

	int x1, x2, y1, y2;

	for (int i = 0; i < n; i++) {
		cin >> x1 >> x2 >> y1 >> y2;
		string q = "SELECT count(*) FROM point ";
		       q += "WHERE x BETWEEN " + to_string(x1) + " AND " + to_string(x2) + " ";
		       q +=   "AND y BETWEEN " + to_string(y1) + " AND " + to_string(y2) + ";";
		cout << q << endl;
	}
	return 0;
}
0