|
|
вернуться в форумgetting constant Memory Limit Exceeded Послано chang 28 дек 2013 23:20 Re: getting constant Memory Limit Exceeded Послано chang 28 дек 2013 23:21 #include <bits/stdc++.h> using namespace std; typedef long long ill; ill arr[250000]; int main() { int n; cin >> n; for(int i = 0; i < n; ++i) cin >> arr[i]; nth_element(arr,arr+n/2,arr+n); double ans = (double)arr[(n/2)];
if (n & 1){ printf("%0.1lf\n",ans); } else { nth_element(arr,arr+(n/2)-1,arr+n); ans += (double)arr[(n/2)-1]; printf("%0.1lf\n",ans/2.0); } return 0; } Can somebody tell me the problem .... |
|
|