Submission #15289

# Submission time Handle Problem Language Result Execution time Memory
15289 2015-07-12T05:22:48 Z ttgame 님 무기가 좀 나쁘시네여 (kriii3_S) C++
0 / 29
0 ms 1084 KB
# include <stdio.h>
# include <algorithm>
using namespace std;

int main(void) {
	double x1,y1,i1,j1,k1,x2,y2,i2,j2,k2;
	double a1,b1,c1,d1,e1,a2,b2,c2,d2,e2;
	double temp1,temp2;
	double a,b;

	scanf("%lf %lf %lf %lf %lf",&x1,&y1,&i1,&j1,&k1);
	scanf("%lf %lf %lf %lf %lf",&x2,&y2,&i2,&j2,&k2);
	scanf("%lf %lf %lf %lf %lf",&a1,&b1,&c1,&d1,&e1);
	scanf("%lf %lf %lf %lf %lf",&a2,&b2,&c2,&d2,&e2);

	if(i1/100>1)
		a=1;
	else
		a= i1/100;
	if((i1-c1+c2)/100>1)
		b=1;
	else
		b= (i1-c1+c2)/100;

	temp1 = x1*(1+y1/100)*((1-a)+a*j1)*(1+k1);
	temp2 = (x1-a1+a2)*(1+(y1-b1+b2)/100)*((1-b)+b*(j1-d1+d2))*(1+(k1-e1+e2));
	
	if(temp1>temp2)
		printf("-\n");
	else if(temp2>temp1)
		printf("+\n");
	else
		printf("0\n");

		if(i2/100>1)
		a=1;
	else
		a= i2/100;
	if((i2-c2+c1)/100>1)
		b=1;
	else
		b= (i2-c2+c1)/100;

	temp1 = x2*(1+y2/100)*((1-a)+a*j2)*(1+k2);
	temp2 = (x2-a2+a1)*(1+(y2-b2+b1)/100)*((1-b)+b*(j2-d2+d1))*(1+(k2-e2+e1));

	if(temp1>temp2)
		printf("-\n");
	else if(temp2>temp1)
		printf("+\n");
	else
		printf("0\n");

	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 -