Submission #15224

#TimeUsernameProblemLanguageResultExecution timeMemory
15224tonyjjw님 무기가 좀 나쁘시네여 (kriii3_S)C++14
0 / 29
0 ms1084 KiB
#include<stdio.h> #include<math.h> #include<algorithm> #pragma warning(disable:4996) using namespace std; struct WEAPON{ double atk,str,cri,cd,as; WEAPON(){} WEAPON(double a_,double b_,double c_,double d_,double e_){ atk=a_,str=b_,cri=c_,cd=d_,as=e_; } WEAPON operator +(WEAPON A)const{ return WEAPON(atk+A.atk,str+A.str,cri+A.cri,cd+A.cd,as+A.as); } WEAPON operator -(WEAPON A)const{ return WEAPON(atk-A.atk,str-A.str,cri-A.cri,cd-A.cd,as-A.as); } double val(){ return atk*(1+str/100)*(1+min(1.0,cri)*(cd-1))*(1+as); } }A,B,C,D; void inp(WEAPON &A){ scanf("%lf %lf %lf %lf %lf",&A.atk,&A.str,&A.cri,&A.cd,&A.as); A.cri/=100; A.cd/=100; A.as/=100; } int main(){ // freopen("input.txt","r",stdin); double v1,v2; inp(A),inp(B),inp(C),inp(D); v1=A.val(),v2=B.val(); double v3,v4; v3=(A-C+D).val(); v4=(B-D+C).val(); if(abs(v1-v3)<1e-9){ puts("0"); } else{ puts(v1<v3?"+":"-"); } if(abs(v2-v4)<1e-9){ puts("0"); } else{ puts(v2<v4?"+":"-"); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...