Submission #15226

# Submission time Handle Problem Language Result Execution time Memory
15226 2015-07-12T04:10:20 Z kesakiyo6 님 무기가 좀 나쁘시네여 (kriii3_S) C++
0 / 29
0 ms 1720 KB
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <limits.h>
#include <functional>
#include <utility>
#include <fstream>
#include <string>
#include <string.h>
#include <queue>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <stack>

using namespace std;
typedef long long ll;

double cal_abil(vector<double> &abil){
	double ret = abil[0];
	ret *= ((double)1 + (abil[1] / (double)100));
	ret *= (((double)1 - min(abil[2], (double)1)) + min(abil[2], (double)1) * (abil[3]));
	ret *= ((double)1 + (abil[4]));
	return ret;
}

int main(){
#ifdef _CONSOLE
	freopen("input.txt", "r", stdin);
#endif
	vector<double>  k(5), p(5), w1(5), w2(5);
	//[0]공격력, [1]힘, [2]치명타 확률, [3]치명타 피해비율, [4]공격속도 증가
	double kb, pb, ka, pa;
	for (int i = 0; i < 5; i++) cin >> k[i];
	for (int i = 0; i < 5; i++) cin >> p[i];
	for (int i = 0; i < 5; i++) cin >> w1[i];
	for (int i = 0; i < 5; i++) cin >> w2[i];
	for (int i = 2; i < 5; i++){
		k[i] /= 100;
		p[i] /= 100;
		w1[i] /= 100;
		w2[i] /= 100;
	}
	kb = cal_abil(k);
	pb = cal_abil(p);
	for (int i = 0; i < 5; i++){
		k[i] = (k[i] - w1[i]) + w2[i];
		p[i] = (p[i] - w2[i]) + w1[i];
	}
	ka = cal_abil(k);
	pa = cal_abil(p);
	if (ka > kb) cout << "+" << endl;
	else if (ka < kb) cout << "-" << endl;
	else cout << "0" << endl;
	if (pa > pb) cout << "+" << endl;
	else if(pa < pb) cout << "-" << endl;
	else cout << "0" << endl;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1720 KB Output is correct
2 Correct 0 ms 1720 KB Output is correct
3 Incorrect 0 ms 1720 KB Output isn't correct
4 Halted 0 ms 0 KB -