結果

問題 No.514 宝探し3
ユーザー akakimidoriakakimidori
提出日時 2017-06-21 11:46:09
言語 C90
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 215 ms
コンパイル使用メモリ 23,220 KB
実行使用メモリ 24,480 KB
平均クエリ数 3.67
最終ジャッジ日時 2023-09-23 14:13:44
合計ジャッジ時間 2,744 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 24 ms
24,228 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 24 ms
24,336 KB
testcase_09 AC 24 ms
24,324 KB
testcase_10 WA -
testcase_11 AC 24 ms
23,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>

int ask(int x,int y){
  printf("%d %d\n",x,y);
  fflush(stdout);
  int d;
  scanf("%d",&d);
  return d;
}

void run(void){
  int d=ask(0,0);
  if(d==0) return;

  int e=ask(d,d);
  if(e==0) return;

  int f=ask(d-e,d);
  if(f==0) return;

  ask(d,d-e);
  return;
}

int main(void){
  run();
  return 0;
}
0