QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#412837#6749. Targetincloud#Compile Error//C++14548b2024-05-16 20:13:162024-05-16 20:13:17

Judging History

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

  • [2024-05-16 20:13:17]
  • 评测
  • [2024-05-16 20:13:16]
  • 提交

answer

#include <bits/stdc++.h>
#include<windows.h>
#include<conio.h>
using namespace std;
#define ll long long

int main() {
    double a,b;
    cin>>a>>b;
    stack<int> ans;
    double tb=b+6.10352e-05;
    while(abs(a-tb)>0.0001){
        tb*=2;
        if(abs(a-tb)<=0.0001){
            ans.push(1);
            break;
        }
        if(tb>1){
            tb-=1;
            ans.push(2);
        }
        else ans.push(1);
    }
    while(ans.size()){
        cout<<ans.top();
        ans.pop();
    }
    return 0;
}

Details

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