Submission #670280

# Submission time Handle Problem Language Result Execution time Memory
670280 2022-12-08T14:37:13 Z RadicaI Mobile (BOI12_mobile) C++17
55 / 100
1000 ms 47132 KB
#include <bits/stdc++.h>
using namespace std;
using ld = long double;
int main(){
	cout.precision(10);
	int n,siz; cin >> n>>siz;
	pair<ld, ld> stations[n];
	for(int i=0; i<n; i++) cin >> stations[i].first >> stations[i].second;
	ld l = 1; ld r = 2e9;
	while(r - l > 1e-3){
		ld m = (l+r)/2.0;
		set<pair<ld, int> > endp; ld store=0;
		for(int i=0; i<n; i++){
			if(abs(stations[i].second) <=m){
				ld ph = stations[i].first + sqrt(m*m-stations[i].second*stations[i].second);
				ld pl = stations[i].first - sqrt(m*m-stations[i].second*stations[i].second);
				if(pl<=store) store = max(store, ph);
			}
		}
		if(store>=siz) r=m;
		else l=m;
		
	}
	cout << l;
}
# Verdict Execution time Memory Grader output
1 Correct 0 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 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 340 KB Output is correct
2 Correct 3 ms 340 KB Output is correct
3 Correct 2 ms 340 KB Output is correct
4 Correct 3 ms 340 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 340 KB Output is correct
2 Correct 6 ms 468 KB Output is correct
3 Correct 6 ms 504 KB Output is correct
4 Correct 7 ms 536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 468 KB Output is correct
2 Correct 6 ms 468 KB Output is correct
3 Correct 5 ms 468 KB Output is correct
4 Correct 8 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 460 KB Output is correct
2 Correct 7 ms 468 KB Output is correct
3 Correct 5 ms 440 KB Output is correct
4 Correct 6 ms 436 KB Output is correct
5 Correct 5 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 82 ms 2516 KB Output is correct
2 Correct 92 ms 3760 KB Output is correct
3 Correct 57 ms 2584 KB Output is correct
4 Correct 89 ms 3788 KB Output is correct
5 Correct 44 ms 2248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 74 ms 2644 KB Output is correct
2 Correct 89 ms 3296 KB Output is correct
3 Correct 94 ms 3836 KB Output is correct
4 Correct 92 ms 3908 KB Output is correct
5 Correct 110 ms 4388 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 81 ms 3028 KB Output is correct
2 Correct 99 ms 3996 KB Output is correct
3 Correct 90 ms 3800 KB Output is correct
4 Correct 130 ms 5316 KB Output is correct
5 Correct 90 ms 3948 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 122 ms 3412 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 125 ms 3412 KB Output is correct
2 Correct 118 ms 4820 KB Output is correct
3 Correct 102 ms 4432 KB Output is correct
4 Correct 127 ms 5360 KB Output is correct
5 Correct 106 ms 4696 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 490 ms 15860 KB Output is correct
2 Incorrect 648 ms 23732 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 634 ms 15956 KB Output is correct
2 Correct 607 ms 22476 KB Output is correct
3 Correct 523 ms 21692 KB Output is correct
4 Correct 631 ms 25264 KB Output is correct
5 Correct 562 ms 23248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 598 ms 19076 KB Output is correct
2 Incorrect 743 ms 28336 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 757 ms 19084 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 693 ms 28328 KB Output is correct
2 Incorrect 878 ms 33048 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 903 ms 22208 KB Output is correct
2 Correct 847 ms 31340 KB Output is correct
3 Correct 762 ms 30576 KB Output is correct
4 Correct 914 ms 35660 KB Output is correct
5 Correct 796 ms 32296 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 828 ms 32228 KB Output is correct
2 Incorrect 996 ms 37740 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1022 ms 25420 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 992 ms 40268 KB Output is correct
2 Execution timed out 1084 ms 47132 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1073 ms 31572 KB Time limit exceeded
2 Halted 0 ms 0 KB -