QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#412768#6749. Targetincloud#WA 0ms3496kbC++14454b2024-05-16 19:11:282024-05-16 19:11:28

Judging History

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

  • [2024-05-16 19:11:28]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3496kb
  • [2024-05-16 19:11:28]
  • 提交

answer

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

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

0.5 0.25

output:


result:

wrong answer wa