답안 #213601

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
213601 2020-03-26T09:12:43 Z wendy_virgo XOR Sum (info1cup17_xorsum) C++14
7 / 100
1600 ms 8952 KB
#include <bits/stdc++.h>

using namespace std;

template<typename TH>
void _dbg(const char* sdbg, TH h)
{
	cerr << sdbg << " = " << h << "\n";
}

template<typename TH, typename... TA>
void _dbg(const char* sdbg, TH h, TA... t)
{
	while (*sdbg != ',') cerr << *sdbg++;
	cerr << " = " << h << ",";
	_dbg(sdbg + 1, t...);
}

#define db(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
#define chkpt cerr << "--- Checkpoint here ---\n";

const int N=1e6+6;

int n,a[N];

void Sub1(){
    int ans=0;
    for(int i=1;i<=n;++i){
        for(int j=i;j<=n;++j){
            ans^=(a[i]+a[j]);
        }
    }
    cout<<ans;
}

int main()
{
//    freopen("info1cup17_xorsum.inp","r",stdin);
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>n;
	for(int i=1;i<=n;++i){
        cin>>a[i];
	}
	Sub1();
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 256 KB Output is correct
2 Correct 9 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1699 ms 8952 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1699 ms 8952 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 256 KB Output is correct
2 Correct 9 ms 384 KB Output is correct
3 Execution timed out 1696 ms 1664 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 10 ms 256 KB Output is correct
2 Correct 9 ms 384 KB Output is correct
3 Execution timed out 1699 ms 8952 KB Time limit exceeded
4 Halted 0 ms 0 KB -