結果
問題 | No.3021 データベースの練習 |
ユーザー | hanorver |
提出日時 | 2017-03-31 22:44:36 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 434 ms / 5,000 ms |
コード長 | 3,398 bytes |
コンパイル時間 | 633 ms |
コンパイル使用メモリ | 77,444 KB |
実行使用メモリ | 25,360 KB |
平均クエリ数 | 540.42 |
最終ジャッジ日時 | 2024-07-16 12:36:49 |
合計ジャッジ時間 | 4,833 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 107 ms
24,976 KB |
testcase_01 | AC | 224 ms
24,592 KB |
testcase_02 | AC | 293 ms
25,232 KB |
testcase_03 | AC | 313 ms
24,592 KB |
testcase_04 | AC | 287 ms
25,360 KB |
testcase_05 | AC | 311 ms
25,232 KB |
testcase_06 | AC | 136 ms
24,848 KB |
testcase_07 | AC | 214 ms
24,580 KB |
testcase_08 | AC | 298 ms
24,976 KB |
testcase_09 | AC | 236 ms
25,232 KB |
testcase_10 | AC | 215 ms
24,976 KB |
testcase_11 | AC | 434 ms
25,232 KB |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> #include <map> /* :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::'''```````::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::''`_,-''.,... `:::::::::::::::::: :::::::::::::::::::::::::::::::::::::' _,-',;;!!!!!!!!!; `:::::::::::::::: ::::::::::::::'`````:::::::::::::'' .-' ;<!!!!!!!'''`_..' `::::::::::::::: ::::::::::'' ,;!!!;,`::::::::::' .-`.,,,zcccc,,cccd$$"",;> `:::::::::::::: :::::::::' ;!!!!!!!!; ``:::::' ;' ,c$$$$$$$$$$$CC<<" ````_ :::::::::::::: :::::::' ;!!!!!!!!!!!!!; ' ;! z$$$$$$$$$$$$$$$$$$$$$$??". :::::::::::::: ::::::: <!!!!!!!!!!!!!' . .!',c$$$$$$$$$$$$$c, `"""',;;<!! :::::::::::::: :::::: ,!!!!!!!!!!!'`,;! .<! ,$$$$$$$$$$$$$$$$hc,,,..- !!!! `::::::::::::: ::::' <!!!!!!!!!' .<!!!;!! ,$$$$$""???$$$"""?????"" .<!!!! :::::::::::::: ::: ;><!!!!!!!!! ,<!!!!!!!',c, "??.< . "??h. -;;;;!!!!!!!' :::::::::::::: ::: !!!!!!!!!!' ;!!!!!!!!' d$$h.`$ccr,$h `;,." `!!!!!!!!! ::::::::::::::: :::.`<!!!!!!!' !!!!!!!!!! dP"""?.`$$F`$$h.`!!!!!!!!!!!!!! .::::::::::::::: ::::. <!!!!!! !!!!!!!!!! ,$ .nn.' "$$ P" <!!!!!!!!!!!' .:::::::::::::::: :::::. <!!!! ;!!!!!!!!!! $$ MMMMx ?$ ,dx `!!!!!!!!!!' :::::::::::::::::: ```:::: `!!! !!!'!!!!!! `$ MMMMMM, $r MMMr !!!!!!!!' .::::::::::::::::::: `!!;,.`' ``' ``,;!!!!' ch." 4MMMMMM "$ 4MMM `!!!!!' ..:::::::::::::::::::: !!!!!'````'``<!!!'`.z$$$$. MMMMMMb $h MMM `!!'' .::::::::::::::::::::::: ..``.,d$$$$$c,,,. $$$$$F"? "MMMMMM $$ 4P" ' .:::::::::::::::::::::::::: dM""..""?$$$$$$$$$$$$$$$$$$c "MM" $$>` ,c `::::::::::::::::::::::::: MMn.`"?hc,d$$$$$$$$$$$$$$$$$$. `P $P' -??P== `::::::::::::::::::::::: MMMMMnx`"?$$$$$$$$$$$P".,.`"??$ccccc$.z$$$$. `' .:::::::::::::::::' '' MMMMMM,' .?$$$$$$$$$$ d$$$ d$$$$$$$$$$$$$h..``::::::::::::::::' MMMMMMMn `?$$$$$$$$$$,.?$$h. =."?$$$$$$$$$$$$$$hc,.``'::::::::::' MMMMMMMM ;, `"??$$$$$$h ?$$h. -m,``""??$$$$$$$$$$$$$c,.``````' MMMMMMM> !!! ?cc,.,d$$$$h.`"?$hc `P .`"?$$$$$$$$$$$$$$$$$$$ .: MMMMMMM ,!!'. $$$$$$$$$??=== `"""=c, " P n. "$$$$$$$$$$$$$$$$c_ ,.:::: MMMMMMP !!! Mr<$$$$"".,c,;M ;<!! ..""=_ ' 4 .br .`""??$$$$$$$$??"".::::::: MMMMMM';!!',M>'$$$$$$$$$>4M `!!! 4MMbn.`"=cc," -'P",c=.,.`.. .= ::::::::: MMMMM' !!! dMb $$$$$$$$P MM> !!! 4MMMMMMr :..`"-._""Pr4"'-P" .,.`::::::::: MMMM' <!!!,MMM "$$$$$$P dMM>;!!! 4MMMMMMb :::::.. "-=cczyycc??" .::::::::: MMMP <!!! dMMMb "?$$P" uMMM>;!!! 4MMMMMMMr`:::::::::.........::::::::::::: MMP';!!! ;MMMMMMn,.".uMMMMM ;!!! MMMMMMMMM,`:::::::::::::::::::::::::::::: MM ;!!!! MMMMMMMMMMMMMMMMMM !!!! MMMMMMMMMb `::::::::::::::::::::::::::::: M" !!!! uMMMMMMMMMMMMMMMMMP !!! ;MMMMMMMMMMx ::::::::::::::::::::::::::::: P.!!!! ,MMMMMMMMMMMMMMMMMM ,!!! MMMMMMMMMMMMx`:::::::::::::::::::::::::::: !!!!> MMMMMMMMMMMMMMMMMMP !!!',MMMMMMMMMMMMM `::::::::::::::::::::::::::: */ int main() { int q; std::cin >> q; for (int i = 0; i < q; i++) { int x1, y1, x2, y2; std::cin >> x1 >> x2 >> y1 >> y2; if (x1 > x2) std::swap(x1, x2); if (y1 > y2) std::swap(y1, y2); std::cout << "SELECT count(*) FROM point WHERE x>=" << x1 << " AND " << x2 << ">=x AND y>=" << y1 << " AND y<=" << y2 << ";" << std::endl; std::cout << std::flush; } return 0; }