Submission #3951

# Submission time Handle Problem Language Result Execution time Memory
3951 2013-08-31T09:40:18 Z joonas Jogging (kriii1_J) C++
0 / 1
1000 ms 2004 KB
#include <stdio.h>
#include <cmath>

int Nx[100500], Ny[100500], M;
int main(){
	int i,j, n, m;
	scanf("%d %d ", &n, &m);
	for(i=0; i < n; ++i) scanf("%d %d ", &Nx[i], &Ny[i]);
	for(i=0; i < m; ++i){
		scanf("%d", &M);
		double rad=0.0;
		for(j=0; j < n; ++j){
			if( Nx[j] > M ){
				double dw = Nx[j]-M;
				double ds = sqrt((dw*dw)+(Ny[j]*Ny[j]));
				double _r = asin(Ny[j]/ds);
				if( _r > rad ) rad = _r;
			} else if( j > n/2 ) break;
			else break;
		}
		printf("%.7f\n", rad);
	}
	
	return 0;
}
# Verdict Execution time Memory Grader output
1 Execution timed out 1000 ms 2004 KB Program timed out
2 Halted 0 ms 0 KB -