# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15228 | hodduc | 님 무기가 좀 나쁘시네여 (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>
long long min(long long a,long long b){
return a < b ? a : b;
}
long long get_power(long long attack, long long str, long long crit, long long critdmg, long long speed) {
return attack * (100 + str) * (10000 - min(crit*100, 10000) + (min(crit, 100) * critdmg)) * (100 + speed);
}
int main()
{
long long ka, kb, kc, kd, ke;
long long pa, pb, pc, pd, pe;
long long ia, ib, ic, id, ie;
long long ja, jb, jc, jd, je;
scanf("%lld %lld %lld %lld %lld", &ka, &kb, &kc, &kd, &ke);
scanf("%lld %lld %lld %lld %lld", &pa, &pb, &pc, &pd, &pe);
scanf("%lld %lld %lld %lld %lld", &ia, &ib, &ic, &id, &ie);
scanf("%lld %lld %lld %lld %lld", &ja, &jb, &jc, &jd, &je);
long long k1, k2;
k1 = get_power(ka,kb,kc,kd,ke);
k2 = get_power(ka-ia+ja,kb-ib+jb,kc-ic+jc,kd-id+jd,ke-ie+je);
long long p1, p2;
p1 = get_power(pa,pb,pc,pd,pe);
p2 = get_power(pa+ia-ja,pb+ib-jb,pc+ic-jc,pd+id-jd,pe+ie-je);
//printf("%lld\n%lld\n%lld\n%lld\n", k1, k2, p1, p2);
if(k1 > k2) printf("-");
else if(k1 < k2) printf("+");
else printf("0");
printf("\n");
if(p1 > p2) printf("-");
else if(p1 < p2) printf("+");
else printf("0");
printf("\n");
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |