QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#412793#6749. Targetincloud#WA 1ms3544kbC++14485b2024-05-16 19:35:312024-05-16 19:35:31

Judging History

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

  • [2024-05-16 19:35:31]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3544kb
  • [2024-05-16 19:35:31]
  • 提交

answer

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

int main() {
    double a,b;
    cin>>a>>b;
    b+=3e-5;
    stack<int> ans;
    int cnt=0;
    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;
}

详细

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3544kb

input:

0.5 0.25

output:

1 

result:

wrong answer wa