#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
typedef struct point{
int x;
int y;
} point;
bool compare(point p1, point p2)
{
if(p1.x==p2.x) return (p1.y<p2.y);
else return (p1.x<p2.x);
}
point star[100000];
int main()
{
int n,m;
int i,j;
int pos;
double ang,max;
cin>>n>>m;
for(i=0;i<n;i++)
{
cin>>star[i].x>>star[i].y;
}
sort(star,star+n,compare);
for(i=0;i<m;i++)
{
max=0;
cin>>pos;
for(j=0;j<n;j++)
{
if(pos<star[j].x){
ang=atan2(star[j].y,star[j].x-pos);
if(max<ang) max=ang;
}
}
cout.precision(7);
cout<<fixed<<max<<'\n';
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1000 ms |
2676 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |