Submission #5088

# Submission time Handle Problem Language Result Execution time Memory
5088 2014-02-02T21:30:26 Z ainta 양말 찾기 (KPI13_socks) C++
1 / 1
2000 ms 1440 KB
#include<stdio.h>
int b[2][45010], r[2];
int main(){
	int n, a, i, j, c = 0;
	scanf("%d", &n);
	while (n--){ scanf("%d", &a); a += 1000000001; b[0][a % 45001] ^= a, b[1][a % 45000] ^= a; }
	for (i = 0; i<2 && c != 2; i++){
		c = 0;
		for (j = 0; j<45001; j++)if (b[i][j]) r[c++] = b[i][j] - 1000000001;
	}
	if (r[0]>r[1])a = r[0], r[0] = r[1], r[1] = a;
	printf("%d %d\n", r[0], r[1]);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 1440 KB Output is correct
2 Correct 0 ms 1440 KB Output is correct
3 Correct 0 ms 1440 KB Output is correct
4 Correct 0 ms 1440 KB Output is correct
5 Correct 0 ms 1440 KB Output is correct
6 Correct 0 ms 1440 KB Output is correct
7 Correct 0 ms 1440 KB Output is correct
8 Correct 0 ms 1440 KB Output is correct
9 Correct 0 ms 1440 KB Output is correct
10 Correct 0 ms 1440 KB Output is correct
11 Correct 1956 ms 1440 KB Output is correct
12 Correct 2000 ms 1440 KB Output is correct
13 Correct 1992 ms 1440 KB Output is correct
14 Correct 100 ms 1440 KB Output is correct
15 Correct 100 ms 1440 KB Output is correct
16 Correct 180 ms 1440 KB Output is correct
17 Correct 212 ms 1440 KB Output is correct
18 Correct 0 ms 1440 KB Output is correct
19 Correct 0 ms 1440 KB Output is correct
20 Correct 208 ms 1440 KB Output is correct
21 Correct 0 ms 1440 KB Output is correct
22 Correct 0 ms 1440 KB Output is correct
23 Correct 196 ms 1440 KB Output is correct
24 Correct 0 ms 1440 KB Output is correct
25 Correct 0 ms 1440 KB Output is correct
26 Correct 208 ms 1440 KB Output is correct
27 Correct 204 ms 1440 KB Output is correct
28 Correct 0 ms 1440 KB Output is correct
29 Correct 0 ms 1440 KB Output is correct
30 Correct 200 ms 1440 KB Output is correct
31 Correct 0 ms 1440 KB Output is correct
32 Correct 0 ms 1440 KB Output is correct
33 Correct 204 ms 1440 KB Output is correct
34 Correct 0 ms 1440 KB Output is correct
35 Correct 0 ms 1440 KB Output is correct
36 Correct 200 ms 1440 KB Output is correct
37 Correct 192 ms 1440 KB Output is correct
38 Correct 196 ms 1440 KB Output is correct
39 Correct 204 ms 1440 KB Output is correct
40 Correct 184 ms 1440 KB Output is correct
41 Correct 136 ms 1440 KB Output is correct
42 Correct 184 ms 1440 KB Output is correct
43 Correct 184 ms 1440 KB Output is correct
44 Correct 200 ms 1440 KB Output is correct
45 Correct 196 ms 1440 KB Output is correct
46 Correct 180 ms 1440 KB Output is correct
47 Correct 212 ms 1440 KB Output is correct
48 Correct 200 ms 1440 KB Output is correct
49 Correct 200 ms 1440 KB Output is correct
50 Correct 176 ms 1440 KB Output is correct