Topic Portal
1 /*2 Water questions: three strings to determine if each has a corresponding vowel letter, yes/no3 Afternoon Slow speed: (4 */5#include <cstdio>6#include <cstring>7#include <string>8#include <iostream>9#include <algorithm>Ten#include <cmath> One using namespacestd; A - Const intMAXN = 1e2 +Ten; - Const intINF =0x3f3f3f3f; the strings[3]; - - intMainvoid)//codeforces Beta Round #70 (Div. 2) A. Haiku - { + //freopen ("a.in", "R", stdin); - + while(Getline (CIN, s[0])) A { atGetline (CIN, s[1]); Getline (CIN, s[2]); - //cout << s[0] << endl << s[1] << endl << s[2] << Endl; Continue; - - BOOLFlag =true; - for(intI=0; i<3; ++i) - { in intCntintm =0; - if(i = =0|| i = =2) CNT =5; to ElseCNT =7; + for(intj=0; S[I][J]; ++j) - { the if(S[i][j] = ='a'|| S[I][J] = ='e'|| S[I][J] = ='I'|| S[I][J] = ='o' *|| S[I][J] = ='u') m++; $ }Panax Notoginseng if(M! = CNT) flag =false; - if(!flag) Break; the } + A if(flag) puts ("YES"); the ElsePuts ("NO"); + } - $ return 0; $}
Water problem codeforces Beta Round #70 (Div. 2) A. Haiku