hiho week 37 register

Ended

Participants:317

Verdict:Accepted
Score:100 / 100
Submitted:2015-03-15 07:06:47

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 <stdio.h>
#include <limits.h>
#include <stdlib.h>
#include <memory.h>
void swap(int &a, int &b) {
    
    int t = a;
    a = b;
    b = t;
}
int findKth(int *A, int n, int k) {
    
    if(k < 1 || k > n)
        return -1;
    
    int st = 0;
    int ed = n-1;
    
    int u = 0;
    
    while(st <= ed) {
    
        int j = st-1;
        for(int i=st;i<ed;i++) {
            
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX