Submission #931070

# Submission time Handle Problem Language Result Execution time Memory
931070 2024-02-21T07:47:49 Z hugsfromadicto XOR Sum (info1cup17_xorsum) C++14
45 / 100
1600 ms 2172 KB
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int mxN = 2e5+5;
int a[mxN];
void _()
{
   int n;
   cin >> n;
   int res = 0;
   for(int i = 0; i < n; ++i)
   {
       cin >> a[i];
       for(int j = 0; j <= i; ++j)
       {
           res ^= (a[i] + a[j]);
       }
   }
   cout << res;
}

main()
{
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);

  int tc = 1;
  //cin>>tc;
  while(tc--)
  {
      _();
  }

}


Compilation message

xorsum.cpp:23:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   23 | main()
      | ^~~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 600 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1629 ms 2172 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1629 ms 2172 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 600 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 891 ms 2048 KB Output is correct
4 Correct 879 ms 2148 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 600 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Execution timed out 1629 ms 2172 KB Time limit exceeded
4 Halted 0 ms 0 KB -