Submission #15650

#TimeUsernameProblemLanguageResultExecution timeMemory
15650makesource님 무기가 좀 나쁘시네여 (kriii3_S)C++98
0 / 29
0 ms1084 KiB
// // main.cpp // S // // Created by 방성원 on 2015. 7. 14.. // Copyright (c) 2015년 방성원. All rights reserved. // #include <stdio.h> #define min(a,b) ((a)<(b)?(a):(b)) int main() { int i; double S[9]; double A[9],B[9],C[9],D[9],E[9]; for(i=1;i<=4;i++) { scanf("%lf%lf%lf%lf%lf",&A[i],&B[i],&C[i],&D[i],&E[i]); C[i] /= 100; D[i] /= 100; E[i] /= 100; } for(i=1;i<=2;i++) S[i] = A[i] * (1+B[i]/100) * ( (1-min(C[i],1)) + min(C[i],1) * D[i] ) * (1+E[i]); A[1] = A[1] - A[3] + A[4]; B[1] = B[1] - B[3] + B[4]; C[1] = C[1] - C[3] + C[4]; D[1] = D[1] - D[3] + D[4]; E[1] = E[1] - E[3] + E[4]; A[2] = A[2] - A[4] + A[3]; B[2] = B[2] - B[4] + B[3]; C[2] = C[2] - C[4] + C[3]; D[2] = D[2] - D[4] + D[3]; E[2] = E[2] - E[4] + E[3]; for(i=1;i<=2;i++) S[i+2] = A[i] * (1+B[i]/100) * ( (1-min(C[i],1)) + min(C[i],1) * D[i] ) * (1+E[i]); for(i=1;i<=2;i++) { if(S[i] > S[i+2]) printf("-\n"); if(S[i] == S[i+2]) printf("0\n"); if(S[i] < S[i+2]) printf("+\n"); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...