結果

問題 No.514 宝探し3
ユーザー tossytossy
提出日時 2017-05-07 01:29:36
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 950 bytes
コンパイル時間 1,632 ms
コンパイル使用メモリ 164,800 KB
実行使用メモリ 24,396 KB
平均クエリ数 2.92
最終ジャッジ日時 2023-09-23 13:58:27
合計ジャッジ時間 2,917 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
24,396 KB
testcase_01 AC 26 ms
24,300 KB
testcase_02 AC 25 ms
23,424 KB
testcase_03 AC 27 ms
24,384 KB
testcase_04 AC 26 ms
24,012 KB
testcase_05 AC 26 ms
23,532 KB
testcase_06 AC 25 ms
23,688 KB
testcase_07 AC 25 ms
23,436 KB
testcase_08 RE -
testcase_09 AC 25 ms
23,424 KB
testcase_10 AC 26 ms
23,460 KB
testcase_11 AC 25 ms
24,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

#define INF 2147483600
#define MX  1000000000

int main(){
  long a,b;
  cout << "0 0" << endl;
  cin>>a;
  cout << MX << " 0" << endl;
  cin>>b;

  assert((a-b+MX)%2==0);
  assert((a+b-MX)%2==0);

  long x = (a-b+MX)/2;
  long y = (a+b-MX)/2;

  assert(0<=x && x<=MX);
  assert(0<=y && y<=MX);

  cout << x << " " << y << endl;

  return 0;
}
0