답안 #15204

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
15204 2015-07-12T03:49:15 Z skeksk91 님 무기가 좀 나쁘시네여 (kriii3_S) C++
0 / 29
0 ms 1084 KB
#include <stdio.h>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
#include <queue>
#include <limits.h>
#include <algorithm>
#define ll long long
long long min(long long a, long long b){
	if(a < b) return a;
	return b;
}
ll power(ll A, ll B, ll C, ll D, ll E){
	if(A<0)A=0;if(B<0)B=0;if(C<0)C=0;if(D<0)D=0;if(E<0)E=0;
	return (A*(100+B)*((100-min(C,100)) + min(C, 100)*D) * (100+E));
}
int main(){
	long long kA,kB,kC,kD,kE, pA,pB,pC,pD,pE, kwA,kwB,kwC,kwD,kwE, pwA,pwB,pwC,pwD,pwE, kwPower, pwPower, kpwPower, pkwPower;
	scanf("%lld%lld%lld%lld%lld", &kA,&kB,&kC,&kD,&kE);
	kA*=100, kC*=100, kD*=100, kE*=100;
	scanf("%lld%lld%lld%lld%lld", &pA,&pB,&pC,&pD,&pE);
	pA*=100, pC*=100, pD*=100, pE*=100;
	scanf("%lld%lld%lld%lld%lld", &kwA,&kwB,&kwC,&kwD,&kwE);
	kwA*=100, kwC*=100, kwD*=100, kwE*=100;
	scanf("%lld%lld%lld%lld%lld", &pwA,&pwB,&pwC,&pwD,&pwE);
	pwA*=100, pwC*=100, pwD*=100, pwE*=100;
	kwPower = power(kA, kB, kC, kD, kE); // 크리 + 크리의 무기 전투력
	//printf("kwPower = %lld\n", kwPower);
	pwPower = power(pA, pB, pC, pD, pE); // 파부 + 파부의 무기 전투력
	//printf("pwPower = %lld\n", pwPower);
	kpwPower = power(kA - kwA + pwA, kB - kwB + pwB, kC - kwC + pwC, kD - kwD + pwD, kE - kwE + pwE);
	//printf("kpwPower = %lld\n", kpwPower);
	pkwPower = power(pA - pwA + kwA, pB - pwB + kwB, pC - pwC + kwC, pD - pwD + kwD, pE - pwE + kwE);
	//printf("pkwPower = %lld\n", pkwPower);
	if(kpwPower > kwPower){
		printf("+\n");
	}
	else if(kpwPower == kwPower){
		printf("0\n");
	}
	else
		printf("-\n");
	if(pkwPower > pwPower){
		printf("+\n");
	}
	else if(pkwPower == pwPower){
		printf("0\n");
	}
	else
		printf("-\n");
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -