結果
| 問題 | No.513 宝探し2 |
| コンテスト | |
| ユーザー |
lunnear
|
| 提出日時 | 2019-02-18 05:48:46 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| コード長 | 507 bytes |
| 記録 | |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 38,784 KB |
| 実行使用メモリ | 28,720 KB |
| 平均クエリ数 | 3.00 |
| 最終ジャッジ日時 | 2026-03-31 16:31:04 |
| 合計ジャッジ時間 | 1,225 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <stdio.h>
#include <stdlib.h>
typedef long s4;
s4 q(s4 x, s4 y)
{
printf("%d %d\n", x, y);
fflush(0);
s4 ret;
scanf("%d", &ret);
return ret;
}
int main()
{
const s4 MAX = 100000;
s4 d[2];
d[0] = q(0, 0);
if(d[0] == 0)
return 0;
d[1] = q(MAX, 0);
if(d[1] == 0)
return 0;
s4 x, y;
x = d[0] - (MAX - d[1]);
x = (MAX - d[1]) + x / 2;
y = abs(d[0] - x);
q(x, y);
return 0;
}
lunnear