# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
15491 | BothEarRim | 님 무기가 좀 나쁘시네여 (kriii3_S) | C++98 | 0 ms | 1720 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 <iostream>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <utility>
#include <locale>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <climits>
#include <cfloat>
#include <map>
#include <functional>
using namespace std;
const long double PI=acos(-1);
int main() // 제3회 kriiicon
{
double info[4][5], criinpabu[5], pabuincri[5], fighting[4];
for(int i=0; i<4; i++)
for(int j=0; j<5; j++) scanf("%lf", &info[i][j]);
for(int i=0; i<4; i++)
for(int j=2; j<5; j++) info[i][j] /= 100.0;
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];
}
for(int i=0; i<2; i++)
{
double strength = 1.0 + info[i][1]/100.0;
fighting[i] = info[i][0] * strength * ((1.0 - min(info[i][2], 1.0)) + min(info[i][2], 1.0) * info[i][3]) * (1.0 + info[i][4]);
}
double cstrength = 1.0 + criinpabu[1]/100.0;
double pstrength = 1.0 + pabuincri[1]/100.0;
fighting[2] = criinpabu[0] * cstrength * ((1.0 - min(criinpabu[2], 1.0)) + min(criinpabu[2], 1.0) * criinpabu[3]) * (1.0 + criinpabu[4]);
fighting[3] = pabuincri[0] * pstrength * ((1.0 - min(pabuincri[2], 1.0)) + min(pabuincri[2], 1.0) * pabuincri[3]) * (1.0 + 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... |