Submission #15185

#TimeUsernameProblemLanguageResultExecution timeMemory
15185ddaafftt님 무기가 좀 나쁘시네여 (kriii3_S)C++14
0 / 29
0 ms1720 KiB
#include <iostream> #include <vector> using namespace std; int main(void) { vector< vector<int> > vv; vector<int> v; int t; double k; double p; double k_fix; double p_fix; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 5; ++j) { cin >> t; v.push_back(t); } vv.push_back(v); v.clear(); } k = (vv[0][0]) * (1 + vv[0][1] / 100) * ((1 - (vv[0][2] >= 100 ? 1 : vv[0][2] * 0.01)) + (vv[0][2] >= 100 ? 1 : vv[0][2] * 0.01) * (vv[0][3] * 0.01)) * (1 + (vv[0][4] * 0.01)); p = (vv[1][0]) * (1 + vv[1][1] / 100) * ((1 - (vv[1][2] >= 100 ? 1 : vv[1][2] * 0.01)) + (vv[1][2] >= 100 ? 1 : vv[1][2] * 0.01) * (vv[1][3] * 0.01)) * (1 + (vv[1][4] * 0.01)); k_fix = (vv[0][0] - vv[2][0] + vv[3][0]) * (1 + (vv[0][1] - vv[2][1] + vv[3][1]) / 100) * ((1 - ((vv[0][2] - vv[2][2] + vv[3][2]) >= 100 ? 1 : (vv[0][2] - vv[2][2] + vv[3][2]) * 0.01)) + ((vv[0][2] - vv[2][2] + vv[3][2]) >= 100 ? 1 : (vv[0][2] - vv[2][2] + vv[3][2]) * 0.01) * ((vv[0][3] - vv[2][3] + vv[3][3]) * 0.01)) * (1 + ((vv[0][4] - vv[2][4] + vv[3][4]) * 0.01)); p_fix = (vv[1][0] - vv[3][0] + vv[2][0]) * (1 + (vv[1][1] - vv[3][1] + vv[2][1]) / 100) * ((1 - ((vv[1][2] - vv[3][2] + vv[2][2]) >= 100 ? 1 : (vv[1][2] - vv[3][2] + vv[2][2]) * 0.01)) + ((vv[1][2] - vv[3][2] + vv[2][2]) >= 100 ? 1 : (vv[1][2] - vv[3][2] + vv[2][2]) * 0.01) * ((vv[1][3] - vv[3][3] + vv[2][3]) * 0.01)) * (1 + ((vv[1][4] - vv[3][4] + vv[2][4]) * 0.01)); if (k > k_fix) cout << "-" << endl; else if (k == k_fix) cout << "0" << endl; else cout << "+" << endl; if (p > p_fix) cout << "-" << endl; else if (p == p_fix) cout << "0" << endl; else cout << "+" << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...