Submission #19213

#TimeUsernameProblemLanguageResultExecution timeMemory
19213ilbbke님 무기가 좀 나쁘시네여 (kriii3_S)C++98
0 / 29
0 ms1720 KiB
#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 timeMemoryGrader output
Fetching results...