hiho week 37 register

Ended

Participants:317

Verdict:Accepted
Score:100 / 100
Submitted:2015-03-15 10:44:06

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
using namespace std;
void FindNumber(int *Array,int n,int k);
void Qsort(int a[],int low,int high);
int main()
{
    int n,k;
    cin>>n>>k;
    int*Array=new int[n];
    for(int i=0;i<n;i++)
    {
        cin>>Array[i];
    }
    FindNumber(Array,n,k);
    return 0;
}
void Qsort(int a[],int low ,int high)
{
    if(low>=high)return;
    int first=low;
    int last=high;
    int key=a[first];
    while(first<last)
    {
        while(first<last&&a[last]>=key) --last;
        a[first]=a[last];
        while(first<last&&a[first]<=key) ++first;
        a[last]=a[first];
        
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX