TOJ 1804 The Machinegunners in a Playoff
来源:互联网 发布:java二级考试题库下载 编辑:程序博客网 时间:2024/05/21 22:34
终于知道国足多么不容易只要打平就能晋级是说的简单。。
傻逼了,开始没看懂题弄了什么净胜球。。。
直接开搞。
第一个数要输出自己最小的进球 must晋级 0 30 就只能输出30第二个数要输出自己最大的进球 对方may晋级 30 0 就只能输出30
#include<stdio.h>#include<string.h>int main(){ char s[222]; int a,b,t; freopen("in.txt","r",stdin); scanf("%d",&t); while(t--) { scanf("%*s%*s%*s%s%*s%*s%d%*s%*s%*s%d%*s",s,&a,&b); printf("%d %s %d %d\n",t,s,a,b); if(strcmp(s,"home")==0) { for(int i=0; i<=30; i++) { if(a+i>b) { printf("%d ",i); break; } else if(a+i==b&&i>=b) { printf("%d ",i); break; } } for(int i=30; i>=0; i--) { if(a+i<b+30) { printf("%d\n",i); break; } else if(a+i==b+30&&i<=b) { printf("%d\n",i); break; } } } else { for(int i=0; i<=30; i++) { if(a+i>b) { printf("%d ",i); break; } else if(a+i==b) { printf("%d ",i); break; } } for(int i=30; i>=0; i--) { if(a+i<b+30) { printf("%d\n",i); break; } else if(a+i==b+30&&a<=30) { printf("%d\n",i); break; } } } } return 0;}
0 0
- TOJ 1804 The Machinegunners in a Playoff
- ural 1804 The Machinegunners in a Playoff
- URAL 1804 The Machinegunners in a Playoff(模拟比赛得分)
- URAL 1804 The Machinegunners in a Playoff (比较绕的分类)
- TOJ-2234. A+B In the Future
- TOJ 4349: The Tallest in the Class
- toj 4608 Ball in a Rectangle
- TOJ : 1794. The Bottom of a Graph
- 3989. I guess the gift is a calculator! toj
- Toj 3990. I guess the gift is a bag! II
- TOJ 1782.The jackpot
- TOJ 2917.The Watchman
- TOJ A+B Problem
- TOJ 4110 A+B
- A Spy in the Metro
- A. Vitya in the Countryside
- A Spy in the Metro
- TOJ 1401. All in All
- 【FFT】大整数乘法
- 想入行的朋友看看这篇文章就大概知道游戏行业了
- URAL 1804 The Machinegunners in a Playoff(模拟比赛得分)
- 随机梯度下降法
- Cocos2d-x开发实例:单点触摸事件
- TOJ 1804 The Machinegunners in a Playoff
- JUnit的jar包和hamcrest的jar包关系
- oracle语句中如何把一列的值合并为一个值,用逗号隔开
- Period of an Infinite Binary Expansion+POJ+欧拉函数+好题
- hdu 1242 Rescue (bfs+优先队列)
- 都在放空间的身份卡老师家地方了开始觉得分
- HDU 2686 && HDU 3376(网络流之费用流)
- (一) 正则表达式快速入手指南之字符集合表达式(包含个人总结)
- 如何取得Windows驱动程序的数字签名? 如何通过WHQL认证?