#include <stdlib.h>
#include <math.h>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main (int argc, char *argv[])
{
float FACTOR = argc > 1 ? atof(argv[1]) : 0.0192;
int BAL = argc > 2 ? atoi(argv[2]) : 90;
float MIN = argc > 3 ? atof(argv[3]) : 0.0;
float MAX = argc > 4 ? atof(argv[4]) : 12000.0;
float STEP = argc > 5 ? atof(argv[5]) : 0.1;
cout << " FACTOR:" << FACTOR;
cout << " BAL:" << BAL;
cout << " MIN:" << MIN;
cout << " MAX:" << MAX;
cout << " STEP:" << STEP << endl;
vector<int> exp_damage;
int i,damage;
while(cin >> i)
exp_damage.push_back (i);
cout << "origin size:" << exp_damage.size() << endl;
std::sort (exp_damage.begin(), exp_damage.end());
vector<int>::iterator it;
it = std::unique (exp_damage.begin(), exp_damage.end());
exp_damage.resize( std::distance(exp_damage.begin(),it) );
cout << "unique size:" << exp_damage.size() << endl;
int pre = *exp_damage.begin(); // 前一個數字
for( it = exp_damage.begin(); it != exp_damage.end(); ++it) {
cout << *it << " [ " << *it-pre << " ]\n" ;
pre = *it;
}
float raw_attack,bal;
vector<int> theo_damage((100-BAL)*2+1,0);
vector<float> output;
for( raw_attack = MIN; raw_attack <= MAX; raw_attack += STEP) {
it = theo_damage.begin();
for( bal = float(BAL)/100; bal<=1.0; bal += 0.005) {
*it = floor( raw_attack * FACTOR * bal );
++it;
}
//for( it = theo_damage.begin(); it != theo_damage.end(); ++it)
// cout << *it << " ";
//cout << "\n";
int flag = 0;
for( i = 0; i < exp_damage.size(); i++ ) {
it = find (theo_damage.begin(), theo_damage.end(), exp_damage[i]);
if( it == theo_damage.end() ) {
flag = 1;
break;
}
}
if( flag == 0 )
output.push_back(raw_attack);
}
i = 0;
for(float f=STEP; f < 0.99; i++)
f = f * 10;
cout << fixed;
cout.precision(i);
for( i=0; i<output.size(); ++i )
cout << output[i] << " ";
return 0;
}