답안 #670285

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
670285 2022-12-08T14:49:16 Z RadicaI Mobile (BOI12_mobile) C++17
100 / 100
971 ms 15952 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
	int n,siz; cin >> n>>siz;
	pair<ll, ll> stations[n];
	for(int i=0; i<n; i++) cin >> stations[i].first >> stations[i].second;
	double l = 1; double r = 1.5e9;
	while(r - l > 1e-3){
		double m = (l+r)/2.0;
		double store=0;
		for(int i=0; i<n; i++){
			if(abs(stations[i].second) <=m){
				double change = sqrt(m*m-stations[i].second*stations[i].second);
				double ph = stations[i].first + change;
				double pl = stations[i].first - change;
				if(pl<=store) store = max(store, ph);
			}
		}
		if(store>=siz) r=m;
		else l=m;
		
	}
	cout << fixed << setprecision(4)<< l;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 340 KB Output is correct
2 Correct 2 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 2 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 340 KB Output is correct
2 Correct 4 ms 340 KB Output is correct
3 Correct 3 ms 368 KB Output is correct
4 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 340 KB Output is correct
2 Correct 3 ms 340 KB Output is correct
3 Correct 3 ms 340 KB Output is correct
4 Correct 4 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 376 KB Output is correct
2 Correct 5 ms 372 KB Output is correct
3 Correct 3 ms 340 KB Output is correct
4 Correct 4 ms 340 KB Output is correct
5 Correct 3 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 51 ms 1452 KB Output is correct
2 Correct 51 ms 1364 KB Output is correct
3 Correct 36 ms 1108 KB Output is correct
4 Correct 63 ms 1364 KB Output is correct
5 Correct 23 ms 1076 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 42 ms 1492 KB Output is correct
2 Correct 41 ms 1364 KB Output is correct
3 Correct 58 ms 1552 KB Output is correct
4 Correct 53 ms 1492 KB Output is correct
5 Correct 63 ms 1624 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 44 ms 1620 KB Output is correct
2 Correct 60 ms 1564 KB Output is correct
3 Correct 65 ms 1492 KB Output is correct
4 Correct 78 ms 1824 KB Output is correct
5 Correct 49 ms 1680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 74 ms 1832 KB Output is correct
2 Correct 68 ms 1748 KB Output is correct
3 Correct 57 ms 1836 KB Output is correct
4 Correct 79 ms 1848 KB Output is correct
5 Correct 60 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 75 ms 1748 KB Output is correct
2 Correct 68 ms 1836 KB Output is correct
3 Correct 55 ms 1748 KB Output is correct
4 Correct 79 ms 1748 KB Output is correct
5 Correct 62 ms 1748 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 263 ms 8092 KB Output is correct
2 Correct 346 ms 8100 KB Output is correct
3 Correct 348 ms 8112 KB Output is correct
4 Correct 383 ms 8108 KB Output is correct
5 Correct 308 ms 8096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 368 ms 8020 KB Output is correct
2 Correct 374 ms 8100 KB Output is correct
3 Correct 295 ms 8020 KB Output is correct
4 Correct 371 ms 8104 KB Output is correct
5 Correct 325 ms 8096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 316 ms 9676 KB Output is correct
2 Correct 435 ms 9556 KB Output is correct
3 Correct 408 ms 9684 KB Output is correct
4 Correct 457 ms 9676 KB Output is correct
5 Correct 371 ms 9664 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 445 ms 9684 KB Output is correct
2 Correct 452 ms 9664 KB Output is correct
3 Correct 345 ms 9556 KB Output is correct
4 Correct 471 ms 9664 KB Output is correct
5 Correct 402 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 365 ms 11232 KB Output is correct
2 Correct 497 ms 11232 KB Output is correct
3 Correct 480 ms 11248 KB Output is correct
4 Correct 531 ms 11324 KB Output is correct
5 Correct 432 ms 11228 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 525 ms 11228 KB Output is correct
2 Correct 508 ms 11236 KB Output is correct
3 Correct 423 ms 11244 KB Output is correct
4 Correct 526 ms 11240 KB Output is correct
5 Correct 458 ms 11224 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 431 ms 12808 KB Output is correct
2 Correct 575 ms 12796 KB Output is correct
3 Correct 551 ms 12796 KB Output is correct
4 Correct 608 ms 12808 KB Output is correct
5 Correct 529 ms 12808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 587 ms 12792 KB Output is correct
2 Correct 580 ms 12800 KB Output is correct
3 Correct 473 ms 12792 KB Output is correct
4 Correct 619 ms 12756 KB Output is correct
5 Correct 515 ms 12796 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 524 ms 15948 KB Output is correct
2 Correct 971 ms 15928 KB Output is correct
3 Correct 703 ms 15924 KB Output is correct
4 Correct 764 ms 15944 KB Output is correct
5 Correct 623 ms 15828 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 740 ms 15920 KB Output is correct
2 Correct 724 ms 15928 KB Output is correct
3 Correct 605 ms 15924 KB Output is correct
4 Correct 761 ms 15932 KB Output is correct
5 Correct 821 ms 15952 KB Output is correct