标签:tar price iostream gre ret ice date acm zoj
ZOJ 3202: Second-price Auction
///@author Sycamore, ZJNU ///@date 2017-02-09 #include<iostream> #include<vector> #include<algorithm> #include<functional> using namespace std; int main() { int T,N; cin >> T; while (T--) { cin >> N; vector<int>v(N); for (auto &e : v)cin >> e; cout << max_element(v.begin(), v.end()) - v.begin()+1 << ‘ ‘; sort(v.begin(), v.end(), greater<int>()); cout << v[1] << endl; } return 0; }
ZOJ 3202: Second-price Auction
标签:tar price iostream gre ret ice date acm zoj
原文地址:http://www.cnblogs.com/zjnu/p/7258020.html