poj 3117 World Cup
来源:互联网 发布:泰迪熊代挂软件官网 编辑:程序博客网 时间:2024/05/02 04:40
//仔细分析题意之后,就会觉得这是一道好简单的题:赢球得3分,输球得0分,平局得1分!现在假设有3场球赛://如果没有输球的球队,则总的分数为9分,如果有一场是平局的情况下,则总的分数为:平局的2分加上赢球的3*2,总共为8分;//如果有二场是平局的情况下,则总的分数为:平局的2*2加上赢球的3*1,总共为7分,按照这样的规律分析下去,结果就出来了! #include <iostream>#include <string>using namespace std;struct Info{ string name; int scores;}team[250];int main(){ int i, t, n, sum, ans, tot; while (cin >> t >> n) { if (t == 0) break; sum = 0; for (i = 0; i < t; i++) { cin >> team[i].name >> team[i].scores; sum += team[i].scores; } tot = n * 3; ans = tot - sum; cout << ans << endl; } system("pause");}
- POJ 3117 World Cup
- poj 3117 World Cup
- poj 3117 World Cup
- Poj 3117 World Cup
- POJ 3117 World Cup
- 【POJ】:POJ 3117 World Cup
- poj 3117 World Cup 规律
- poj 3117 水题 World Cup
- POJ 3117 World Cup G++
- poj 3117(简单数学题) World Cup
- poj 3117 World Cup(简单数学题)
- POJ 3117 World Cup(水~)
- poj 1953 World Cup Noise
- POJ 1953 World Cup Noise
- poj 1953 World Cup Noise
- POJ 1953 World Cup Noise
- poj 1953 World Cup Noise
- poj 1953 World Cup Noise
- Bone Collector(01背包)
- div+CSS浏览器兼容问题整理(IE6.0、IE7.0 ,ie8 , FireFox..
- 三个哲理故事教会我(我想所有人都有必要看)如何降低技术创业的风险
- 中止进程导致系统HANG住
- 对于sql2008强制协议加密的一些看法
- poj 3117 World Cup
- 我既要开发PHP,又要开发JSP而同时又都要用到MYSQL数据库,肿么办,安装太多的环境又不好管理(PHPNOW+ECLIPSE)
- Qt开发桌面Helloworld与Qt windows应用程序 双击不能运行解决方法
- 整合Bullet物理引擎到Ogre on iPhone
- android - Gesture学习 1
- 获得本机外部IP和名称
- java基础的零散总结(2)--单例设计模式
- 分页转瀑布
- 在iPhone游戏中Ogre的UI选择和Ogre的内置UI学习