# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
4840 | tncks0121 | 양말 찾기 (KPI13_socks) | C++98 | 1780 ms | 1212 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <assert.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <string>
#include <functional>
#include <vector>
#include <deque>
#include <utility>
#include <bitset>
#include <limits.h>
#include <time.h>
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
typedef double lf;
typedef unsigned int uint;
typedef long double llf;
typedef pair<int, int> pii;
int n;
int A[4][1<<8];
vector<int> ans;
int main() {
int i, j, k;
scanf("%d", &n);
for(i = 0; i < n; i++) {
int v; scanf("%d", &v);
for(j = 0; j < 4; j++) A[j][(v >> j*8) & 255] ^= v;
}
for(j = 0; j < 4; j++) {
ans.clear();
for(i = 0; i < 256; i++)
if(A[j][i] != 0) ans.push_back(A[j][i]);
if(ans.size() == 2) {
sort(ans.begin(), ans.end());
for(i = 0; i < 2; i++) printf("%d ", ans[i]);
return 0;
}
}
for(j = 0; j < 4; j++) {
ans.clear();
for(i = 0; i < 256; i++)
if(A[j][i] != 0) return 0 & printf(A[j][i] > 0 ? "0 %d" : "%d 0", A[j][i]);
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |