結果

問題 No.3021 データベースの練習
ユーザー mamekinmamekin
提出日時 2017-03-31 22:34:55
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 412 ms / 5,000 ms
コード長 770 bytes
コンパイル時間 880 ms
コンパイル使用メモリ 98,584 KB
実行使用メモリ 24,408 KB
平均クエリ数 540.42
最終ジャッジ日時 2023-09-23 12:57:14
合計ジャッジ時間 5,081 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
23,388 KB
testcase_01 AC 220 ms
24,408 KB
testcase_02 AC 282 ms
23,628 KB
testcase_03 AC 300 ms
24,240 KB
testcase_04 AC 285 ms
24,048 KB
testcase_05 AC 291 ms
24,048 KB
testcase_06 AC 133 ms
23,904 KB
testcase_07 AC 204 ms
23,712 KB
testcase_08 AC 282 ms
23,424 KB
testcase_09 AC 226 ms
23,676 KB
testcase_10 AC 200 ms
24,372 KB
testcase_11 AC 412 ms
23,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

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

    while(--q >= 0){
        int x1, x2, y1, y2;
        cin >> x1 >> x2 >> y1 >> y2;

        cout << "SELECT count(*) FROM point WHERE "
             << y1 << " <= y AND y <= " << y2 << " AND "
             << x1 << " <= x AND x <= " << x2 << ';' << endl;
    }

    return 0;
}
0