hiho week 39 register

Ended

Participants:2159

Verdict:Wrong Answer
Score:80 / 100
Submitted:2015-04-03 14:13:26

Lang:Java

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
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = 0;
        int count = 0;
        while (in.hasNext()) {
            n = in.nextInt();
            if (n <= 1) {
                System.out.println(0);
            }
            int[] num = new int[n];
            for (int i = 0i < ni++) {
                num[i= in.nextInt();
            }
            count = binaryCount(num0n - 1);
            System.out.println(count);
        }
        in.close();
        return;
    }
    public static int binaryCount(int num[], int startint end) {
        int count = 0rightCount = 0;
        int[] tempNum = new int[end - start + 1];
        if (end - start == 0) {
            return 0;
        }
        count = binaryCount(numstart, (start + end) / 2)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX