結果
問題 | No.513 宝探し2 |
ユーザー | taba |
提出日時 | 2017-05-18 01:19:08 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 28 ms / 2,000 ms |
コード長 | 637 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 64,076 KB |
実行使用メモリ | 23,964 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2023-09-24 01:16:08 |
合計ジャッジ時間 | 1,731 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
23,376 KB |
testcase_01 | AC | 25 ms
23,520 KB |
testcase_02 | AC | 25 ms
23,496 KB |
testcase_03 | AC | 24 ms
23,532 KB |
testcase_04 | AC | 25 ms
23,964 KB |
testcase_05 | AC | 24 ms
23,532 KB |
testcase_06 | AC | 26 ms
23,532 KB |
testcase_07 | AC | 25 ms
23,652 KB |
testcase_08 | AC | 25 ms
23,964 KB |
testcase_09 | AC | 25 ms
23,640 KB |
testcase_10 | AC | 25 ms
23,316 KB |
testcase_11 | AC | 25 ms
23,508 KB |
ソースコード
#include <cstdio> #include <random> #include <vector> #include <algorithm> #include <array> using namespace std; const bool TEST=false; int manhattan(int x1,int y1,int x2,int y2){ return abs(x1-x2)+abs(y1-y2); } int getcount=0; int get(int x,int y){ getcount++; if(TEST){ return manhattan(x,y,8101919,364364); } printf("%d %d\n",x,y); fflush(stdout); int mh; int _=scanf("%d",&mh); return mh; } int main(){ int x,y; int l,r; l=get(0,0); r=get(0x7fffffff,0); if(TEST) printf("%d %d\n",l,r); x=(l-(r-0x7fffffff))>>1; y=l-x; printf("%d %d\n",x,y); if(TEST){ printf("getcount=%d\n",getcount); } return 0; }