hiho week 80 register

Ended

Participants:173

Verdict:Wrong Answer
Score:0 / 100
Submitted:2016-01-14 19:12:40

Lang:Python2

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
def is_equal(rybxyz):
    for i,j in zip(ryb,xyz):
        if i != j:
            return False
    return True
while True:
    try:
        (xyz) = (int(k) for k in raw_input().split())
        xyz = sorted([xyz])
        s = list(raw_input())
        print(s)
        l = list()
        max = 0
        cr = 0
        cy = 0
        cb = 0
        m = 0
        for c in s:
            m+=1
            if c=='R'cr+=1
            if c=='Y'cy+=1
            if c=='B'cb+=1
            ryb = sorted([abs(cr-cy),abs(cy-cb),abs(cb-cr)])
            if is_equal(rybxyz):
                if m > maxmax = m
                cr = 0
                cy = 0
                cb = 0
                m = 0
            if m > maxmax = m
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX