URAL 1644 A Whole Lot of Walnuts (水
2014-09-27 18:39
369 查看
题目链接:点击打开链接
题意略坑。。
题意略坑。。
#include <cstdio> #include <algorithm> using namespace std; int main() { char s[15]; int n, x; while(~scanf("%d", &n)) { int a = 2, b = 10; for(int i = 0; i < n; i ++) { scanf("%d %s", &x, s); if(s[0] == 'h') a = max(a, x); else b = min(b, x); } if(b <= a) puts("Inconsistent"); else printf("%d\n", b); } return 0; } /* 4 4 hungry 7 satisfied 5 hungry 8 satisfied 2 6 hungry 5 satisfied 0 1 3 satisfied */
相关文章推荐
- URAL 2017 Best of a bad lot 二分图染色 使x集点数最少
- ural 2017 Best of a bad lot
- URAL 2017 Best of a bad lot(二分图交叉染色)
- Diesel powered muscle can be consequence a whole lot of 6-pack abs
- 1678:A lot of dream [300分]
- 1678:A lot of dream [300分]
- Nike Magista X degree of my man whole
- 2017年第0届浙江工业大学之江学院程序设计竞赛决赛 Problem F: qwb has a lot of Coins (博弈论)
- Ural 1057 Amount of Degrees【数位Dp】
- URAL 1021 Sacrament of the Sum
- Why do a lot of #defines in the kernel use do { ... } while(0)?
- ural 1057 Amount of degrees (数位dp)
- (贪心5.2.6)URAL 1014 Product of Digits(利用数据有序化进行贪心选择)
- URAL 1774 Barber of the Army of Mages 最大流
- ural 1057 Amount of Degrees(数位统计)
- [Regular Expressions] Find the Start and End of Whole Words
- The issue of vertical lines throughing the Report footer or the whole page in Crystal report 11
- [ural1057]Amount of Degrees && 数位DP
- URAL 1057 Amount of Degrees 数位dp
- ZJCoj qwb has a lot of Coins ( 博弈