# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15367 | BothEarRim | 님 무기가 좀 나쁘시네여 (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>
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;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |