//2321Filling Out the Team
#include <iostream>
#include <stdio.h>
#define FILE_DEBUG
#ifdef FILE_DEBUG
#include <fstream>
#endif
using namespace std;
int main(int argc, char *argv[])
{
#ifdef FILE_DEBUG
ifstream fin;
fin.open("input.txt");
cin.rdbuf(fin.rdbuf()); // assign file's streambuf to cin
#ifdef _C_LAN_
freopen("input.txt", "r", stdin);
#endif
#endif
#ifdef FILE_DEBUG
ofstream fout;
fout.open("output.txt");
cout.rdbuf(fout.rdbuf()); // assign file's streambuf to cout
#ifdef _C_LAN_
freopen("output.txt", "w", stdout);
#endif
#endif
bool is_first;
double speed, weight, strength;
while (cin >> speed >> weight >> strength
&& (speed || weight || strength))
{
is_first = true;
if (speed <= 4.5 && weight >= 150 && strength >= 200)
{
cout << "Wide Receiver";
is_first = false;
}
if (speed <= 6 && weight >= 300 && strength >= 500)
{
if (is_first == false)
cout << " ";
cout << "Lineman";
is_first = false;
}
if (speed <= 5 && weight >= 200 && strength >= 300)
{
if (is_first == false)
cout << " ";
cout << "Quarterback";
is_first = false;
}
if (is_first == true)
{
cout << "No positions";
}
cout << endl;
}
return 0;
}
ZOJ 2321 Filling Out the Team
最新推荐文章于 2019-09-23 21:39:10 发布