# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15234 | myungwoo | 님 무기가 좀 나쁘시네여 (kriii3_S) | C++14 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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
*/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |