fork(6) download
  1. #include <stdio.h>
  2.  
  3. //t;x(char*s){*s&1&&(t+=2);return--t?*s&&x(s+1):*s&&!1[s];}
  4.  
  5. t;x(char*s){t+=*s%2*2;return--t?*s&&x(s+1):*s*!1[s];}
  6.  
  7.  
  8. int main(void) {
  9. char text[100];
  10. while ( scanf("%s", text) != EOF ) {
  11. t^=t;
  12. printf("%d\n", x(text));
  13.  
  14. }
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 2164KB
stdin
ab
aaabbb
abbbbb
aaaab
aabaabb
abab
a
stdout
1
1
0
0
0
0
0