結果

問題 No.3021 データベースの練習
ユーザー koyumeishikoyumeishi
提出日時 2016-09-24 17:23:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 391 ms / 5,000 ms
コード長 419 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 65,616 KB
実行使用メモリ 24,420 KB
平均クエリ数 542.42
最終ジャッジ日時 2023-09-23 11:32:43
合計ジャッジ時間 4,975 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 103 ms
23,652 KB
testcase_01 AC 211 ms
23,676 KB
testcase_02 AC 283 ms
23,388 KB
testcase_03 AC 290 ms
24,348 KB
testcase_04 AC 272 ms
24,252 KB
testcase_05 AC 271 ms
23,400 KB
testcase_06 AC 131 ms
24,048 KB
testcase_07 AC 199 ms
23,388 KB
testcase_08 AC 280 ms
23,664 KB
testcase_09 AC 220 ms
24,420 KB
testcase_10 AC 196 ms
23,376 KB
testcase_11 AC 391 ms
23,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;
int main(){
  int q;
  cin >> q;
  cout << "CREATE INDEX idx1 ON point(x);" << endl;
  cout << "CREATE INDEX idx2 ON point(x,y);" << endl;
  while(q--){
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    cout << "SELECT count(*) FROM point WHERE (x BETWEEN " << a 
    <<" and " << b << ") and (y BETWEEN " << c << " and " << d <<");" << endl;
  }
  return 0;
}
0