| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 992031 | ramalzaher | XOR Sum (info1cup17_xorsum) | C++14 | 528 ms | 131072 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define sz size()
#define pb push_back
#define all(x) x.begin() , x.end()
using namespace std;
int main()
{
ll n; cin >> n ; ll a[n] ;
map<int,int> mp ;ll mx = -1 ;
for (int i = 0; i < n; i++)
{
cin >> a[i]; mp[a[i]] ++ ;
mx = max(mx , a[i] );
}
for(auto &it: mp ){
it.second= it.second%2 ;
}
ll ans = 0 ; map<pair<int,int> , int > mp1 ;
for(int i = 0 ; i < mx+22 ; i ++ ){
for (int j = i; j < mx+22 ; j ++)
{
if(mp[j]>0 && mp[i]>0 ){
//cout<< i << " " << j << endl;
ans ^= (j + i) ;
}
}
}
cout<<ans<<endl;
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
