#include<bits/stdc++.h>
#define check(a,b,c,d,e) (a*(1.0+b/100.0)*((1-min(c/100.0,1.0))+min(c/100.0,1.0)*(d/100.0))*(1+e/100.0))
using namespace std;
struct data{
int a[5];
}AA,BB,CC,DD;
char pro(data A, data B, data C){
double ca = check(A.a[0],A.a[1],A.a[2],A.a[3],A.a[4]);
double cb = check((A.a[0]-B.a[0]+C.a[0]),
(A.a[1]-B.a[1]+C.a[1]),
(A.a[2]-B.a[2]+C.a[2]),
(A.a[3]-B.a[3]+C.a[3]),
(A.a[4]-B.a[4]+C.a[4]));
if(ca>cb) return '-';
else if(ca<cb) return '+';
return '0';
}
int main()
{
for(int i=0; i<5; i++) scanf("%d",&AA.a[i]);
for(int i=0; i<5; i++) scanf("%d",&BB.a[i]);
for(int i=0; i<5; i++) scanf("%d",&CC.a[i]);
for(int i=0; i<5; i++) scanf("%d",&DD.a[i]);
printf("%c\n",pro(AA,CC,DD));
printf("%c\n",pro(BB,DD,CC));
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1720 KB |
Output is correct |
2 |
Correct |
0 ms |
1720 KB |
Output is correct |
3 |
Correct |
0 ms |
1720 KB |
Output is correct |
4 |
Incorrect |
0 ms |
1720 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |