Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdbool.h>
- int main()
- {
- unsigned int word = 0u;
- unsigned int new_word = 0u;
- unsigned int letter = 1u;
- char c;
- int summ = 0, unique = 0;
- bool flag = true;
- scanf("%c", &c);
- while (c != EOF)
- {
- while((c != ' ') && (c != ',') && (c != '\t') && (c != '\n') && (c != EOF)){
- if ((c == 'a') || (c == 'e') || (c == 'i') || (c == 'o') ||(c == 'u')){
- summ++;
- letter = 1u << (c - 'a');
- new_word = new_word | letter;
- if( new_word != word ){
- unique++;
- word = new_word;
- }
- }
- scanf("%c", &c);
- }
- if ((summ == unique) && (summ != 0)){
- printf("YES");
- flag = false;
- break;
- }
- scanf("%c", &c);
- }
- if (flag){
- printf("NO");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement