Submission #15273

# Submission time Handle Problem Language Result Execution time Memory
15273 2015-07-12T05:10:56 Z skeksk91 님 무기가 좀 나쁘시네여 (kriii3_S) C++
0 / 29
0 ms 1084 KB
#include<stdio.h>

double min(double a, double b) {
	if (a < b) {
		return a;
	}
	return b;
}


struct node {
	double a;
	double b;
	double c;
	double d;
	double e;
	node(double a=0, double b=0, double c=0, double d=0, double e=0) :a(a), b(b), c(c), d(d), e(e) {}
	node operator+(const node& p){
		return node(a + p.a, b + p.b, c + p.c, d + p.d, e + p.e);
	}
	node operator-(const node& p) {
		return node(a - p.a, b - p.b, c - p.c, d - p.d, e - p.e);
	}
	double ju() {
		return a*(1 + (b / 100))*((1 - min(c, 1)) + min(c, 1)*d)*(1 + e);
	}
};

int main() {
	node cri, pabu, criW, pabuW;
	scanf("%lf%lf%lf%lf%lf", &cri.a, &cri.b, &cri.c, &cri.d, &cri.e);
	scanf("%lf%lf%lf%lf%lf", &pabu.a, &pabu.b, &pabu.c, &pabu.d, &pabu.e);
	scanf("%lf%lf%lf%lf%lf", &criW.a, &criW.b, &criW.c, &criW.d, &criW.e);
	scanf("%lf%lf%lf%lf%lf", &pabuW.a, &pabuW.b, &pabuW.c, &pabuW.d, &pabuW.e);
	if ((cri - criW + pabuW).ju()>cri.ju()) {
		printf("+\n");
	}
	else if ((cri - criW + pabuW).ju()<cri.ju()) {
		printf("-\n");
	}
	else {
		printf("0\n");
	}
	if ((pabu - pabuW + criW).ju()>pabu.ju()) {
		printf("+\n");
	}
	else if ((pabu - pabuW + criW).ju()<pabu.ju()) {
		printf("-\n");
	}
	else {
		printf("0\n");
	}
}
# 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 -