fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class A
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner in = new Scanner(System.in);
  10. boolean x1, x2, x3, x4, x5, x6, x7, x8, x9, x10;
  11. x1 = in.nextByte() == 0 ? false : true;
  12. x2 = in.nextByte() == 0 ? false : true;
  13. x3 = in.nextByte() == 0 ? false : true;
  14. x4 = in.nextByte() == 0 ? false : true;
  15. x5 = in.nextByte() == 0 ? false : true;
  16. x6 = in.nextByte() == 0 ? false : true;
  17. x7 = in.nextByte() == 0 ? false : true;
  18. x8 = in.nextByte() == 0 ? false : true;
  19. x9 = in.nextByte() == 0 ? false : true;
  20. x10 = in.nextByte() == 0 ? false : true;
  21. boolean y= (x1||x2)^(x1||x3)^(x1||x4)^(x1||x5)^(x1||x6)^(x1||x7)^(x1||x8)^(x1||x9)^(x1||x10)^(x2||x3)^(x2||x4)^(x2||x5)^(x2||x6)^(x2||x7)^(x2||x8)^(x2||x9)^(x2||x10)^(x3||x4)^(x3||x5)^(x3||x6)^(x3||x7)^(x3||x8)^(x3||x9)^(x3||x10)^(x4||x5)^(x4||x6)^(x4||x7)^(x4||x8)^(x4||x9)^(x4||x10)^(x5||x6)^(x5||x7)^(x5||x8)^(x5||x9)^(x5||x10)^(x6||x7)^(x6||x8)^(x6||x9)^(x6||x10)^(x7||x8)^(x7||x9)^(x7||x10)^(x8||x9)^(x8||x10)^(x9||x10)^(x1||x2||x3)^(x1||x2||x4)^(x1||x2||x5)^(x1||x2||x6)^(x1||x2||x7)^(x1||x2||x8)^(x1||x2||x9)^(x1||x2||x10)^(x1||x3||x4)^(x1||x3||x5)^(x1||x3||x6)^(x1||x3||x7)^(x1||x3||x8)^(x1||x3||x9)^(x1||x3||x10)^(x1||x4||x5)^(x1||x4||x6)^(x1||x4||x7)^(x1||x4||x8)^(x1||x4||x9)^(x1||x4||x10)^(x1||x5||x6)^(x1||x5||x7)^(x1||x5||x8)^(x1||x5||x9)^(x1||x5||x10)^(x1||x6||x7)^(x1||x6||x8)^(x1||x6||x9)^(x1||x6||x10)^(x1||x7||x8)^(x1||x7||x9)^(x1||x7||x10)^(x1||x8||x9)^(x1||x8||x10)^(x1||x9||x10)^(x2||x3||x4)^(x2||x3||x5)^(x2||x3||x6)^(x2||x3||x7)^(x2||x3||x8)^(x2||x3||x9)^(x2||x3||x10)^(x2||x4||x5)^(x2||x4||x6)^(x2||x4||x7)^(x2||x4||x8)^(x2||x4||x9)^(x2||x4||x10)^(x2||x5||x6)^(x2||x5||x7)^(x2||x5||x8)^(x2||x5||x9)^(x2||x5||x10)^(x2||x6||x7)^(x2||x6||x8)^(x2||x6||x9)^(x2||x6||x10)^(x2||x7||x8)^(x2||x7||x9)^(x2||x7||x10)^(x2||x8||x9)^(x2||x8||x10)^(x2||x9||x10)^(x3||x4||x5)^(x3||x4||x6)^(x3||x4||x7)^(x3||x4||x8)^(x3||x4||x9)^(x3||x4||x10)^(x3||x5||x6)^(x3||x5||x7)^(x3||x5||x8)^(x3||x5||x9)^(x3||x5||x10)^(x3||x6||x7)^(x3||x6||x8)^(x3||x6||x9)^(x3||x6||x10)^(x3||x7||x8)^(x3||x7||x9)^(x3||x7||x10)^(x3||x8||x9)^(x3||x8||x10)^(x3||x9||x10)^(x4||x5||x6)^(x4||x5||x7)^(x4||x5||x8)^(x4||x5||x9)^(x4||x5||x10)^(x4||x6||x7)^(x4||x6||x8)^(x4||x6||x9)^(x4||x6||x10)^(x4||x7||x8)^(x4||x7||x9)^(x4||x7||x10)^(x4||x8||x9)^(x4||x8||x10)^(x4||x9||x10)^(x5||x6||x7)^(x5||x6||x8)^(x5||x6||x9)^(x5||x6||x10)^(x5||x7||x8)^(x5||x7||x9)^(x5||x7||x10)^(x5||x8||x9)^(x5||x8||x10)^(x5||x9||x10)^(x6||x7||x8)^(x6||x7||x9)^(x6||x7||x10)^(x6||x8||x9)^(x6||x8||x10)^(x6||x9||x10)^(x7||x8||x9)^(x7||x8||x10)^(x7||x9||x10)^(x8||x9||x10);
  22. System.out.print(y ? 1 : 0);
  23. in.close();
  24. }
  25. }
Success #stdin #stdout 0.08s 2184192KB
stdin
1 0 1 0 1 0 1 0 1 0
stdout
1