32042023-02-22 13:20:0312BotiGyros (30)python3Wrong answer 15/3021ms13080 KiB
for _ in range(int(input())):
    n, ca, ba = map(int, input().split())
    v, b, c = 0, 0, 0
    for ch in input():
        if ch == "V":
            v += 1
        elif ch == "B":
            b += 1
        else:
            c += 1
    bd = min(b, ba // 2)
    cd = min(c, ca // 2)
    vd = min(v, ba - bd * 2, ca - cd * 2)
    print(bd + cd + vd)
SubtaskSumTestVerdictTimeMemory
base15/30
1Accepted0/017ms11224 KiB
2Wrong answer0/021ms11588 KiB
3Accepted2/217ms11556 KiB
4Accepted2/217ms11656 KiB
5Accepted2/217ms11976 KiB
6Wrong answer0/317ms12236 KiB
7Wrong answer0/319ms12448 KiB
8Wrong answer0/317ms12744 KiB
9Accepted2/217ms12672 KiB
10Accepted2/217ms13068 KiB
11Accepted2/217ms12880 KiB
12Accepted3/318ms12924 KiB
13Wrong answer0/320ms13080 KiB
14Wrong answer0/321ms13000 KiB