SPOJ AMR11G
2016-07-14 18:24
190 查看
问一个字符串中有没有D
#include <cstdio> #include <iostream> #include <algorithm> #include <cmath> #include <queue> #include <cstring> #include <vector> using namespace std; #define ll long long char str[100]; int main() { //freopen("input.txt", "r", stdin); //freopen("output.txt", "w", stdout); int T; scanf("%d", &T); while (T--) { scanf("%s", str); int n = strlen(str); bool pass = true; for (int i = 0; i < n; ++i) { if (str[i] == 'D') { pass = false; break; } } if (pass) printf("Possible\n"); else printf("You shall not pass!\n"); } //system("pause"); //while (1); return 0; }
相关文章推荐
- fedora 14 安装第三方软件库rpmfusion 出错解决方案
- sql 锁相关(转)
- emacs 基础学习
- mysql的order by,group by和distinct优化
- Spring事务配置的五种方式和spring里面事务的传播属性和事务隔离级别
- double 类型运算会出现精度问题
- www.wechall.net,一个CTF基础题库学习答案
- 记一次debug
- 有史来最大改变 Android 5.0十大新特性
- 'Invalid parameter not satisfying: URLString'网络请求的时候get使用特殊字符和汉字崩溃的恶心bug解决方法...
- 属性动画高级用法之TypeEvaluator和Interpolator
- leetcode279. Perfect Squares
- COPY一份儿:原生APP和Web APP的区别
- 'Invalid parameter not satisfying: URLString'网络请求的时候get使用特殊字符和汉字崩溃的恶心bug解决方法
- UILabel(富文本)
- Qt 去掉窗体标题栏、窗体透明、窗体圆角(一)
- 21种工作流模式
- Eclipse中设置XML文件的自动格式化配
- Property Animation
- CodeForces Gym 100989G Mission in Amman (B) 二分答案