結果

問題 No.3021 データベースの練習
ユーザー finefine
提出日時 2017-03-31 22:54:29
言語 Ruby
(3.3.0)
結果
AC  
実行時間 535 ms / 5,000 ms
コード長 186 bytes
コンパイル時間 219 ms
コンパイル使用メモリ 11,320 KB
実行使用メモリ 31,476 KB
平均クエリ数 540.42
最終ジャッジ日時 2023-09-23 13:01:14
合計ジャッジ時間 6,054 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 200 ms
31,264 KB
testcase_01 AC 316 ms
31,168 KB
testcase_02 AC 388 ms
31,128 KB
testcase_03 AC 405 ms
31,068 KB
testcase_04 AC 387 ms
31,224 KB
testcase_05 AC 402 ms
31,336 KB
testcase_06 AC 235 ms
31,000 KB
testcase_07 AC 312 ms
31,476 KB
testcase_08 AC 401 ms
30,816 KB
testcase_09 AC 334 ms
31,376 KB
testcase_10 AC 315 ms
31,388 KB
testcase_11 AC 535 ms
30,936 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n = gets.to_i
n.times do |i|
    x1, x2, y1, y2 = gets.split.map(&:to_i)
    puts "SELECT count(*) FROM point WHERE x>=#{x1} AND x<=#{x2} AND y>=#{y1} AND y<=#{y2};"
    STDOUT.flush
end
0