結果

問題 No.513 宝探し2
ユーザー T1610T1610
提出日時 2017-05-05 23:13:10
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 893 bytes
コンパイル時間 1,418 ms
コンパイル使用メモリ 164,328 KB
実行使用メモリ 24,252 KB
平均クエリ数 5.00
最終ジャッジ日時 2023-09-24 01:07:00
合計ジャッジ時間 2,716 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,096 KB
testcase_01 AC 25 ms
23,508 KB
testcase_02 AC 26 ms
23,592 KB
testcase_03 AC 25 ms
23,364 KB
testcase_04 AC 25 ms
23,616 KB
testcase_05 AC 25 ms
23,400 KB
testcase_06 AC 25 ms
23,376 KB
testcase_07 AC 25 ms
24,024 KB
testcase_08 AC 25 ms
23,976 KB
testcase_09 AC 25 ms
23,508 KB
testcase_10 AC 25 ms
23,400 KB
testcase_11 AC 25 ms
24,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;

int main(){
	int dl, dh;
	int low = 0, high = 100000;
	int mid = (low + high) /2;
	cout << low <<" " << low <<endl;
	cin >> dl;
	cout << high <<" " << low << endl;
	cin >> dh;
	int x;
	int dist = abs(dl - dh);
	if(dl < dh) x = (high - dist) / 2;
	else x = (high - dist) / 2 + dist;
	cout << x << " " << low << endl;
	cin >> dl;
	cout << x << " " << high << endl;
	cin >> dh;
	int y = dl;
	cout <<x <<" " << y << endl;
	cin >> dl;
	return 0;

}
0