QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#383478#6749. TargetTeiosama#Compile Error//C++17350b2024-04-09 14:43:272024-04-09 14:43:28

Judging History

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

  • [2024-04-09 14:43:28]
  • 评测
  • [2024-04-09 14:43:27]
  • 提交

answer

#include<bit/stdc++.h>
using namespace std;
int main()
{
	double a,b;
	cin>>a>>b;
	int ans[60]={0};
	int cnt = 0;
	while(fabs(a-b)>0.0001)
	{
		if(a>b)
		{
			a*=0.5;
			ans[cnt++] = 1;
		}
			else
			{
				a = a*0.5+0.5;
				ans[cnt++] = 2;
			}
	}
	for(int i = 0;i<cnt;i++)
	{
		cout<<ans[i];
	}
	cout<<endl;
	return 0;
}

Details

answer.code:1:9: fatal error: bit/stdc++.h: No such file or directory
    1 | #include<bit/stdc++.h>
      |         ^~~~~~~~~~~~~~
compilation terminated.