题目:http://acm.hdu.edu.cn/showproblem.php?pid=2561
AC代码(C++):
#include <iostream> #include <queue> #include <set> #include <string> #include <algorithm> #include <string.h> #include <math.h> #define INF 0x3f3f3f3f #define eps 1e-8 typedef unsigned long long ULL; using namespace std; int n; int a[100]; int main() { int t; cin >> t; while (t--) { cin >> n; for (int i = 0; i < n; i++)cin >> a[i]; sort(a, a + n); cout << a[1] << endl; } //system("pause"); }总结: 水题, 手速.