hiho week 80 register

Ended

Participants:173

Verdict:Accepted
Score:100 / 100
Submitted:2016-01-15 21:01:57

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.Arrays;
import java.util.Scanner;
public class Main {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int ballCount = 0;
        int maxBallCount = 0;
        int delta[] = new int[3];
        int count[] = new int[3];
        for (int i = 0i < 3i++)
            delta[i= in.nextInt();
        Arrays.sort(delta);
        char balls[] = in.next().toCharArray();
        for (char color : balls) {
            count[colorToIndex(color)]++;
            if (++ballCount > maxBallCount)
                maxBallCount = ballCount;
            if (shouldClean(deltacount)) {
                for (int i = 0i < 3i++)
                    count[i= 0;
                ballCount = 0;
            }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX