結果
| 問題 |
No.514 宝探し3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-04 20:23:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 309 bytes |
| コンパイル時間 | 2,261 ms |
| コンパイル使用メモリ | 190,360 KB |
| 最終ジャッジ日時 | 2025-01-10 06:30:48 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 3 |
コンパイルメッセージ
main.cpp: In function ‘int ask(int, int)’:
main.cpp:10:23: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | int res; scanf("%d",&res);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
int ask(int x,int y){
printf("%d %d\n",x,y);
fflush(stdout);
int res; scanf("%d",&res);
if(res==0) exit(0);
return res;
}
int main(){
int a=ask(0,0);
int b=ask(1e9,0);
ask((a-b+1e9)/2,(a+b-1e9)/2);
return 0;
}