POJ 2070

#include<iostream>
#include<stdio.h>
using namespace std;

int main()
{
    //freopen("acm.acm","r",stdin);
    double speed;
    double weight;
    double strength;
    int time;
    while(cin>>speed>>weight>>strength)
    {
        time = 0;
        if(!speed && !weight && !strength)
            break;
        if(speed <= 4.5 && weight >= 150 && strength >= 200)
        {
            cout<<"Wide Receiver ";
            time = 1;
        }
        if(speed <= 6.0 && weight >= 300 && strength >= 500)
        {
            cout<<"Lineman ";
            time = 1;
        }
        if(speed <= 5.0 && weight >= 200 && strength >= 300)
        {
            cout<<"Quarterback ";
            time = 1;
        }
        if(time == 0)
            cout<<"No positions";
        cout<<endl;
    }
}
时间: 2024-10-13 07:52:30

POJ 2070的相关文章

POJ 2070 Filling Out the Team(水题)

[题目简述]:给出了球场上WideReceiver,Lineman,Quarterback三个位置所需人员的最低属性(speed,weight ,strength)要求,输入:三个数据,为别为speed.weight.strength,若输入的速度低于或等于球场上位置的要求,体重和力量大于或等于球场上位置的要求,则输出相应的符合位置,若有多个符合的位置,中间用一个空格隔开输出,如没有符合位置,则输出 No positions. [分析]:很简单,但是,对于我的代码还是有个疑问,就是拿题目中前两个

POJ 2070 Filling Out the Team

Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 9679   Accepted: 5420 Description Over the years, the people of the great city of Pittsburgh have repeatedly demonstrated a collective expertise at football second to none. Recently a spy h

POJ题目推荐(转载)

POJ推荐50题1.标记“难”和“稍难”的题目可以看看,思考一下,不做要求,当然有能力的同学可以直接切掉.2.标记为A and B的题目是比较相似的题目,建议大家两个一起做,可以对比总结,且二者算作一个题目.3.列表中大约有70个题目.大家选做其中的50道,且每类题目有最低数量限制.4.这里不少题目在BUPT ACM FTP上面都有代码,请大家合理利用资源.5.50个题目要求每个题目都要写总结,养成良好的习惯.6.这个列表的目的在于让大家对各个方面的算法有个了解,也许要求有些苛刻,教条,请大家谅

ACM训练方案-POJ题目分类

ACM训练方案-POJ题目分类 博客分类: 算法 ACM online Judge 中国: 浙江大学(ZJU):http://acm.zju.edu.cn/ 北京大学(PKU):http://acm.pku.edu.cn/JudgeOnline/ 杭州电子科技大学(HDU):http://acm.hdu.edu.cn/ 中国科技大学(USTC):http://acm.ustc.edu.cn/ 北京航天航空大学(BUAA)http://acm.buaa.edu.cn/oj/index.php 南京

转载:poj题目分类(侵删)

转载:from: POJ:http://blog.csdn.net/qq_28236309/article/details/47818407 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K–0.50K:中短代码:0.51K–1.00K:中等代码量:1.01K–2.00K:长代码:2.01K以上. 短:1147.1163.1922.2211.2215.2229.2232.2234.2242.2245.2262.2301.2309.2313.2334.2346.2348

POJ - 3186 Treats for the Cows (区间DP)

题目链接:http://poj.org/problem?id=3186 题意:给定一组序列,取n次,每次可以取序列最前面的数或最后面的数,第n次出来就乘n,然后求和的最大值. 题解:用dp[i][j]表示i~j区间和的最大值,然后根据这个状态可以从删前和删后转移过来,推出状态转移方程: dp[i][j]=max(dp[i+1][j]+value[i]*k,dp[i][j-1]+value[j]*k) 1 #include <iostream> 2 #include <algorithm&

POJ 2533 - Longest Ordered Subsequence(最长上升子序列) 题解

此文为博主原创题解,转载时请通知博主,并把原文链接放在正文醒目位置. 题目链接:http://poj.org/problem?id=2533 Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK)

POJ——T2271 Guardian of Decency

http://poj.org/problem?id=2771 Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 5932   Accepted: 2463 Description Frank N. Stein is a very conservative high-school teacher. He wants to take some of his students on an excursion, but he is

POJ——T2446 Chessboard

http://poj.org/problem?id=2446 Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 18560   Accepted: 5857 Description Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of c