結果

問題 No.514 宝探し3
ユーザー 0w10w1
提出日時 2017-05-12 18:15:34
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 1,419 ms
コンパイル使用メモリ 162,644 KB
実行使用メモリ 24,336 KB
平均クエリ数 2.75
最終ジャッジ日時 2023-09-23 14:01:05
合計ジャッジ時間 2,747 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,336 KB
testcase_01 AC 24 ms
23,676 KB
testcase_02 AC 25 ms
23,472 KB
testcase_03 AC 25 ms
23,484 KB
testcase_04 AC 23 ms
23,976 KB
testcase_05 AC 24 ms
24,216 KB
testcase_06 AC 24 ms
23,580 KB
testcase_07 AC 25 ms
24,000 KB
testcase_08 AC 26 ms
23,316 KB
testcase_09 AC 25 ms
24,024 KB
testcase_10 AC 25 ms
24,000 KB
testcase_11 AC 25 ms
23,760 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