当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3972:1 M possible

题目描述
There are 3*N+2 nonnegative integers. Except two special integers, the rest 3*N integers can form N triple groups: { Vi, Vj, Vk| Vi=Vj=Vk}, each integer are at most in one triple group.

Your task is to find the two special integers.

Now, suneast is so boring. He wants to compete with you. As there is no computer available for him, he has to find the integers use his eyes! Unbelievable! So just for fairness, your program can access ONLY 1MB memory!

Tips: Impossible itself says 1 M possible ------ Tourist’s quote (a topcoder target member)
输入解释
The first line of the input contains an integer T(T<=3), indicating the number of test cases.

Each case begin with a line containing an integers N(2<=N<=300000, N=2(mod3) ).

The second lines contains N nonnegative integers Vi (1<=Vi<=2147483647).
输出解释
For each test case, print a line containing two integers a, b (a<=b) separate by a blank. a, b is the desire two special integers.
输入样例
2 
2 
1 2 
23 
1 3 1 4 5 2 1 1 3 1 4 5 2 1 1 3 1 4 5 2 1 2 1
输出样例
1 2 
1 2
来自杭电HDUOJ的附加信息
Author isuneast
Recommend

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3972

最后修改于 2020-10-25T23:08:53+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
15000/5000MS(Java/Others) 2048/1024K(Java/Others)