結果
問題 |
No.513 宝探し2
|
ユーザー |
![]() |
提出日時 | 2017-05-18 01:19:08 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 22 ms / 2,000 ms |
コード長 | 637 bytes |
コンパイル時間 | 593 ms |
コンパイル使用メモリ | 65,068 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2024-07-17 01:11:05 |
合計ジャッジ時間 | 1,719 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#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; }