fork download
  1. using u32 = unsigned int;
  2.  
  3. const int N = 5e7;
  4.  
  5. int n;
  6. u32 seed, a[N];
  7.  
  8. inline u32 input(u32 x) {
  9. x ^= x << 13;
  10. x ^= x >> 17;
  11. x ^= x << 5;
  12. return x;
  13. }
  14.  
  15. void output() {
  16. u32 re = n;
  17. u32 x = 23333333;
  18. for (u32 i = 0; i < n; i++) {
  19. re = re ^ (a[i] + x);
  20. x ^= x << 13;
  21. x ^= x >> 17;
  22. x ^= x << 5;
  23. }
  24. cout << re << '\n';
  25. }
  26.  
  27. void solve() {
  28. cin >> n >> seed;
  29. for (int i = 0; i < n; i++) {
  30. seed = input(seed);
  31. a[i] = seed;
  32. }
  33. // sort
  34. output();
  35. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void output()’:
prog.cpp:24:5: error: ‘cout’ was not declared in this scope
     cout << re << '\n';
     ^~~~
prog.cpp: In function ‘void solve()’:
prog.cpp:28:2: error: ‘cin’ was not declared in this scope
  cin >> n >> seed;
  ^~~
stdout
Standard output is empty