标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11549 Accepted Submission(s): 5481
5 2 4 1 3 5
3HintINPUT DETAILS: Five cows with milk outputs of 1..5 OUTPUT DETAILS: 1 and 2 are below 3; 4 and 5 are above 3.
#include<stdio.h> #include<algorithm> using namespace std; int x[100000]; int main() { int n,i; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) scanf("%d",&x[i]); sort(x,x+n); printf("%d\n",x[n/2]); } return 0; }
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:
原文地址:http://blog.csdn.net/l15738519366/article/details/47749241