|
|
back to boardSort and Output element n/2 this algo with O(n*log(n)) but i don't know why WA on Test21, please help me! [code deleted] Edited by moderator 24.11.2019 13:39 Re: Sort and Output element n/2 Your mistakes: a[100001] must be a[500001] a[(n-1)/2] must be a[(n+1)/2] qsort(a,n,sizeof(int),compare) must be qsort(a,n+1,sizeof(int),compare). So AC is here: [code deleted] Edited by moderator 24.11.2019 13:38 |
|
|