您的位置:首页 > 其它

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;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: