fork download
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4.  
  5. char x;
  6. void in(){
  7. cin>>x;
  8. if(x!='0' and x!='1')
  9. exit(0);
  10. x-='0';
  11. }
  12. void y(int p){
  13. cout<<p;
  14. }
  15. int main()
  16. {
  17. a:in();y(0);if(x)goto f;goto b;
  18. b:in();y(0);if(x)goto c;goto b;
  19. c:in();y(0);if(x)goto d;goto d;
  20. d:in();if(x){y(1);goto e;}y(0);goto b;
  21. e:in();if(x){y(0);goto f;}y(1);goto d;
  22. f:in();y(0);if(x)goto f;goto g;
  23. g:in();y(0);if(x)goto e;goto b;
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 2732KB
stdin
00111010001111001010101010000001111101010101010010101111101010
stdout
00001111000010000011111111000000010000111111111000111000000111