思路: 求数组里的第三大: #include <bits/stdc++.h> using namespace std; typedef long long LL; int a[15]; int main() { int t,cas=1; scanf("%d",&t); while(t--) { scanf("%d",&cas); for(int i=0;i<10;i++) scanf("%d",&a[i]…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049 Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a containe…