# include <stdio.h>
# include <algorithm>
using namespace std;
int main(void) {
double x1,y1,i1,j1,k1,x2,y2,i2,j2,k2;
double a1,b1,c1,d1,e1,a2,b2,c2,d2,e2;
double temp1,temp2;
double a,b;
double q,w,e,r;
scanf("%lf %lf %lf %lf %lf",&x1,&y1,&i1,&j1,&k1);
scanf("%lf %lf %lf %lf %lf",&x2,&y2,&i2,&j2,&k2);
scanf("%lf %lf %lf %lf %lf",&a1,&b1,&c1,&d1,&e1);
scanf("%lf %lf %lf %lf %lf",&a2,&b2,&c2,&d2,&e2);
if(i1/100>1)
a=1;
else
a= i1/100;
if((i1-c1+c2)/100>1)
b=1;
else
b= (i1-c1+c2)/100;
q = x1-a1+a2;
w = y1-b1+b2;
e = j1-d1+d2;
r = k1-e1+e2;
if(x1<0)
x1=0;
else if(x1>20000)
x1=20000;
if(y1<0)
y1=0;
else if(y1>20000)
y1=20000;
if(i1>200)
i1=200;
else if(i1<0)
i1<0;
if(j1<0)
j1=0;
else if(j1>500)
j1=500;
if(k1<0)
k1=0;
else if(k1>500)
k1=500;
if(q>20000)
q=20000;
else if(q<0)
q=0;
if(w>20000)
w=20000;
else if(w<0)
w=0;
if(e>500)
e=500;
else if(e<0)
e=0;
if(r>500)
r=500;
else if(r<0)
r=0;
temp1 = x1*(1+y1/100)*((1-a)+a*j1)*(1+k1/100);
temp2 = q*(1+w/100)*((1-b)+b*e)*(1+r/100);
if(temp1>temp2)
printf("-\n");
else if(temp2>temp1)
printf("+\n");
else
printf("0\n");
if(i2/100>1)
a=1;
else
a= i2/100;
if((i2-c2+c1)/100>1)
b=1;
else
b= (i2-c2+c1)/100;
q = x2-a2+a1;
w = y2-b2+b1;
e = j2-d2+d1;
r = k2-e2+e1;
if(x2<0)
x2=0;
else if(x2>20000)
x2=20000;
if(y2<0)
y2=0;
else if(y2>20000)
y2=20000;
if(i2>200)
i2=200;
else if(i2<0)
i2<0;
if(j2<0)
j2=0;
else if(j2>500)
j2=500;
if(k2<0)
k2=0;
else if(k2>500)
k2=500;
if(q>20000)
q=20000;
else if(q<0)
q=0;
if(w>20000)
w=20000;
else if(w<0)
w=0;
if(e>500)
e=500;
else if(e<0)
e=0;
if(r>500)
r=500;
else if(r<0)
r=0;
temp1 = x2*(1+y2/100)*((1-a)+a*j2)*(1+k2/100);
temp2 = q*(1+w/100)*((1-b)+b*e)*(1+r/100);
if(temp1>temp2)
printf("-\n");
else if(temp2>temp1)
printf("+\n");
else
printf("0\n");
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1084 KB |
Output is correct |
2 |
Correct |
0 ms |
1084 KB |
Output is correct |
3 |
Correct |
0 ms |
1084 KB |
Output is correct |
4 |
Incorrect |
0 ms |
1084 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |