hdoj 2537
来源:互联网 发布:知乎 三体问题 编辑:程序博客网 时间:2024/05/21 07:05
http://acm.hdu.edu.cn/showproblem.php?pid=2537
//水题#include <string>#include <iostream>using namespace std;int main(){ int rsum, ysum, n; int i; string str; while (cin >> n && n) { cin >> str; rsum = ysum = 0; for (i = 0; i < str.length()-1; i++) { if (str[i] == 'R') rsum ++; if (str[i] == 'Y') ysum ++; } if (str[i] == 'B' && rsum != 7) puts("Yellow"); if (str[i] == 'B' && rsum == 7) puts("Red"); if (str[i] == 'L' && ysum != 7) puts("Red"); if (str[i] == 'L' && ysum == 7) puts("Yellow"); } return 0;}
- hdoj 2537
- HDOJ
- hdoj
- hdoj
- HDOJ
- HDOJ 2537 8球胜负
- hdoj 1568 && hdoj 5344 && hdoj 5444
- HDOJ 2537 8球胜负
- HDOJ/HDU 2537 8球胜负(水题.简单的判断)
- HDOJ 2176
- Hdoj--1272
- hdoj 1003
- hdoj 1005
- hdoj 1030
- hdoj 2154
- hdoj 2100
- HDOJ 1106
- hdoj 1257
- hdoj 1290
- Java中使用MongoDB连接池的注意事项
- 迭代器模式(Iterator)
- 在iOS项目中使用CorePlot框架
- 说SQL中的TRUNCATE和DELETE 之间的区别
- hdoj 2537
- C函数中指针参数
- hdoj2547
- GDI+ 保存指定的窗口为JPEG文件(X Y轴镜像功能可选)
- 解题思路
- 刚开始职场生涯
- hdoj 2548
- hdoj 2549
- 中介者模式(Mediator)