답안 #168819

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
168819 2019-12-16T15:07:48 Z MohamedAhmed04 Mobile (BOI12_mobile) C++14
70 / 100
1000 ms 31812 KB
#include <bits/stdc++.h>

using namespace std ;

const int MAX = 1e6 + 10 ;
double x[MAX] , y[MAX] ;
int n ;
double l;

bool check(double radius)
{
	double now = 0.00 ;
	for(int i = 0 ; i < n ; ++i)
	{
		double a = sqrt(radius * radius - ((-y[i]) * (-y[i]))) + x[i] ;
		double b = -sqrt(radius * radius - ((-y[i]) * (-y[i]))) + x[i] ;
		if(a > b)
			swap(a , b) ;
		if(a <= now)
			now = max(now , b) ;

	}
	return (now >= l) ;
}

int main()
{
	ios_base::sync_with_stdio(0) ;
	cin.tie(0) ;
	cin>>n>>l ;
	for(int i = 0 ; i < n ; ++i)
		cin>>x[i]>>y[i] ;
	double low = 0.000 , high = 1e12 ;
	double ans = high ;
	for(int i = 0 ; i < 50 ; ++i)
	{
		double mid = (low + high) / 2.00 ;
		if(check(mid))
			ans = mid , high = mid ;
		else
			low = mid ;
	}
	return cout<<fixed<<setprecision(6)<<ans<<"\n" , 0 ;
}		
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 352 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 296 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 4 ms 376 KB Output is correct
3 Correct 4 ms 376 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 376 KB Output is correct
2 Correct 7 ms 376 KB Output is correct
3 Correct 7 ms 504 KB Output is correct
4 Correct 8 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 504 KB Output is correct
2 Correct 7 ms 508 KB Output is correct
3 Correct 7 ms 504 KB Output is correct
4 Correct 8 ms 504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 504 KB Output is correct
2 Correct 4 ms 504 KB Output is correct
3 Correct 7 ms 504 KB Output is correct
4 Correct 9 ms 504 KB Output is correct
5 Correct 7 ms 504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 86 ms 1528 KB Output is correct
2 Correct 86 ms 1656 KB Output is correct
3 Correct 61 ms 1144 KB Output is correct
4 Correct 103 ms 1612 KB Output is correct
5 Correct 54 ms 1148 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 90 ms 1580 KB Output is correct
2 Correct 87 ms 1500 KB Output is correct
3 Correct 101 ms 1656 KB Output is correct
4 Correct 107 ms 1636 KB Output is correct
5 Correct 132 ms 1656 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 85 ms 1680 KB Output is correct
2 Correct 96 ms 1688 KB Output is correct
3 Correct 89 ms 1784 KB Output is correct
4 Correct 147 ms 1912 KB Output is correct
5 Correct 102 ms 1784 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 113 ms 1972 KB Output is correct
2 Correct 115 ms 1884 KB Output is correct
3 Correct 105 ms 2040 KB Output is correct
4 Correct 163 ms 1912 KB Output is correct
5 Correct 123 ms 1912 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 116 ms 2004 KB Output is correct
2 Correct 112 ms 1884 KB Output is correct
3 Correct 105 ms 2040 KB Output is correct
4 Correct 149 ms 1912 KB Output is correct
5 Correct 125 ms 2040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 463 ms 8184 KB Output is correct
2 Correct 560 ms 8184 KB Output is correct
3 Correct 548 ms 8108 KB Output is correct
4 Correct 728 ms 8312 KB Output is correct
5 Correct 625 ms 8312 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 567 ms 8312 KB Output is correct
2 Correct 615 ms 8556 KB Output is correct
3 Correct 519 ms 8312 KB Output is correct
4 Correct 721 ms 8440 KB Output is correct
5 Correct 640 ms 8296 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 558 ms 9856 KB Output is correct
2 Correct 676 ms 9928 KB Output is correct
3 Correct 656 ms 9820 KB Output is correct
4 Correct 884 ms 9848 KB Output is correct
5 Correct 765 ms 17924 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 681 ms 9780 KB Output is correct
2 Correct 735 ms 9904 KB Output is correct
3 Correct 623 ms 9832 KB Output is correct
4 Correct 883 ms 9888 KB Output is correct
5 Correct 770 ms 18588 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 651 ms 11392 KB Output is correct
2 Correct 789 ms 11396 KB Output is correct
3 Correct 768 ms 11384 KB Output is correct
4 Execution timed out 1022 ms 11384 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 795 ms 11484 KB Output is correct
2 Correct 867 ms 11460 KB Output is correct
3 Correct 746 ms 19832 KB Output is correct
4 Execution timed out 1024 ms 25016 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 785 ms 12968 KB Output is correct
2 Correct 935 ms 12988 KB Output is correct
3 Correct 884 ms 24568 KB Output is correct
4 Execution timed out 1072 ms 28536 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 906 ms 13044 KB Output is correct
2 Correct 986 ms 23480 KB Output is correct
3 Correct 848 ms 22508 KB Output is correct
4 Execution timed out 1076 ms 28536 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 937 ms 16248 KB Output is correct
2 Execution timed out 1062 ms 31812 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1075 ms 16028 KB Time limit exceeded
2 Halted 0 ms 0 KB -