QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#413202 | #6749. Target | albion | WA | 1ms | 3968kb | C++17 | 352b | 2024-05-17 09:31:13 | 2024-05-17 09:31:13 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
double a,b;
int cnt;
bool check(double x,double y)
{
if (abs(x-y)>1e-4) return false;
return true;
}
int main()
{
cin>>a>>b;
cnt=0;
while (check(a,b)==false && cnt<50)
{
if (a>b) a=a*0.5,printf("1");
else a=(a+1)*0.5,printf("2");
++cnt;
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3852kb
input:
0.5 0.25
output:
1
result:
ok ok
Test #2:
score: 0
Accepted
time: 1ms
memory: 3844kb
input:
1 0.75
output:
12
result:
ok ok
Test #3:
score: 0
Accepted
time: 1ms
memory: 3968kb
input:
1 0
output:
11111111111111
result:
ok ok
Test #4:
score: -100
Wrong Answer
time: 1ms
memory: 3852kb
input:
0.361954 0.578805
output:
21212121212121212121212121212121212121212121212121
result:
wrong answer wa