Warm up 16 Quite a problem
| Quite a problem |
| Time Limit: 10000ms, Special Time Limit:25000ms, Memory Limit:65536KB |
| Total submit users: 45, Accepted users: 45 |
| Problem 12776 : No special judgement |
|
Problem description 这个傻逼题,重判前就我一个人过真的是感人肺腑啊,居然可以是反的,出题人智商! |
| It gets tiring, looking for all ways in which the word ‘problem’ can be used (and mis-used) in the news media. And yet, that’s been your job for several years: looking through news stories for that word. Wouldn’t it be better if you could automate the process? |
| Input |
| Each line of input is one test case. Lines are at most 80 characters long. There are at most 1000 lines of input. Input ends at end of file. |
| Output |
| For each line of input, print yes if the line contains ‘problem’, and no otherwise. Any capitalization of ‘problem’ counts as an occurrence. |
| Sample Input |
Problematic pair programming "There’s a joke that pairs, like fish and house guests, go rotten after three days," said Zach Brock, an engineering manager. Working out problems with a pairing partner can be a lot like working out problems with a significant other. During one recent rough patch, Jamie Kite, a developer, sat her partner down for a talk. "Hey, it feels like we’re driving in different directions," she recalls saying. "It’s like any relationship," Ms. Kite said. "If you don’t talk about the problems, it’s not going to work." When those timeouts don’t solve the problem, partners can turn to on-staff coaches who can help with counseling. "People who have been pairing a while, they’ll start acting like old married couples," said Marc Phillips, one of the coaches. People can be as much of a challenge as writing software. (Excerpted from "Computer Programmers Learn Tough Lesson in Sharing"; Wall Street Journal, August 27, 2012) |
| Sample Output |
yes no no yes yes no no no no yes yes no no no no no no |
| Problem Source |
| HNU Contest |
| Submit Discuss Judge Status Problems Ranklist |
1 #pragma comment(linker, "/STACK:1024000000,1024000000") 2 #include <map> 3 #include <queue> 4 #include <vector> 5 #include <string> 6 #include <cmath> 7 #include <cstdio> 8 #include <cstring> 9 #include <cstdlib> 10 #include <iostream> 11 #include <algorithm> 12 using namespace std; 13 #define maxn 135 14 #define ll long long 15 #define mod 1000000007 16 #define INF 0x7fffffff 17 #define eps 1e-8 18 ll n, m; 19 char s[maxn]; 20 char str[21]; 21 char st[21]; 22 int main(){ 23 /*int t; 24 scanf("%d", &t); 25 while (t--){ 26 scanf("%I64d", &n); 27 28 }*/ 29 ll x, y, a, b, x1, x2, y1, y2, s1, s2; 30 while (1){ 31 if (gets(s) == NULL)break; 32 int flag = 0; 33 for (int i = 0; i < (1 << 7); i++){ 34 strcpy(str, "PROBLEM"); 35 strcpy(st, "MELBORP"); 36 for (int j = 0; j < 7; j++) 37 if (i&(1 << j)){ 38 str[j] += 'a' - 'A'; 39 st[j] += 'a' - 'A'; 40 } 41 if (strstr(s, str) != NULL){printf("yes\n"); flag = 1; break;} 42 if (strstr(s, st) != NULL){printf("yes\n"); flag = 1; break;} 43 } 44 if (flag == 0)printf("no\n"); 45 } 46 return 0; 47 }
浙公网安备 33010602011771号