Submission #128615

# Submission time Handle Problem Language Result Execution time Memory
128615 2019-07-11T07:32:10 Z E869120 XOR Sum (info1cup17_xorsum) C++14
7 / 100
1600 ms 12848 KB
#include <iostream>
using namespace std;
#pragma warning (disable: 4996)

long long N, A[1 << 20], ans;

int main() {
	scanf("%lld", &N);
	for (int i = 1; i <= N; i++) scanf("%lld", &A[i]);
	for (int i = 1; i <= N; i++) {
		for (int j = i; j <= N; j++) ans ^= (A[i] + A[j]);
	}
	printf("%lld\n", ans);
	return 0;
}

Compilation message

xorsum.cpp:3:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning (disable: 4996)
 
xorsum.cpp: In function 'int main()':
xorsum.cpp:8:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld", &N);
  ~~~~~^~~~~~~~~~~~
xorsum.cpp:9:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for (int i = 1; i <= N; i++) scanf("%lld", &A[i]);
                               ~~~~~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 8 ms 376 KB Output is correct
2 Correct 9 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1641 ms 12848 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1641 ms 12848 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 376 KB Output is correct
2 Correct 9 ms 376 KB Output is correct
3 Execution timed out 1646 ms 2040 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 376 KB Output is correct
2 Correct 9 ms 376 KB Output is correct
3 Execution timed out 1641 ms 12848 KB Time limit exceeded
4 Halted 0 ms 0 KB -