답안 #15367

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
15367 2015-07-12T06:47:52 Z BothEarRim 님 무기가 좀 나쁘시네여 (kriii3_S) C++
0 / 29
0 ms 1084 KB
#include <stdio.h>
int main() {
	int info[4][5];
	int criinpabu[5], pabuincri[5];
	for(int i=0; i<4; i++) {
		for(int j=0; j<5; j++)
			scanf("%d", &info[i][j]);
	}
	for(int i=0; i<5; i++) {
		criinpabu[i]=info[0][i]-info[2][i]+info[3][i];
		pabuincri[i]=info[1][i]-info[3][i]+info[2][i];
	}
	double fighting[4];
	for(int i=0; i<4; i++) {
		if(info[i][2]>=100) info[i][2]=1;
	}
	for(int i=0; i<2; i++) {
		double strength=1+(double)(info[i][1]/100);
		fighting[i]=info[i][0]*strength*((1-info[i][2])+info[i][2]*info[i][3])*(1+info[i][4]);
	}
	double cstrength=1+(double)(criinpabu[1]/100.0);
	double pstrength=1+(double)(pabuincri[1]/100.0);
	fighting[2]=criinpabu[0]*cstrength*((1-criinpabu[2])+criinpabu[2]*criinpabu[3])*(1+criinpabu[4]);
	fighting[3]=pabuincri[0]*pstrength*((1-pabuincri[2])+pabuincri[2]*pabuincri[3])*(1+pabuincri[4]);
	
	if(fighting[0]>fighting[2]) printf("-\n");
	else if(fighting[0]==fighting[2]) printf("0\n");
	else printf("+\n");
	if(fighting[1]>fighting[3]) printf("-\n");
	else if(fighting[1]==fighting[3]) printf("0\n");
	else printf("+\n");
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -