QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#402685#6749. Targetaltaires1#WA 0ms3732kbC++14564b2024-05-01 10:43:372024-05-01 10:43:37

Judging History

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

  • [2024-05-01 10:43:37]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3732kb
  • [2024-05-01 10:43:37]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;

const double eps=1e-4;
int a[10],b[10];

signed main()
{
	double x,y;
	cin>>x>>y;
	if(x==1)
	{
		a[1]=1;
		x-=1;
	}
	if(y==1)
	{
		b[1]=1;
		y-=1;
	}
	for(int i=2;i<=6;i++)
	{
		x*=2;
		y*=2;
		if(x>=1)
		{
			x-=1;
			a[i]=1;
		}
		if(y>=1)
		{
			y-=1;
			b[i]=1;
		}
	}
	cout<<"111111";
	if(fabs(y-1)<=eps)
	{
		cout<<"22222222"<<'\n';
		return 0;
	}
	for(int i=5;i>=2;i--)
	{
		if(b[i])
		{
			cout<<2;
		}else
		{
			cout<<1;
		}
	}
	cout<<'\n';
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3732kb

input:

0.5 0.25

output:

1111111121

result:

wrong answer wa