# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15273 | skeksk91 | 님 무기가 좀 나쁘시네여 (kriii3_S) | C++98 | 0 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|---|---|---|---|
Fetching results... |