Submission #15245

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