# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
4838 |
2014-01-04T16:24:08 Z |
tncks0121 |
양말 찾기 (KPI13_socks) |
C++ |
|
0 ms |
1212 KB |
#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 = 1; 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;
}
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1212 KB |
Output is correct |
2 |
Correct |
0 ms |
1212 KB |
Output is correct |
3 |
Correct |
0 ms |
1212 KB |
Output is correct |
4 |
Correct |
0 ms |
1212 KB |
Output is correct |
5 |
Correct |
0 ms |
1212 KB |
Output is correct |
6 |
Correct |
0 ms |
1212 KB |
Output is correct |
7 |
Incorrect |
0 ms |
1208 KB |
Output isn't correct |
8 |
Halted |
0 ms |
0 KB |
- |