| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 3691 | hyeonjae0310 | Jogging (kriii1_J) | C++98 | 1000 ms | 2676 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}*/
if(pos<star[j].x){
max=atan2(star[j].y,star[j].x-pos);
}
}
cout.precision(7);
cout<<fixed<<max<<'\n';
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
