답안 #15244

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
15244 2015-07-12T04:28:52 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-cri)+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;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -