QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#178136#7242. Mr.~CredoPhantomThreshold#WA 0ms12644kbC++20966b2023-09-13 18:29:482023-09-13 18:29:48

Judging History

你现在查看的是最新测评结果

  • [2023-09-13 18:29:48]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:12644kb
  • [2023-09-13 18:29:48]
  • 提交

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