답안 #497099

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
497099 2021-12-22T11:40:58 Z AQ0212 XOR Sum (info1cup17_xorsum) C++17
45 / 100
1022 ms 2416 KB
#include <iostream>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#include <string>
#include <sstream>
#include <cstring>
 
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse,-fgcse-lm")
#pragma GCC optimize("-ftree-pre,-ftree-vrp")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
 
#define ll long long int
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define all(x) x.begin(), x.end()
 
using namespace std;
 
ll ans, a[ 100111 ];
 
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
 
    ll n;
 
    cin >> n;
 
    for(int i = 1; i <= n; i ++){
        cin >> a[ i ];
    }
 	sort(a + 1, a+ 1 + n);
    for(int i = 1; i <= n; i ++){
        for(int j = i; j <= n; j ++){
            ans ^= (a[ i ] + a[ j ]);
        }
    }
 
    cout << ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 332 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 10 ms 2416 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 10 ms 2416 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 332 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
3 Correct 1010 ms 2016 KB Output is correct
4 Correct 1022 ms 1848 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 332 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
3 Runtime error 10 ms 2416 KB Execution killed with signal 11
4 Halted 0 ms 0 KB -