QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#178136 | #7242. Mr.~Credo | PhantomThreshold# | WA | 0ms | 12644kb | C++20 | 966b | 2023-09-13 18:29:48 | 2023-09-13 18:29:48 |
Judging History
answer
#include <bits/stdc++.h>
#define ll long long
#define int long long
using namespace std;
const int maxn = 2050000;
typedef long double db;
const int inf = 1e9;
db pi= acos(-1);
int n;
int flag[maxn];
signed main()
{
ios_base::sync_with_stdio(false); ////////////////////////////////////////
cin.tie(0);
cin>>n;
for(int i=1;i<=n;i++)
{
int x,y,phi,ai;
cin>>x>>y>>phi>>ai;
int u=phi, v=phi+ai+1;
flag[u]++;
if(v<=129600) flag[v]--;
else
{
flag[0]++;
flag[v-129600]--;
}
}
int ansp;
for(int i=0;i<129600;i++)
{
flag[i]+=flag[i-1];
if(!flag[i])
{
ansp=i;
break;
}
}
db arc= 2*pi/129600*ansp;
db cx=cos(arc),cy=sin(arc);
int k=1;
int ansx,ansy;
while(1)
{
int x= k*cx, y=k*cy;
if( x>-inf && x<inf && y>-inf && y<inf )
{
ansx=x,ansy=y;
k<<=1;
}
else break;
}
cout<<"YES\n";
cout<<ansx<<' '<<ansy<<endl;
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 12644kb
input:
4 1 2 486000 0 -1 1 324000 648000 1 0 108000 0 1 0 108000 1188000
output:
YES 536870912 0
result:
wrong answer The circle is partially or fully lit by a 2-th spotlight