QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#383551#6749. Targetxiaolao#Compile Error//C++20411b2024-04-09 15:28:292024-04-09 15:28:30

Judging History

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

  • [2024-04-09 15:28:30]
  • 评测
  • [2024-04-09 15:28:29]
  • 提交

answer


#include<bitsdc++.h>
using namespace std;
#define ll long long
string ans; 
string c;
double a,b;
int m;
void dfs(int t,string ch,double x){
	if(t>m)return;
	if(abs(x-b)<=1e-4){
		if(t<=m){
			m=t;ans=ch;
		}
		return;
	}
	dfs(t+1,ch+'1',0.5*x);
	dfs(t+1,ch+'2',0.5+0.5*x);
}
int main()
{
    m=50;
    cin>>a>>b;
    int cnt=0;
    dfs(1,c,a);
    cout<<ans<<endl;
    return 0;
}

Details

answer.code:2:9: fatal error: bitsdc++.h: No such file or directory
    2 | #include<bitsdc++.h>
      |         ^~~~~~~~~~~~
compilation terminated.