# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12779 | gs13068 | 양말 찾기 (KPI13_socks) | C++98 | 1952 ms | 1600 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.
#include<cstdio>
int d[2][65536];
int main()
{
int i,a,b;
scanf("%*d");
while(~scanf("%d",&i))
{
i&=2147483647;
d[0][i>>16]^=i;
d[1][i&65535]^=i;
}
a=b=0;
for(i=0;i<65536;i++)if(d[0][i])
{
if(a)b=d[0][i];
else a=d[0][i];
}
if(!b)
{
a=b=0;
for(i=0;i<65536;i++)if(d[1][i])
{
if(a)b=d[1][i];
else a=d[1][i];
}
}
if(a>1e9)a^=-2147483648;
if(b>1e9)b^=-2147483648;
if(a>b)a^=b^=a^=b;
printf("%d %d",a,b);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |