Submission #15233

# Submission time Handle Problem Language Result Execution time Memory
15233 2015-07-12T04:18:22 Z tonyjjw 님 무기가 좀 나쁘시네여 (kriii3_S) C++14
0 / 29
0 ms 1084 KB
#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)*(cd-100))*(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 time Memory Grader output
1 Correct 0 ms 1084 KB Output is correct
2 Correct 0 ms 1084 KB Output is correct
3 Correct 0 ms 1084 KB Output is correct
4 Incorrect 0 ms 1084 KB Output isn't correct
5 Halted 0 ms 0 KB -