結果

問題 No.513 宝探し2
ユーザー 0w10w1
提出日時 2017-05-12 18:15:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 1,510 ms
コンパイル使用メモリ 164,092 KB
実行使用メモリ 24,372 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-24 01:15:28
合計ジャッジ時間 2,667 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,400 KB
testcase_01 AC 22 ms
23,652 KB
testcase_02 AC 22 ms
24,120 KB
testcase_03 AC 23 ms
23,376 KB
testcase_04 AC 23 ms
23,628 KB
testcase_05 AC 22 ms
24,372 KB
testcase_06 AC 23 ms
24,252 KB
testcase_07 AC 23 ms
24,012 KB
testcase_08 AC 23 ms
24,012 KB
testcase_09 AC 22 ms
23,376 KB
testcase_10 AC 23 ms
24,336 KB
testcase_11 AC 22 ms
23,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int ask( int x, int y ) {
  cout << x << " " << y << endl;
  int d;
  cin >> d;
  if( d == 0 ) {
    exit( 0 );
  }
  return d;
}

signed main() {
  ios::sync_with_stdio( 0 );
  int a = ask( 0, 0 );
  int b = ask( 0, a );
  ask( b / 2, a - b / 2 );
  return 0;
}
0