結果
問題 |
No.514 宝探し3
|
ユーザー |
![]() |
提出日時 | 2017-06-21 11:52:49 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 311 bytes |
コンパイル時間 | 474 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 25,232 KB |
平均クエリ数 | 2.75 |
最終ジャッジ日時 | 2024-07-16 13:53:03 |
合計ジャッジ時間 | 2,340 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 8 |
コンパイルメッセージ
main.c: In function ‘ask’: main.c:7:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d",&d); | ^~~~~~~~~~~~~~
ソースコード
#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(0,d); if(e==0) return; int a=d-e/2; int b=e/2; ask(a,b); return; } int main(void){ run(); return 0; }