結果
問題 |
No.514 宝探し3
|
ユーザー |
|
提出日時 | 2020-05-04 20:22:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 330 bytes |
コンパイル時間 | 2,210 ms |
コンパイル使用メモリ | 190,384 KB |
最終ジャッジ日時 | 2025-01-10 06:30:38 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 7 |
コンパイルメッセージ
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,b,x,y; a=ask(0,0); b=ask(1e5,0); x=(a-b+1e5)/2; y=(a+b-1e5)/2; ask(x,y); return 0; }