답안 #646395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
646395 2022-09-29T18:02:06 Z murad_2005 XOR Sum (info1cup17_xorsum) C++14
7 / 100
1600 ms 4180 KB
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define ull unsigned long long
#define ui unsigned int
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
#define pf push_front
#define pii pair<int, int>
#define pil pair<int, ll>
#define plli pair<long long, int>
#define pdi pair<double, int>
#define pldldi pair<ld, pair<ld, int>>
#define pdd pair<double, double>
#define pid pair<int, double>
#define piii pair<int, pair<int, int>>
#define pllll pair<long long, long long>
#define pllllll pair<ll, pllll>
#define INF 2e9 + 5
#define size(v) v.size()
#define f first
#define s second
#define Pi 3.14159265359

using namespace std;

void solve(){
    int n;
    cin >> n;
    int Res = 0;
    vector<int>a(n);
    for(int i = 0; i < n; i++){
        cin >> a[i];
        for(int j = 0; j <= i; j++){
            Res ^= (a[i] + a[j]);
        }
    }
    cout << Res;
}

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int t;
    t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 212 KB Output is correct
2 Correct 5 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1677 ms 4180 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1677 ms 4180 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 212 KB Output is correct
2 Correct 5 ms 212 KB Output is correct
3 Execution timed out 1678 ms 596 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 212 KB Output is correct
2 Correct 5 ms 212 KB Output is correct
3 Execution timed out 1677 ms 4180 KB Time limit exceeded
4 Halted 0 ms 0 KB -