답안 #919291

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
919291 2024-01-31T14:31:48 Z hqminhuwu Mobile (BOI12_mobile) C++14
50 / 100
1000 ms 16272 KB
#include <bits/stdc++.h>
#define forr(_a,_b,_c) for(_a = (_b); _a <= (_c); ++_a)
#define ford(_a,_b,_c) for(_a = (_b) + 1; _a --> (_c);)
#define forf(_a,_b,_c) for(_a = (_b); _a < (_c); ++_a)
#define st first
#define nd second
#define ll long long
#define ull unsigned long long
#define pii pair <int,int>
#define pll pair <ll,ll>
#define piii pair <int,pii>
#define vi vector <int>
#define pb push_back
#define mp make_pair
#define all(x) begin(x),end(x)
#define file "test"


using namespace std;
const int N = 5e5 + 5;
const ll oo = 1e9;
const ll mod = 1e9 + 7;

int n, ff, i;
pll a[N];

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	#ifdef hqm
	   freopen(file".inp", "r", stdin); freopen(file".out", "w", stdout);
	#endif

	cin >> n >> ff;

	forr (i, 1, n)
		cin >> a[i].st >> a[i].nd;
	
	double l = 1, r = 2 * oo;
	int cnt = 400;
	while (cnt--){
		double mid = (r + l) / 2, qq = 0;
		forr (i, 1, n){
			double dis = sqrt(mid * mid - a[i].nd * a[i].nd);
			if (a[i].st - dis <= qq)
				qq = max (qq, a[i].st + dis);
		}
		if (qq >= ff)
			r = mid;
		else l = mid;
	}

	cout << fixed << setprecision(4) << l;
	return 0;
}
/*



*/

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 1 ms 600 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 504 KB Output is correct
2 Correct 4 ms 344 KB Output is correct
3 Correct 6 ms 348 KB Output is correct
4 Correct 4 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 344 KB Output is correct
2 Correct 11 ms 536 KB Output is correct
3 Correct 9 ms 532 KB Output is correct
4 Correct 11 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 12 ms 344 KB Output is correct
2 Correct 7 ms 344 KB Output is correct
3 Correct 9 ms 532 KB Output is correct
4 Correct 12 ms 532 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 344 KB Output is correct
2 Correct 7 ms 344 KB Output is correct
3 Correct 8 ms 504 KB Output is correct
4 Correct 11 ms 344 KB Output is correct
5 Correct 10 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 309 ms 2676 KB Output is correct
2 Correct 114 ms 2672 KB Output is correct
3 Correct 82 ms 3060 KB Output is correct
4 Correct 156 ms 2648 KB Output is correct
5 Correct 93 ms 2896 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 149 ms 2672 KB Output is correct
2 Correct 145 ms 2672 KB Output is correct
3 Correct 172 ms 2668 KB Output is correct
4 Correct 168 ms 2668 KB Output is correct
5 Correct 174 ms 2672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 122 ms 2676 KB Output is correct
2 Correct 122 ms 2648 KB Output is correct
3 Correct 135 ms 2668 KB Output is correct
4 Correct 211 ms 2660 KB Output is correct
5 Correct 186 ms 2672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 134 ms 2652 KB Output is correct
2 Correct 139 ms 2672 KB Output is correct
3 Correct 165 ms 2648 KB Output is correct
4 Correct 213 ms 2672 KB Output is correct
5 Correct 222 ms 2672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 142 ms 2676 KB Output is correct
2 Correct 143 ms 2672 KB Output is correct
3 Correct 161 ms 2668 KB Output is correct
4 Correct 220 ms 2904 KB Output is correct
5 Correct 197 ms 2668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 712 ms 8260 KB Output is correct
2 Correct 718 ms 8260 KB Output is correct
3 Correct 729 ms 8256 KB Output is correct
4 Correct 994 ms 8260 KB Output is correct
5 Execution timed out 1012 ms 8048 KB Time limit exceeded
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 742 ms 8256 KB Output is correct
2 Execution timed out 1045 ms 8304 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 49 ms 8016 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 82 ms 16248 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 62 ms 8060 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 78 ms 16272 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 56 ms 8016 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 74 ms 16212 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 49 ms 8056 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 75 ms 16208 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -