A - Odd Palindrome
水。
1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 #define N 110 6 7 char s[N]; 8 9 inline bool work() 10 { 11 int len = strlen(s); 12 for (int i = 1; i < len; ++i) 13 { 14 if (s[i] == s[i - 1]) return false; 15 } 16 return true; 17 } 18 19 int main() 20 { 21 while (scanf("%s", s) != EOF) 22 { 23 puts(work() ? "Odd." : "Or not."); 24 } 25 return 0; 26 }