#include <stdio.h>
#include <algorithm>
using namespace std;
typedef long long ll;
ll X(ll A, int B, int C, int D, int E)
{
return A * (100+B) * ((100-min(C, 100))*100 + min(C, 100)*D) * (100+E);
}
int main()
{
int A[4], B[4], C[4], D[4], E[4];
for(int t = 0; t < 4; t++){
scanf("%d%d%d%d%d", A+t, B+t, C+t, D+t, E+t);
}
A[0] -= A[2], B[0] -= B[2], C[0] -= C[2], D[0] -= D[2], E[0] -= E[2];
A[1] -= A[3], B[1] -= B[3], C[1] -= C[3], D[1] -= D[3], E[1] -= E[3];
ll t0 = X(A[0] + A[2], B[0] + B[2], C[0] + C[2], D[0] + D[2], E[0] + E[2]);
ll t1 = X(A[0] + A[3], B[0] + B[3], C[0] + C[3], D[0] + D[3], E[0] + E[3]);
ll t2 = X(A[1] + A[2], B[1] + B[2], C[1] + C[2], D[1] + D[2], E[1] + E[2]);
ll t3 = X(A[1] + A[3], B[1] + B[3], C[1] + C[3], D[1] + D[3], E[1] + E[3]);
if( t0 > t1 ) printf("-\n");
else if( t0 == t1 ) printf("0\n");
else printf("+\n");
if( t2 > t3 ) printf("+\n");
else if( t2 == t3 ) printf("0\n");
else printf("-\n");
return 0;
}
/*
20000 20000 200 500 500
0 0 0 0 0
20000 20000 200 500 500
20000 20000 200 500 500
*/
# |
결과 |
실행 시간 |
메모리 |
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 |
Correct |
0 ms |
1084 KB |
Output is correct |
5 |
Correct |
0 ms |
1084 KB |
Output is correct |
6 |
Correct |
0 ms |
1084 KB |
Output is correct |
7 |
Correct |
0 ms |
1084 KB |
Output is correct |
8 |
Correct |
0 ms |
1084 KB |
Output is correct |
9 |
Correct |
0 ms |
1084 KB |
Output is correct |
10 |
Correct |
0 ms |
1084 KB |
Output is correct |
11 |
Correct |
0 ms |
1084 KB |
Output is correct |
12 |
Correct |
0 ms |
1084 KB |
Output is correct |
13 |
Correct |
0 ms |
1084 KB |
Output is correct |
14 |
Correct |
0 ms |
1084 KB |
Output is correct |
15 |
Correct |
0 ms |
1084 KB |
Output is correct |
16 |
Correct |
0 ms |
1084 KB |
Output is correct |
17 |
Correct |
0 ms |
1084 KB |
Output is correct |
18 |
Correct |
0 ms |
1084 KB |
Output is correct |
19 |
Correct |
0 ms |
1084 KB |
Output is correct |
20 |
Correct |
0 ms |
1084 KB |
Output is correct |
21 |
Correct |
0 ms |
1084 KB |
Output is correct |
22 |
Correct |
0 ms |
1084 KB |
Output is correct |
23 |
Correct |
0 ms |
1084 KB |
Output is correct |
24 |
Correct |
0 ms |
1084 KB |
Output is correct |
25 |
Correct |
0 ms |
1084 KB |
Output is correct |
26 |
Correct |
0 ms |
1084 KB |
Output is correct |
27 |
Correct |
0 ms |
1084 KB |
Output is correct |
28 |
Correct |
0 ms |
1084 KB |
Output is correct |
29 |
Correct |
0 ms |
1084 KB |
Output is correct |
30 |
Correct |
0 ms |
1084 KB |
Output is correct |
31 |
Correct |
0 ms |
1084 KB |
Output is correct |
32 |
Correct |
0 ms |
1084 KB |
Output is correct |
33 |
Correct |
0 ms |
1084 KB |
Output is correct |
34 |
Correct |
0 ms |
1084 KB |
Output is correct |
35 |
Correct |
0 ms |
1084 KB |
Output is correct |
36 |
Correct |
0 ms |
1084 KB |
Output is correct |
37 |
Correct |
0 ms |
1084 KB |
Output is correct |
38 |
Correct |
0 ms |
1084 KB |
Output is correct |
39 |
Correct |
0 ms |
1084 KB |
Output is correct |
40 |
Correct |
0 ms |
1084 KB |
Output is correct |
41 |
Correct |
0 ms |
1084 KB |
Output is correct |
42 |
Correct |
0 ms |
1084 KB |
Output is correct |
43 |
Correct |
0 ms |
1084 KB |
Output is correct |
44 |
Correct |
0 ms |
1084 KB |
Output is correct |
45 |
Correct |
0 ms |
1084 KB |
Output is correct |
46 |
Correct |
0 ms |
1084 KB |
Output is correct |