node_ids
sequencelengths
4
1.4k
edge_index
sequencelengths
1
2.22k
text
sequencelengths
4
1.4k
source
stringlengths
14
427k
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 18, 4, 13, 13, 13, 17, 13, 13, 0, 13, 4, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 105, 2 ], [ 105, 15 ], [ 105, 16 ], [ 96, 18 ], [ 108, 27 ], [ 84, 30 ], [ 34, 33 ], [ 97, 33 ], [ 33, 37 ], [ 85, 41 ], [ 100, 41 ], [ 88, 41 ], [ 94, 43 ], [ 106, 44 ], [ 87, 49 ], [ 33, 56 ], [ 85, 61 ], [ 100, 61 ], [ 88, 61 ], [ 94, 63 ], [ 106, 64 ], [ 109, 66 ], [ 103, 66 ], [ 106, 67 ], [ 102, 72 ], [ 99, 75 ], [ 84, 85 ], [ 87, 88 ], [ 105, 91 ], [ 105, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ] ]
[ "N, A, B = map(int, input().strip().split(\" \"))\nstudents = list(input().strip())\n\nkaigai = 0\ntotal = 0\nfor s in students:\n if s == \"a\":\n if total < A+B:\n print(\"Yes\")\n total += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if total < A+B and kaigai < B:\n print(\"Yes\")\n kaigai += 1\n total += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "N, A, B = map(int, input().strip().split(\" \"))", "N", "map(int, input().strip().split(\" \"))", "map", "int", "input().strip().split(\" \")", "().strip().split", "().strip()", "().strip", "()", "input", "strip", "split", "\" \"", "A", "B", "students = list(input().strip())", "students", "list(input().strip())", "list", "input().strip()", "().strip", "()", "input", "strip", "kaigai = 0", "kaigai", "0", "total = 0", "total", "0", "for s in students:\n if s == \"a\":\n if total < A+B:\n print(\"Yes\")\n total += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if total < A+B and kaigai < B:\n print(\"Yes\")\n kaigai += 1\n total += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s", "students", "if s == \"a\":\n if total < A+B:\n print(\"Yes\")\n total += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if total < A+B and kaigai < B:\n print(\"Yes\")\n kaigai += 1\n total += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s == \"a\"", "s", "\"a\"", "if total < A+B:\n print(\"Yes\")\n total += 1\n else:\n print(\"No\")\n ", "total < A+B", "total", "A+B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "total += 1", "total", "1", "print(\"No\")", "print", "\"No\"", "elif s == \"b\":\n if total < A+B and kaigai < B:\n print(\"Yes\")\n kaigai += 1\n total += 1\n else:\n print(\"No\")\n ", "s == \"b\"", "s", "\"b\"", "if total < A+B and kaigai < B:\n print(\"Yes\")\n kaigai += 1\n total += 1\n else:\n print(\"No\")\n ", "total < A+B and kaigai < B", "total < A+B", "total", "A+B", "A", "B", "kaigai < B", "kaigai", "B", "print(\"Yes\")", "print", "\"Yes\"", "kaigai += 1", "kaigai", "1", "total += 1", "total", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "total = 0", "0", "total", "total += 1", "1", "total", "N, A, B = map(int, input().strip().split(\" \"))", "map(int, input().strip().split(\" \"))", "N", "A, B = map(int, input().strip().split(\" \"))", "map(int, input().strip().split(\" \"))", "A", "students = list(input().strip())", "list(input().strip())", "students", "total += 1", "1", "total", "kaigai += 1", "1", "kaigai", "B = map(int, input().strip().split(\" \"))", "map(int, input().strip().split(\" \"))", "B", "kaigai = 0", "0", "kaigai" ]
N, A, B = map(int, input().strip().split(" ")) students = list(input().strip()) kaigai = 0 total = 0 for s in students: if s == "a": if total < A+B: print("Yes") total += 1 else: print("No") elif s == "b": if total < A+B and kaigai < B: print("Yes") kaigai += 1 total += 1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 98, 2 ], [ 98, 11 ], [ 98, 12 ], [ 95, 14 ], [ 92, 20 ], [ 86, 22 ], [ 26, 25 ], [ 96, 25 ], [ 25, 29 ], [ 93, 34 ], [ 90, 34 ], [ 87, 35 ], [ 81, 35 ], [ 99, 37 ], [ 84, 38 ], [ 89, 40 ], [ 25, 50 ], [ 93, 56 ], [ 90, 56 ], [ 87, 57 ], [ 81, 57 ], [ 99, 59 ], [ 84, 60 ], [ 87, 62 ], [ 81, 62 ], [ 84, 63 ], [ 80, 65 ], [ 98, 78 ], [ 80, 81 ], [ 98, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ] ]
[ "n, a, b = map(int, input().split())\ns = list(input())\nx, y = 0, 0\nfor i in s:\n if i == \"a\":\n if x + y < a + b:\n x += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif i == \"b\":\n if x + y < a + b and y < b:\n y += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = list(input())", "s", "list(input())", "list", "input()", "input", "x, y = 0, 0", "x", "0", "y", "0", "for i in s:\n if i == \"a\":\n if x + y < a + b:\n x += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif i == \"b\":\n if x + y < a + b and y < b:\n y += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "s", "if i == \"a\":\n if x + y < a + b:\n x += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif i == \"b\":\n if x + y < a + b and y < b:\n y += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i == \"a\"", "i", "\"a\"", "if x + y < a + b:\n x += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "x + y < a + b", "x + y", "x", "y", "a + b", "a", "b", "x += 1", "x", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif i == \"b\":\n if x + y < a + b and y < b:\n y += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "i == \"b\"", "i", "\"b\"", "if x + y < a + b and y < b:\n y += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "x + y < a + b and y < b", "x + y < a + b", "x + y", "x", "y", "a + b", "a", "b", "y < b", "y", "b", "y += 1", "y", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "y += 1", "1", "y", "b = map(int, input().split())", "map(int, input().split())", "b", "y = 0, 0", "0", "y", "x += 1", "1", "x", "x, y = 0, 0", "0", "x", "s = list(input())", "list(input())", "s", "a, b = map(int, input().split())", "map(int, input().split())", "a" ]
n, a, b = map(int, input().split()) s = list(input()) x, y = 0, 0 for i in s: if i == "a": if x + y < a + b: x += 1 print("Yes") else: print("No") elif i == "b": if x + y < a + b and y < b: y += 1 print("Yes") else: print("No") else: print("No")
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 39, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 4, 13, 13, 2, 13, 13, 4, 13, 17, 4, 18, 13, 13, 2, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 4, 13, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 4, 18, 13, 13, 2, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 39, 13, 10, 13, 13, 10, 4, 13 ]
[ [ 4, 3 ], [ 3, 12 ], [ 117, 14 ], [ 117, 16 ], [ 117, 17 ], [ 120, 19 ], [ 114, 25 ], [ 105, 28 ], [ 32, 31 ], [ 121, 36 ], [ 121, 40 ], [ 31, 41 ], [ 115, 47 ], [ 118, 49 ], [ 103, 50 ], [ 115, 56 ], [ 31, 59 ], [ 121, 67 ], [ 31, 68 ], [ 115, 75 ], [ 118, 77 ], [ 103, 78 ], [ 106, 80 ], [ 109, 80 ], [ 103, 81 ], [ 115, 87 ], [ 31, 90 ], [ 108, 93 ], [ 117, 103 ], [ 105, 106 ], [ 108, 109 ], [ 117, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ] ]
[ "n, a, b = [int(x) for x in input().split()]\nparticipants = list(input())\npassers = []\nbs_rank = 1\n#print(participants)\n\nfor i in range(len(participants)):\n if participants[i] == \"a\": # aについて: 合格者数 < A+Bのとき合格\n if len(passers) < a+b:\n print(\"Yes\")\n passers.append(i+1)\n else:\n print(\"No\")\n \n elif participants[i] == \"b\": # bについて: 合格者数 < A+B and bの中での順位 <= B\n if len(passers) < a+b and bs_rank <= b:\n print(\"Yes\")\n passers.append(i+1)\n bs_rank += 1\n else:\n print(\"No\")\n \n else: # participants[i] == \"c\"\n print(\"No\")", "int(x) for x in input().split()", "for x in input().split()", "x", "input().split()", "().split", "()", "input", "split", "for x in input().split()", "int(x)", "int", "x", "n, a, b = [int(x) for x in input().split()]", "n", "[int(x) for x in input().split()]", "a", "b", "participants = list(input())", "participants", "list(input())", "list", "input()", "input", "passers = []", "passers", "[]", "bs_rank = 1", "bs_rank", "1", "for i in range(len(participants)):\n if participants[i] == \"a\": # aについて: 合格者数 < A+Bのとき合格\n if len(passers) < a+b:\n print(\"Yes\")\n passers.append(i+1)\n else:\n print(\"No\")\n \n elif participants[i] == \"b\": # bについて: 合格者数 < A+B and bの中での順位 <= B\n if len(passers) < a+b and bs_rank <= b:\n print(\"Yes\")\n passers.append(i+1)\n bs_rank += 1\n else:\n print(\"No\")\n \n else: # participants[i] == \"c\"\n print(\"No\")", "i", "range(len(participants))", "range", "len(participants)", "len", "participants", "if participants[i] == \"a\": # aについて: 合格者数 < A+Bのとき合格\n if len(passers) < a+b:\n print(\"Yes\")\n passers.append(i+1)\n else:\n print(\"No\")\n \n elif participants[i] == \"b\": # bについて: 合格者数 < A+B and bの中での順位 <= B\n if len(passers) < a+b and bs_rank <= b:\n print(\"Yes\")\n passers.append(i+1)\n bs_rank += 1\n else:\n print(\"No\")\n \n else: # participants[i] == \"c\"\n print(\"No\")", "participants[i] == \"a\"", "participants[i]", "participants", "i", "\"a\"", "if len(passers) < a+b:\n print(\"Yes\")\n passers.append(i+1)\n else:\n print(\"No\")\n \n ", "len(passers) < a+b", "len(passers)", "len", "passers", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "passers.append(i+1)", "passers.append", "passers", "append", "i+1", "i", "1", "print(\"No\")", "print", "\"No\"", "elif participants[i] == \"b\": # bについて: 合格者数 < A+B and bの中での順位 <= B\n if len(passers) < a+b and bs_rank <= b:\n print(\"Yes\")\n passers.append(i+1)\n bs_rank += 1\n else:\n print(\"No\")\n \n ", "participants[i] == \"b\"", "participants[i]", "participants", "i", "\"b\"", "if len(passers) < a+b and bs_rank <= b:\n print(\"Yes\")\n passers.append(i+1)\n bs_rank += 1\n else:\n print(\"No\")\n \n ", "len(passers) < a+b and bs_rank <= b", "len(passers) < a+b", "len(passers)", "len", "passers", "a+b", "a", "b", "bs_rank <= b", "bs_rank", "b", "print(\"Yes\")", "print", "\"Yes\"", "passers.append(i+1)", "passers.append", "passers", "append", "i+1", "i", "1", "bs_rank += 1", "bs_rank", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "b", "bs_rank = 1", "1", "bs_rank", "bs_rank += 1", "1", "bs_rank", "n, a, b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "n", "passers = []", "[]", "passers", "a, b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "a", "participants = list(input())", "list(input())", "participants" ]
n, a, b = [int(x) for x in input().split()] participants = list(input()) passers = [] bs_rank = 1 #print(participants) for i in range(len(participants)): if participants[i] == "a": # aについて: 合格者数 < A+Bのとき合格 if len(passers) < a+b: print("Yes") passers.append(i+1) else: print("No") elif participants[i] == "b": # bについて: 合格者数 < A+B and bの中での順位 <= B if len(passers) < a+b and bs_rank <= b: print("Yes") passers.append(i+1) bs_rank += 1 else: print("No") else: # participants[i] == "c" print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 88, 2 ], [ 88, 11 ], [ 88, 12 ], [ 70, 14 ], [ 73, 18 ], [ 91, 21 ], [ 25, 24 ], [ 71, 24 ], [ 24, 29 ], [ 74, 33 ], [ 80, 33 ], [ 92, 34 ], [ 77, 34 ], [ 83, 36 ], [ 86, 37 ], [ 79, 42 ], [ 24, 48 ], [ 74, 52 ], [ 80, 52 ], [ 92, 53 ], [ 77, 53 ], [ 83, 55 ], [ 86, 56 ], [ 92, 58 ], [ 77, 58 ], [ 86, 59 ], [ 76, 64 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 88, 83 ], [ 88, 86 ], [ 88, 89 ], [ 91, 92 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\na = 0\nb = 0\nfor char in S:\n if char == 'a' and a+b < A+B:\n print(\"Yes\")\n a += 1\n elif char == 'b' and a+b < A+B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "a = 0", "a", "0", "b = 0", "b", "0", "for char in S:\n if char == 'a' and a+b < A+B:\n print(\"Yes\")\n a += 1\n elif char == 'b' and a+b < A+B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")", "char", "S", "if char == 'a' and a+b < A+B:\n print(\"Yes\")\n a += 1\n elif char == 'b' and a+b < A+B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")", "char == 'a' and a+b < A+B", "char == 'a'", "char", "'a'", "a+b < A+B", "a+b", "a", "b", "A+B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "a += 1", "a", "1", "elif char == 'b' and a+b < A+B and b < B:\n print(\"Yes\")\n b += 1\n ", "char == 'b' and a+b < A+B and b < B", "char == 'b' and a+b < A+B", "char == 'b'", "char", "'b'", "a+b < A+B", "a+b", "a", "b", "A+B", "A", "B", "b < B", "b", "B", "print(\"Yes\")", "print", "\"Yes\"", "b += 1", "b", "1", "print(\"No\")", "print", "\"No\"", "S = input()", "input()", "S", "a = 0", "0", "a", "b += 1", "1", "b", "a += 1", "1", "a", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "b = 0", "0", "b" ]
N, A, B = map(int, input().split()) S = input() a = 0 b = 0 for char in S: if char == 'a' and a+b < A+B: print("Yes") a += 1 elif char == 'b' and a+b < A+B and b < B: print("Yes") b += 1 else: print("No")
[ 7, 15, 13, 12, 13, 29, 0, 13, 4, 18, 17, 13, 4, 13, 13, 13, 4, 18, 18, 13, 13, 13, 2, 13, 17, 23, 0, 13, 12, 8, 13, 4, 13, 17, 4, 13, 17, 23, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 17, 13, 13, 2, 13, 13, 17, 13, 13, 13, 2, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 12, 13 ]
[ [ 8, 7 ], [ 7, 23 ], [ 159, 27 ], [ 153, 39 ], [ 153, 48 ], [ 153, 49 ], [ 147, 51 ], [ 156, 55 ], [ 156, 58 ], [ 62, 61 ], [ 148, 61 ], [ 142, 64 ], [ 154, 66 ], [ 139, 67 ], [ 154, 69 ], [ 139, 70 ], [ 61, 72 ], [ 157, 73 ], [ 133, 73 ], [ 151, 74 ], [ 145, 74 ], [ 157, 76 ], [ 133, 76 ], [ 151, 77 ], [ 145, 77 ], [ 61, 80 ], [ 157, 85 ], [ 133, 85 ], [ 151, 86 ], [ 145, 86 ], [ 154, 88 ], [ 139, 89 ], [ 160, 91 ], [ 132, 94 ], [ 160, 97 ], [ 61, 101 ], [ 157, 107 ], [ 133, 107 ], [ 151, 108 ], [ 145, 108 ], [ 154, 110 ], [ 139, 111 ], [ 151, 113 ], [ 145, 113 ], [ 139, 114 ], [ 160, 116 ], [ 144, 119 ], [ 160, 122 ], [ 61, 126 ], [ 160, 129 ], [ 132, 133 ], [ 153, 136 ], [ 153, 139 ], [ 144, 145 ], [ 147, 148 ], [ 156, 151 ], [ 153, 154 ], [ 156, 157 ], [ 159, 160 ] ]
[ "# ####################################################################\n# import io\n# import sys\n\n# _INPUT = \"\"\"\\\n# 12 5 2\n# cabbabaacaba\n\n# 10 2 3\n# abccabaabb\n# \"\"\"\n# sys.stdin = io.StringIO(_INPUT)\n####################################################################\nimport sys\ndef p(*_a):\n return\n _s=\" \".join(map(str,_a))\n #print(_s)\n sys.stderr.write(_s+\"\\n\")\n####################################################################\nyn = lambda b: print('Yes') if b else print('No')\n####################################################################\n\nN,A,B = map(int, input().split())\nS = input()\n\na = b = 0\n\nfor s in S:\n p(\" \",A,B,A+B,\"_\",s, a,b, a+b)\n if s == 'a':\n if (a+b) < (A+B):\n yn(True)\n a += 1\n else:\n yn(False)\n elif s == 'b':\n if ((a+b) < (A+B)) and (b < B):\n yn(True)\n b += 1\n else:\n yn(False)\n elif s == 'c':\n yn(False)\n", "import sys", "sys", "def p(*_a):\n return\n _s=\" \".join(map(str,_a))\n #print(_s)\n sys.stderr.write(_s+\"\\n\")\n####################################################################", "p", "return", "_s=\" \".join(map(str,_a))", "_s", "\" \".join(map(str,_a))", "\" \".join", "\" \"", "join", "map(str,_a)", "map", "str", "_a", "sys.stderr.write(_s+\"\\n\")", "sys.stderr.write", "sys.stderr", "sys", "stderr", "write", "_s+\"\\n\"", "_s", "\"\\n\"", "*_a", "yn = lambda b: print('Yes') if b else print('No')", "yn", "lambda b: print('Yes') if b else print('No')", "print('Yes') if b else print('No')", "b", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "b", "N,A,B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "a = b = 0", "a", "0", "= b = 0", "b", "0", "for s in S:\n p(\" \",A,B,A+B,\"_\",s, a,b, a+b)\n if s == 'a':\n if (a+b) < (A+B):\n yn(True)\n a += 1\n else:\n yn(False)\n elif s == 'b':\n if ((a+b) < (A+B)) and (b < B):\n yn(True)\n b += 1\n else:\n yn(False)\n elif s == 'c':\n yn(False)", "s", "S", "p(\" \",A,B,A+B,\"_\",s, a,b, a+b)", "p", "\" \"", "A", "B", "A+B", "A", "B", "\"_\"", "s", "a", "b", "a+b", "a", "b", "if s == 'a':\n if (a+b) < (A+B):\n yn(True)\n a += 1\n else:\n yn(False)\n elif s == 'b':\n if ((a+b) < (A+B)) and (b < B):\n yn(True)\n b += 1\n else:\n yn(False)\n elif s == 'c':\n yn(False)", "s == 'a'", "s", "'a'", "if (a+b) < (A+B):\n yn(True)\n a += 1\n else:\n yn(False)\n ", "(a+b) < (A+B)", "a+b", "a", "b", "A+B", "A", "B", "yn(True)", "yn", "True", "a += 1", "a", "1", "yn(False)", "yn", "False", "elif s == 'b':\n if ((a+b) < (A+B)) and (b < B):\n yn(True)\n b += 1\n else:\n yn(False)\n ", "s == 'b'", "s", "'b'", "if ((a+b) < (A+B)) and (b < B):\n yn(True)\n b += 1\n else:\n yn(False)\n ", "((a+b) < (A+B)) and (b < B)", "(a+b) < (A+B)", "a+b", "a", "b", "A+B", "A", "B", "b < B", "b", "B", "yn(True)", "yn", "True", "b += 1", "b", "1", "yn(False)", "yn", "False", "elif s == 'c':\n yn(False)", "s == 'c'", "s", "'c'", "yn(False)", "yn", "False", "a += 1", "1", "a", "N,A,B = map(int, input().split())", "map(int, input().split())", "N", "B = map(int, input().split())", "map(int, input().split())", "B", "def p(*_a):\n return\n _s=\" \".join(map(str,_a))\n #print(_s)\n sys.stderr.write(_s+\"\\n\")\n####################################################################", "def p(*_a):\n return\n _s=\" \".join(map(str,_a))\n #print(_s)\n sys.stderr.write(_s+\"\\n\")\n####################################################################", "p", "b += 1", "1", "b", "S = input()", "input()", "S", "b = 0", "0", "b", "A,B = map(int, input().split())", "map(int, input().split())", "A", "a = b = 0", "0", "a", "yn = lambda b: print('Yes') if b else print('No')", "lambda b: print('Yes') if b else print('No')", "yn" ]
# #################################################################### # import io # import sys # _INPUT = """\ # 12 5 2 # cabbabaacaba # 10 2 3 # abccabaabb # """ # sys.stdin = io.StringIO(_INPUT) #################################################################### import sys def p(*_a): return _s=" ".join(map(str,_a)) #print(_s) sys.stderr.write(_s+"\n") #################################################################### yn = lambda b: print('Yes') if b else print('No') #################################################################### N,A,B = map(int, input().split()) S = input() a = b = 0 for s in S: p(" ",A,B,A+B,"_",s, a,b, a+b) if s == 'a': if (a+b) < (A+B): yn(True) a += 1 else: yn(False) elif s == 'b': if ((a+b) < (A+B)) and (b < B): yn(True) b += 1 else: yn(False) elif s == 'c': yn(False)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 105, 2 ], [ 105, 11 ], [ 105, 12 ], [ 84, 14 ], [ 99, 18 ], [ 102, 21 ], [ 25, 24 ], [ 91, 27 ], [ 85, 31 ], [ 24, 32 ], [ 100, 36 ], [ 88, 36 ], [ 94, 36 ], [ 97, 38 ], [ 106, 39 ], [ 93, 44 ], [ 85, 52 ], [ 24, 53 ], [ 100, 58 ], [ 88, 58 ], [ 94, 58 ], [ 97, 60 ], [ 106, 61 ], [ 103, 63 ], [ 82, 63 ], [ 106, 64 ], [ 87, 69 ], [ 81, 72 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 105, 91 ], [ 93, 94 ], [ 105, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n \nok_count = 0\nok_fcount = 0\nfor i in range(N):\n if S[i] == 'a':\n if ok_count < A+B:\n print('Yes')\n ok_count +=1\n \n else:\n print('No')\n \n elif S[i] == 'b':\n if ok_count < A+B and ok_fcount < B:\n print('Yes')\n ok_count+=1\n ok_fcount+=1\n \n else:\n print('No')\n \n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "ok_count = 0", "ok_count", "0", "ok_fcount = 0", "ok_fcount", "0", "for i in range(N):\n if S[i] == 'a':\n if ok_count < A+B:\n print('Yes')\n ok_count +=1\n \n else:\n print('No')\n \n elif S[i] == 'b':\n if ok_count < A+B and ok_fcount < B:\n print('Yes')\n ok_count+=1\n ok_fcount+=1\n \n else:\n print('No')\n \n else:\n print('No')", "i", "range(N)", "range", "N", "if S[i] == 'a':\n if ok_count < A+B:\n print('Yes')\n ok_count +=1\n \n else:\n print('No')\n \n elif S[i] == 'b':\n if ok_count < A+B and ok_fcount < B:\n print('Yes')\n ok_count+=1\n ok_fcount+=1\n \n else:\n print('No')\n \n else:\n print('No')", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "if ok_count < A+B:\n print('Yes')\n ok_count +=1\n \n else:\n print('No')\n \n ", "ok_count < A+B", "ok_count", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "ok_count +=1", "ok_count", "1", "print('No')", "print", "'No'", "elif S[i] == 'b':\n if ok_count < A+B and ok_fcount < B:\n print('Yes')\n ok_count+=1\n ok_fcount+=1\n \n else:\n print('No')\n \n ", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "if ok_count < A+B and ok_fcount < B:\n print('Yes')\n ok_count+=1\n ok_fcount+=1\n \n else:\n print('No')\n \n ", "ok_count < A+B and ok_fcount < B", "ok_count < A+B", "ok_count", "A+B", "A", "B", "ok_fcount < B", "ok_fcount", "B", "print('Yes')", "print", "'Yes'", "ok_count+=1", "ok_count", "1", "ok_fcount+=1", "ok_fcount", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "ok_fcount+=1", "1", "ok_fcount", "S = input()", "input()", "S", "ok_count+=1", "1", "ok_count", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "ok_count +=1", "1", "ok_count", "A, B = map(int, input().split())", "map(int, input().split())", "A", "ok_count = 0", "0", "ok_count", "ok_fcount = 0", "0", "ok_fcount", "B = map(int, input().split())", "map(int, input().split())", "B" ]
N, A, B = map(int, input().split()) S = input() ok_count = 0 ok_fcount = 0 for i in range(N): if S[i] == 'a': if ok_count < A+B: print('Yes') ok_count +=1 else: print('No') elif S[i] == 'b': if ok_count < A+B and ok_fcount < B: print('Yes') ok_count+=1 ok_fcount+=1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 41, 28, 13, 4, 13, 4, 13, 13, 4, 17, 0, 13, 13, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 28, 13, 13, 4, 13, 13, 10, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 127, 2 ], [ 127, 11 ], [ 127, 12 ], [ 124, 14 ], [ 136, 18 ], [ 133, 21 ], [ 26, 25 ], [ 125, 30 ], [ 112, 34 ], [ 38, 37 ], [ 125, 42 ], [ 125, 46 ], [ 37, 47 ], [ 137, 51 ], [ 140, 51 ], [ 131, 51 ], [ 119, 53 ], [ 122, 54 ], [ 130, 56 ], [ 62, 59 ], [ 113, 60 ], [ 37, 61 ], [ 67, 64 ], [ 113, 65 ], [ 37, 66 ], [ 125, 71 ], [ 37, 72 ], [ 137, 77 ], [ 140, 77 ], [ 131, 77 ], [ 119, 79 ], [ 122, 80 ], [ 134, 82 ], [ 116, 82 ], [ 122, 83 ], [ 139, 85 ], [ 115, 88 ], [ 94, 91 ], [ 113, 92 ], [ 37, 93 ], [ 99, 96 ], [ 113, 97 ], [ 37, 98 ], [ 104, 101 ], [ 113, 102 ], [ 37, 103 ], [ 107, 106 ], [ 113, 106 ], [ 106, 110 ], [ 112, 113 ], [ 115, 116 ], [ 127, 119 ], [ 127, 122 ], [ 124, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ] ]
[ "N,A,B=map(int,input().split())\nS=input()\ntotal=0\nforeign=0\nans=['' for i in range(len(S))]\n\nfor i in range(len(S)):\n if S[i]=='a':\n if total<A+B:\n total+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n elif S[i]=='b':\n if total<A+B and foreign<B:\n total+=1\n foreign+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n else:\n ans[i]='No'\n\nfor anss in ans:\n print(anss)", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input()", "S", "input()", "input", "total=0", "total", "0", "foreign=0", "foreign", "0", "'' for i in range(len(S))", "for i in range(len(S))", "i", "range(len(S))", "range", "len(S)", "len", "S", "for i in range(len(S))", "''", "ans=['' for i in range(len(S))]", "ans", "['' for i in range(len(S))]", "for i in range(len(S)):\n if S[i]=='a':\n if total<A+B:\n total+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n elif S[i]=='b':\n if total<A+B and foreign<B:\n total+=1\n foreign+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n else:\n ans[i]='No'", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i]=='a':\n if total<A+B:\n total+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n elif S[i]=='b':\n if total<A+B and foreign<B:\n total+=1\n foreign+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n else:\n ans[i]='No'", "S[i]=='a'", "S[i]", "S", "i", "'a'", "if total<A+B:\n total+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n ", "total<A+B", "total", "A+B", "A", "B", "total+=1", "total", "1", "ans[i]='Yes'", "ans[i]", "ans", "i", "'Yes'", "ans[i]='No'", "ans[i]", "ans", "i", "'No'", "elif S[i]=='b':\n if total<A+B and foreign<B:\n total+=1\n foreign+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n ", "S[i]=='b'", "S[i]", "S", "i", "'b'", "if total<A+B and foreign<B:\n total+=1\n foreign+=1\n ans[i]='Yes'\n else:\n ans[i]='No'\n ", "total<A+B and foreign<B", "total<A+B", "total", "A+B", "A", "B", "foreign<B", "foreign", "B", "total+=1", "total", "1", "foreign+=1", "foreign", "1", "ans[i]='Yes'", "ans[i]", "ans", "i", "'Yes'", "ans[i]='No'", "ans[i]", "ans", "i", "'No'", "ans[i]='No'", "ans[i]", "ans", "i", "'No'", "for anss in ans:\n print(anss)", "anss", "ans", "print(anss)", "print", "anss", "ans=['' for i in range(len(S))]", "['' for i in range(len(S))]", "ans", "foreign+=1", "1", "foreign", "A,B=map(int,input().split())", "map(int,input().split())", "A", "B=map(int,input().split())", "map(int,input().split())", "B", "S=input()", "input()", "S", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "total+=1", "1", "total", "foreign=0", "0", "foreign", "total=0", "0", "total", "total+=1", "1", "total" ]
N,A,B=map(int,input().split()) S=input() total=0 foreign=0 ans=['' for i in range(len(S))] for i in range(len(S)): if S[i]=='a': if total<A+B: total+=1 ans[i]='Yes' else: ans[i]='No' elif S[i]=='b': if total<A+B and foreign<B: total+=1 foreign+=1 ans[i]='Yes' else: ans[i]='No' else: ans[i]='No' for anss in ans: print(anss)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 90, 2 ], [ 90, 11 ], [ 90, 12 ], [ 96, 14 ], [ 93, 21 ], [ 102, 24 ], [ 28, 27 ], [ 97, 27 ], [ 27, 31 ], [ 94, 35 ], [ 82, 35 ], [ 88, 35 ], [ 91, 37 ], [ 85, 38 ], [ 87, 40 ], [ 27, 50 ], [ 94, 55 ], [ 82, 55 ], [ 88, 55 ], [ 91, 57 ], [ 85, 58 ], [ 103, 60 ], [ 100, 60 ], [ 85, 61 ], [ 81, 63 ], [ 99, 66 ], [ 90, 79 ], [ 81, 82 ], [ 90, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ] ]
[ "N,A,B=map(int, input().split())\nS=input().strip()\n\ntotal = 0\ntotalB = 0\nfor c in S:\n if c == 'a':\n if total < A + B:\n total += 1\n print('Yes')\n else:\n print('No')\n elif c == 'b':\n if total < A + B and totalB < B:\n total += 1\n totalB += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "N,A,B=map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input().strip()", "S", "input().strip()", "().strip", "()", "input", "strip", "total = 0", "total", "0", "totalB = 0", "totalB", "0", "for c in S:\n if c == 'a':\n if total < A + B:\n total += 1\n print('Yes')\n else:\n print('No')\n elif c == 'b':\n if total < A + B and totalB < B:\n total += 1\n totalB += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "c", "S", "if c == 'a':\n if total < A + B:\n total += 1\n print('Yes')\n else:\n print('No')\n elif c == 'b':\n if total < A + B and totalB < B:\n total += 1\n totalB += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "c == 'a'", "c", "'a'", "if total < A + B:\n total += 1\n print('Yes')\n else:\n print('No')\n ", "total < A + B", "total", "A + B", "A", "B", "total += 1", "total", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "elif c == 'b':\n if total < A + B and totalB < B:\n total += 1\n totalB += 1\n print('Yes')\n else:\n print('No')\n ", "c == 'b'", "c", "'b'", "if total < A + B and totalB < B:\n total += 1\n totalB += 1\n print('Yes')\n else:\n print('No')\n ", "total < A + B and totalB < B", "total < A + B", "total", "A + B", "A", "B", "totalB < B", "totalB", "B", "total += 1", "total", "1", "totalB += 1", "totalB", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "N,A,B=map(int, input().split())", "map(int, input().split())", "N", "total += 1", "1", "total", "B=map(int, input().split())", "map(int, input().split())", "B", "total += 1", "1", "total", "A,B=map(int, input().split())", "map(int, input().split())", "A", "total = 0", "0", "total", "S=input().strip()", "input().strip()", "S", "totalB += 1", "1", "totalB", "totalB = 0", "0", "totalB" ]
N,A,B=map(int, input().split()) S=input().strip() total = 0 totalB = 0 for c in S: if c == 'a': if total < A + B: total += 1 print('Yes') else: print('No') elif c == 'b': if total < A + B and totalB < B: total += 1 totalB += 1 print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 105, 2 ], [ 105, 11 ], [ 105, 12 ], [ 87, 14 ], [ 90, 18 ], [ 93, 21 ], [ 25, 24 ], [ 88, 29 ], [ 88, 33 ], [ 24, 34 ], [ 91, 39 ], [ 97, 39 ], [ 94, 40 ], [ 100, 40 ], [ 106, 42 ], [ 85, 43 ], [ 96, 48 ], [ 88, 56 ], [ 24, 57 ], [ 91, 63 ], [ 97, 63 ], [ 94, 64 ], [ 100, 64 ], [ 106, 66 ], [ 85, 67 ], [ 94, 69 ], [ 100, 69 ], [ 85, 70 ], [ 99, 75 ], [ 105, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 105, 103 ], [ 105, 106 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\nA = 0\nB = 0\nfor i in range(len(s)):\n if s[i] == \"a\":\n if A + B < a + b:\n print(\"Yes\")\n A += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if A + B < a + b and B < b:\n print(\"Yes\")\n B += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "A = 0", "A", "0", "B = 0", "B", "0", "for i in range(len(s)):\n if s[i] == \"a\":\n if A + B < a + b:\n print(\"Yes\")\n A += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if A + B < a + b and B < b:\n print(\"Yes\")\n B += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == \"a\":\n if A + B < a + b:\n print(\"Yes\")\n A += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if A + B < a + b and B < b:\n print(\"Yes\")\n B += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "if A + B < a + b:\n print(\"Yes\")\n A += 1\n else:\n print(\"No\")\n ", "A + B < a + b", "A + B", "A", "B", "a + b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "A += 1", "A", "1", "print(\"No\")", "print", "\"No\"", "elif s[i] == \"b\":\n if A + B < a + b and B < b:\n print(\"Yes\")\n B += 1\n else:\n print(\"No\")\n ", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "if A + B < a + b and B < b:\n print(\"Yes\")\n B += 1\n else:\n print(\"No\")\n ", "A + B < a + b and B < b", "A + B < a + b", "A + B", "A", "B", "a + b", "a", "b", "B < b", "B", "b", "print(\"Yes\")", "print", "\"Yes\"", "B += 1", "B", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "b = map(int, input().split())", "map(int, input().split())", "b", "s = input()", "input()", "s", "A = 0", "0", "A", "B = 0", "0", "B", "A += 1", "1", "A", "B += 1", "1", "B", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "a, b = map(int, input().split())", "map(int, input().split())", "a" ]
n, a, b = map(int, input().split()) s = input() A = 0 B = 0 for i in range(len(s)): if s[i] == "a": if A + B < a + b: print("Yes") A += 1 else: print("No") elif s[i] == "b": if A + B < a + b and B < b: print("Yes") B += 1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 39, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 40, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 40, 13, 13, 14, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 39, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13 ]
[ [ 99, 2 ], [ 99, 11 ], [ 99, 12 ], [ 90, 14 ], [ 111, 20 ], [ 94, 22 ], [ 100, 23 ], [ 102, 25 ], [ 96, 28 ], [ 87, 31 ], [ 35, 34 ], [ 91, 34 ], [ 34, 38 ], [ 97, 42 ], [ 109, 42 ], [ 106, 42 ], [ 112, 43 ], [ 105, 48 ], [ 34, 55 ], [ 97, 59 ], [ 109, 59 ], [ 106, 59 ], [ 112, 60 ], [ 88, 63 ], [ 115, 63 ], [ 100, 64 ], [ 108, 69 ], [ 114, 72 ], [ 99, 85 ], [ 87, 88 ], [ 90, 91 ], [ 99, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ] ]
[ "n, a, b = map(int, input().split())\nst = str(input())\nbor = a + b\n\nans = []\n\npa = 1\nfore = 1\n\nfor i in st:\n if i == 'a':\n if pa <= bor:\n print('Yes')\n pa += 1\n else:\n print('No')\n elif i == 'b':\n if pa <= bor:\n if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n else:\n print('No')\n else:\n print('No')\n", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "st = str(input())", "st", "str(input())", "str", "input()", "input", "bor = a + b", "bor", "a + b", "a", "b", "ans = []", "ans", "[]", "pa = 1", "pa", "1", "fore = 1", "fore", "1", "for i in st:\n if i == 'a':\n if pa <= bor:\n print('Yes')\n pa += 1\n else:\n print('No')\n elif i == 'b':\n if pa <= bor:\n if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n else:\n print('No')\n else:\n print('No')", "i", "st", "if i == 'a':\n if pa <= bor:\n print('Yes')\n pa += 1\n else:\n print('No')\n elif i == 'b':\n if pa <= bor:\n if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n else:\n print('No')\n else:\n print('No')", "i == 'a'", "i", "'a'", "if pa <= bor:\n print('Yes')\n pa += 1\n else:\n print('No')\n ", "pa <= bor", "pa", "bor", "print('Yes')", "print", "'Yes'", "pa += 1", "pa", "1", "print('No')", "print", "'No'", "elif i == 'b':\n if pa <= bor:\n if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n else:\n print('No')\n ", "i == 'b'", "i", "'b'", "if pa <= bor:\n if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n else:\n print('No')\n ", "pa <= bor", "pa", "bor", "if fore <= b:\n print('Yes')\n pa += 1\n fore +=1\n else:\n print('No')\n ", "fore <= b", "fore", "b", "print('Yes')", "print", "'Yes'", "pa += 1", "pa", "1", "fore +=1", "fore", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "fore = 1", "1", "fore", "st = str(input())", "str(input())", "st", "a, b = map(int, input().split())", "map(int, input().split())", "a", "pa = 1", "1", "pa", "b = map(int, input().split())", "map(int, input().split())", "b", "ans = []", "[]", "ans", "pa += 1", "1", "pa", "pa += 1", "1", "pa", "bor = a + b", "a + b", "bor", "fore +=1", "1", "fore" ]
n, a, b = map(int, input().split()) st = str(input()) bor = a + b ans = [] pa = 1 fore = 1 for i in st: if i == 'a': if pa <= bor: print('Yes') pa += 1 else: print('No') elif i == 'b': if pa <= bor: if fore <= b: print('Yes') pa += 1 fore +=1 else: print('No') else: print('No') else: print('No')
[ 7, 15, 13, 12, 13, 15, 13, 0, 13, 18, 18, 13, 13, 13, 41, 28, 13, 4, 18, 4, 18, 4, 13, 13, 13, 17, 4, 4, 13, 13, 0, 13, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 9, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 9, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 9, 8 ], [ 17, 16 ], [ 8, 22 ], [ 16, 29 ], [ 32, 31 ], [ 35, 34 ], [ 8, 38 ], [ 42, 41 ], [ 31, 43 ], [ 47, 46 ], [ 31, 48 ], [ 52, 51 ], [ 31, 53 ], [ 57, 56 ], [ 60, 59 ], [ 63, 62 ], [ 34, 62 ], [ 62, 66 ], [ 59, 71 ], [ 103, 71 ], [ 56, 72 ], [ 80, 72 ], [ 46, 74 ], [ 51, 75 ], [ 81, 80 ], [ 62, 85 ], [ 59, 91 ], [ 103, 91 ], [ 56, 92 ], [ 80, 92 ], [ 46, 94 ], [ 51, 95 ], [ 59, 97 ], [ 103, 97 ], [ 51, 98 ], [ 104, 103 ], [ 117, 114 ] ]
[ "import math\n\n\ndef resolve():\n import sys\n input = sys.stdin.readline\n row1 = [int(x) for x in input().rstrip().split(\" \")]\n # row2 = [int(x) for x in input().rstrip().split(\" \")]\n s = input().rstrip()\n\n n = row1[0]\n a = row1[1]\n b = row1[2]\n\n kokunai = 0\n kaigai = 0\n for char in s:\n if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n print(\"No\")\n\n\n\n\n\n\n\n\nif __name__ == \"__main__\":\n resolve()", "import math", "math", "def resolve():\n import sys\n input = sys.stdin.readline\n row1 = [int(x) for x in input().rstrip().split(\" \")]\n # row2 = [int(x) for x in input().rstrip().split(\" \")]\n s = input().rstrip()\n\n n = row1[0]\n a = row1[1]\n b = row1[2]\n\n kokunai = 0\n kaigai = 0\n for char in s:\n if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n print(\"No\")", "resolve", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "int(x) for x in input().rstrip().split(\" \")", "for x in input().rstrip().split(\" \")", "x", "input().rstrip().split(\" \")", "().rstrip().split", "().rstrip()", "().rstrip", "()", "input", "rstrip", "split", "\" \"", "for x in input().rstrip().split(\" \")", "int(x)", "int", "x", "row1 = [int(x) for x in input().rstrip().split(\" \")]", "row1", "[int(x) for x in input().rstrip().split(\" \")]", "s = input().rstrip()", "s", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "n = row1[0]", "n", "row1[0]", "row1", "0", "a = row1[1]", "a", "row1[1]", "row1", "1", "b = row1[2]", "b", "row1[2]", "row1", "2", "kokunai = 0", "kokunai", "0", "kaigai = 0", "kaigai", "0", "for char in s:\n if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n print(\"No\")", "char", "s", "if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n ", "char == \"a\"", "char", "\"a\"", "if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n ", "kaigai + kokunai < a + b", "kaigai + kokunai", "kaigai", "kokunai", "a + b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "kokunai += 1", "kokunai", "1", "continue", "elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n ", "char == \"b\"", "char", "\"b\"", "if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n ", "(kaigai + kokunai < a + b) and (kaigai < b)", "kaigai + kokunai < a + b", "kaigai + kokunai", "kaigai", "kokunai", "a + b", "a", "b", "kaigai < b", "kaigai", "b", "print(\"Yes\")", "print", "\"Yes\"", "kaigai += 1", "kaigai", "1", "continue", "print(\"No\")", "print", "\"No\"", "if __name__ == \"__main__\":\n resolve()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "resolve()", "resolve", "def resolve():\n import sys\n input = sys.stdin.readline\n row1 = [int(x) for x in input().rstrip().split(\" \")]\n # row2 = [int(x) for x in input().rstrip().split(\" \")]\n s = input().rstrip()\n\n n = row1[0]\n a = row1[1]\n b = row1[2]\n\n kokunai = 0\n kaigai = 0\n for char in s:\n if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n print(\"No\")", "def resolve():\n import sys\n input = sys.stdin.readline\n row1 = [int(x) for x in input().rstrip().split(\" \")]\n # row2 = [int(x) for x in input().rstrip().split(\" \")]\n s = input().rstrip()\n\n n = row1[0]\n a = row1[1]\n b = row1[2]\n\n kokunai = 0\n kaigai = 0\n for char in s:\n if char == \"a\":\n if(kaigai + kokunai < a + b):\n print(\"Yes\")\n kokunai += 1\n continue\n\n elif char == \"b\":\n if((kaigai + kokunai < a + b) and (kaigai < b)):\n print(\"Yes\")\n kaigai += 1\n continue\n print(\"No\")", "resolve" ]
import math def resolve(): import sys input = sys.stdin.readline row1 = [int(x) for x in input().rstrip().split(" ")] # row2 = [int(x) for x in input().rstrip().split(" ")] s = input().rstrip() n = row1[0] a = row1[1] b = row1[2] kokunai = 0 kaigai = 0 for char in s: if char == "a": if(kaigai + kokunai < a + b): print("Yes") kokunai += 1 continue elif char == "b": if((kaigai + kokunai < a + b) and (kaigai < b)): print("Yes") kaigai += 1 continue print("No") if __name__ == "__main__": resolve()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 17, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 100, 2 ], [ 100, 11 ], [ 100, 12 ], [ 82, 14 ], [ 76, 18 ], [ 85, 21 ], [ 25, 24 ], [ 101, 28 ], [ 83, 33 ], [ 24, 34 ], [ 86, 37 ], [ 92, 37 ], [ 89, 37 ], [ 95, 39 ], [ 98, 40 ], [ 88, 45 ], [ 83, 52 ], [ 24, 53 ], [ 86, 56 ], [ 92, 56 ], [ 89, 56 ], [ 95, 58 ], [ 98, 59 ], [ 77, 61 ], [ 80, 61 ], [ 98, 62 ], [ 91, 67 ], [ 79, 70 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 100, 95 ], [ 100, 98 ], [ 100, 101 ] ]
[ "N,h,u=map(int,input().split())\nS = input()\nkaigai=0\ngoukei=0\nfor i in range(0,N):\n if S[i]=='a' and goukei<h+u:\n print(\"Yes\")\n goukei+=1\n elif S[i]=='b'and goukei<h+u and kaigai<u:\n print(\"Yes\")\n goukei+=1\n kaigai+=1\n else:\n print(\"No\")", "N,h,u=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "h", "u", "S = input()", "S", "input()", "input", "kaigai=0", "kaigai", "0", "goukei=0", "goukei", "0", "for i in range(0,N):\n if S[i]=='a' and goukei<h+u:\n print(\"Yes\")\n goukei+=1\n elif S[i]=='b'and goukei<h+u and kaigai<u:\n print(\"Yes\")\n goukei+=1\n kaigai+=1\n else:\n print(\"No\")", "i", "range(0,N)", "range", "0", "N", "if S[i]=='a' and goukei<h+u:\n print(\"Yes\")\n goukei+=1\n elif S[i]=='b'and goukei<h+u and kaigai<u:\n print(\"Yes\")\n goukei+=1\n kaigai+=1\n else:\n print(\"No\")", "S[i]=='a' and goukei<h+u", "S[i]=='a'", "S[i]", "S", "i", "'a'", "goukei<h+u", "goukei", "h+u", "h", "u", "print(\"Yes\")", "print", "\"Yes\"", "goukei+=1", "goukei", "1", "elif S[i]=='b'and goukei<h+u and kaigai<u:\n print(\"Yes\")\n goukei+=1\n kaigai+=1\n ", "S[i]=='b'and goukei<h+u and kaigai<u", "S[i]=='b'and goukei<h+u", "S[i]=='b'", "S[i]", "S", "i", "'b'", "goukei<h+u", "goukei", "h+u", "h", "u", "kaigai<u", "kaigai", "u", "print(\"Yes\")", "print", "\"Yes\"", "goukei+=1", "goukei", "1", "kaigai+=1", "kaigai", "1", "print(\"No\")", "print", "\"No\"", "kaigai=0", "0", "kaigai", "kaigai+=1", "1", "kaigai", "S = input()", "input()", "S", "goukei=0", "0", "goukei", "goukei+=1", "1", "goukei", "goukei+=1", "1", "goukei", "h,u=map(int,input().split())", "map(int,input().split())", "h", "u=map(int,input().split())", "map(int,input().split())", "u", "N,h,u=map(int,input().split())", "map(int,input().split())", "N" ]
N,h,u=map(int,input().split()) S = input() kaigai=0 goukei=0 for i in range(0,N): if S[i]=='a' and goukei<h+u: print("Yes") goukei+=1 elif S[i]=='b'and goukei<h+u and kaigai<u: print("Yes") goukei+=1 kaigai+=1 else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 96, 2 ], [ 96, 11 ], [ 96, 12 ], [ 90, 14 ], [ 93, 20 ], [ 84, 23 ], [ 27, 26 ], [ 91, 26 ], [ 26, 30 ], [ 94, 35 ], [ 100, 35 ], [ 85, 36 ], [ 79, 36 ], [ 88, 38 ], [ 97, 39 ], [ 99, 44 ], [ 26, 51 ], [ 94, 57 ], [ 100, 57 ], [ 85, 58 ], [ 79, 58 ], [ 88, 60 ], [ 97, 61 ], [ 85, 63 ], [ 79, 63 ], [ 97, 64 ], [ 78, 69 ], [ 78, 79 ], [ 96, 82 ], [ 84, 85 ], [ 96, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ] ]
[ "# -*- coding: utf-8 -*-\nn, a, b = map(int, input().split())\ns = list(input())\n\ncnt_a = 0\ncnt_b = 0\n\nfor p in s:\n if p == 'a':\n if (cnt_a+cnt_b) < (a+b):\n print('Yes')\n cnt_a += 1\n else:\n print('No')\n elif p == 'b':\n if (cnt_a+cnt_b) < (a+b) and cnt_b < b:\n print('Yes')\n cnt_b += 1\n else:\n print('No')\n else:\n print('No')", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = list(input())", "s", "list(input())", "list", "input()", "input", "cnt_a = 0", "cnt_a", "0", "cnt_b = 0", "cnt_b", "0", "for p in s:\n if p == 'a':\n if (cnt_a+cnt_b) < (a+b):\n print('Yes')\n cnt_a += 1\n else:\n print('No')\n elif p == 'b':\n if (cnt_a+cnt_b) < (a+b) and cnt_b < b:\n print('Yes')\n cnt_b += 1\n else:\n print('No')\n else:\n print('No')", "p", "s", "if p == 'a':\n if (cnt_a+cnt_b) < (a+b):\n print('Yes')\n cnt_a += 1\n else:\n print('No')\n elif p == 'b':\n if (cnt_a+cnt_b) < (a+b) and cnt_b < b:\n print('Yes')\n cnt_b += 1\n else:\n print('No')\n else:\n print('No')", "p == 'a'", "p", "'a'", "if (cnt_a+cnt_b) < (a+b):\n print('Yes')\n cnt_a += 1\n else:\n print('No')\n ", "(cnt_a+cnt_b) < (a+b)", "cnt_a+cnt_b", "cnt_a", "cnt_b", "a+b", "a", "b", "print('Yes')", "print", "'Yes'", "cnt_a += 1", "cnt_a", "1", "print('No')", "print", "'No'", "elif p == 'b':\n if (cnt_a+cnt_b) < (a+b) and cnt_b < b:\n print('Yes')\n cnt_b += 1\n else:\n print('No')\n ", "p == 'b'", "p", "'b'", "if (cnt_a+cnt_b) < (a+b) and cnt_b < b:\n print('Yes')\n cnt_b += 1\n else:\n print('No')\n ", "(cnt_a+cnt_b) < (a+b) and cnt_b < b", "(cnt_a+cnt_b) < (a+b)", "cnt_a+cnt_b", "cnt_a", "cnt_b", "a+b", "a", "b", "cnt_b < b", "cnt_b", "b", "print('Yes')", "print", "'Yes'", "cnt_b += 1", "cnt_b", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "cnt_b += 1", "1", "cnt_b", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "cnt_b = 0", "0", "cnt_b", "a, b = map(int, input().split())", "map(int, input().split())", "a", "s = list(input())", "list(input())", "s", "cnt_a = 0", "0", "cnt_a", "b = map(int, input().split())", "map(int, input().split())", "b", "cnt_a += 1", "1", "cnt_a" ]
# -*- coding: utf-8 -*- n, a, b = map(int, input().split()) s = list(input()) cnt_a = 0 cnt_b = 0 for p in s: if p == 'a': if (cnt_a+cnt_b) < (a+b): print('Yes') cnt_a += 1 else: print('No') elif p == 'b': if (cnt_a+cnt_b) < (a+b) and cnt_b < b: print('Yes') cnt_b += 1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 13, 2, 13, 13, 14, 2, 13, 17, 4, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 86, 2 ], [ 86, 11 ], [ 86, 12 ], [ 65, 14 ], [ 83, 18 ], [ 71, 21 ], [ 25, 24 ], [ 66, 24 ], [ 84, 29 ], [ 78, 29 ], [ 72, 30 ], [ 75, 30 ], [ 69, 32 ], [ 81, 33 ], [ 24, 36 ], [ 77, 42 ], [ 24, 47 ], [ 72, 50 ], [ 75, 50 ], [ 81, 51 ], [ 74, 56 ], [ 65, 66 ], [ 86, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 86, 81 ], [ 83, 84 ], [ 86, 87 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\n\na_reviewed = 0\nb_reviewed = 0\n\nfor x in s:\n if a_reviewed + b_reviewed < a + b:\n if x == 'a':\n print('Yes')\n a_reviewed += 1\n elif x == 'b' and b_reviewed < b:\n print('Yes')\n b_reviewed += 1\n else:\n print('No')\n else:\n print('No')", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "a_reviewed = 0", "a_reviewed", "0", "b_reviewed = 0", "b_reviewed", "0", "for x in s:\n if a_reviewed + b_reviewed < a + b:\n if x == 'a':\n print('Yes')\n a_reviewed += 1\n elif x == 'b' and b_reviewed < b:\n print('Yes')\n b_reviewed += 1\n else:\n print('No')\n else:\n print('No')", "x", "s", "if a_reviewed + b_reviewed < a + b:\n if x == 'a':\n print('Yes')\n a_reviewed += 1\n elif x == 'b' and b_reviewed < b:\n print('Yes')\n b_reviewed += 1\n else:\n print('No')\n else:\n print('No')", "a_reviewed + b_reviewed < a + b", "a_reviewed + b_reviewed", "a_reviewed", "b_reviewed", "a + b", "a", "b", "if x == 'a':\n print('Yes')\n a_reviewed += 1\n elif x == 'b' and b_reviewed < b:\n print('Yes')\n b_reviewed += 1\n else:\n print('No')\n ", "x == 'a'", "x", "'a'", "print('Yes')", "print", "'Yes'", "a_reviewed += 1", "a_reviewed", "1", "elif x == 'b' and b_reviewed < b:\n print('Yes')\n b_reviewed += 1\n ", "x == 'b' and b_reviewed < b", "x == 'b'", "x", "'b'", "b_reviewed < b", "b_reviewed", "b", "print('Yes')", "print", "'Yes'", "b_reviewed += 1", "b_reviewed", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "s = input()", "input()", "s", "a, b = map(int, input().split())", "map(int, input().split())", "a", "b_reviewed = 0", "0", "b_reviewed", "b_reviewed += 1", "1", "b_reviewed", "a_reviewed += 1", "1", "a_reviewed", "b = map(int, input().split())", "map(int, input().split())", "b", "a_reviewed = 0", "0", "a_reviewed", "n, a, b = map(int, input().split())", "map(int, input().split())", "n" ]
n, a, b = map(int, input().split()) s = input() a_reviewed = 0 b_reviewed = 0 for x in s: if a_reviewed + b_reviewed < a + b: if x == 'a': print('Yes') a_reviewed += 1 elif x == 'b' and b_reviewed < b: print('Yes') b_reviewed += 1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 13, 28, 13, 4, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 17, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 13, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 101, 2 ], [ 101, 11 ], [ 101, 12 ], [ 80, 14 ], [ 98, 20 ], [ 87, 22 ], [ 102, 23 ], [ 83, 25 ], [ 102, 26 ], [ 29, 28 ], [ 81, 33 ], [ 81, 38 ], [ 28, 39 ], [ 99, 42 ], [ 93, 42 ], [ 90, 42 ], [ 89, 48 ], [ 81, 55 ], [ 28, 56 ], [ 99, 59 ], [ 93, 59 ], [ 90, 59 ], [ 84, 62 ], [ 78, 62 ], [ 92, 68 ], [ 77, 71 ], [ 77, 78 ], [ 80, 81 ], [ 102, 83 ], [ 83, 84 ], [ 101, 87 ], [ 89, 90 ], [ 92, 93 ], [ 101, 96 ], [ 98, 99 ], [ 101, 102 ] ]
[ "N, A, B = map(int, input().split())\nS = list(input())\n\ncnt = A + B\nBcnt = B\n\nfor i in range(len(S)):\n if S[i] == 'a' and cnt > 0:\n print('Yes')\n cnt -= 1\n elif S[i] == 'b' and cnt > 0 and Bcnt > 0:\n print('Yes')\n cnt -= 1\n Bcnt -= 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = list(input())", "S", "list(input())", "list", "input()", "input", "cnt = A + B", "cnt", "A + B", "A", "B", "Bcnt = B", "Bcnt", "B", "for i in range(len(S)):\n if S[i] == 'a' and cnt > 0:\n print('Yes')\n cnt -= 1\n elif S[i] == 'b' and cnt > 0 and Bcnt > 0:\n print('Yes')\n cnt -= 1\n Bcnt -= 1\n else:\n print('No')", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i] == 'a' and cnt > 0:\n print('Yes')\n cnt -= 1\n elif S[i] == 'b' and cnt > 0 and Bcnt > 0:\n print('Yes')\n cnt -= 1\n Bcnt -= 1\n else:\n print('No')", "S[i] == 'a' and cnt > 0", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "cnt > 0", "cnt", "0", "print('Yes')", "print", "'Yes'", "cnt -= 1", "cnt", "1", "elif S[i] == 'b' and cnt > 0 and Bcnt > 0:\n print('Yes')\n cnt -= 1\n Bcnt -= 1\n ", "S[i] == 'b' and cnt > 0 and Bcnt > 0", "S[i] == 'b' and cnt > 0", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "cnt > 0", "cnt", "0", "Bcnt > 0", "Bcnt", "0", "print('Yes')", "print", "'Yes'", "cnt -= 1", "cnt", "1", "Bcnt -= 1", "Bcnt", "1", "print('No')", "print", "'No'", "Bcnt -= 1", "1", "Bcnt", "S = list(input())", "list(input())", "S", "Bcnt = B", "B", "Bcnt", "A, B = map(int, input().split())", "map(int, input().split())", "A", "cnt -= 1", "1", "cnt", "cnt -= 1", "1", "cnt", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "cnt = A + B", "A + B", "cnt", "B = map(int, input().split())", "map(int, input().split())", "B" ]
N, A, B = map(int, input().split()) S = list(input()) cnt = A + B Bcnt = B for i in range(len(S)): if S[i] == 'a' and cnt > 0: print('Yes') cnt -= 1 elif S[i] == 'b' and cnt > 0 and Bcnt > 0: print('Yes') cnt -= 1 Bcnt -= 1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 39, 17, 17, 0, 13, 4, 13, 28, 13, 13, 14, 2, 13, 17, 14, 2, 4, 13, 13, 2, 13, 13, 4, 13, 17, 0, 18, 13, 17, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 4, 13, 13, 2, 13, 13, 2, 18, 13, 17, 13, 4, 13, 17, 0, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 39, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 93, 2 ], [ 93, 11 ], [ 93, 12 ], [ 81, 14 ], [ 84, 19 ], [ 24, 23 ], [ 85, 23 ], [ 23, 27 ], [ 82, 33 ], [ 91, 35 ], [ 94, 36 ], [ 44, 41 ], [ 82, 42 ], [ 23, 50 ], [ 82, 57 ], [ 91, 59 ], [ 94, 60 ], [ 82, 63 ], [ 94, 65 ], [ 73, 70 ], [ 82, 71 ], [ 81, 82 ], [ 84, 85 ], [ 93, 88 ], [ 93, 91 ], [ 93, 94 ] ]
[ "N, A, B = map(int, input().split())\nL = [0, 0]\nS = input()\n\nfor i in S:\n if i == \"a\":\n if sum(L) < A + B:\n print(\"Yes\")\n L[0] += 1\n else:\n print(\"No\")\n elif i == \"b\":\n if sum(L) < A + B and L[1] < B:\n print(\"Yes\")\n L[1] += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "L = [0, 0]", "L", "[0, 0]", "0", "0", "S = input()", "S", "input()", "input", "for i in S:\n if i == \"a\":\n if sum(L) < A + B:\n print(\"Yes\")\n L[0] += 1\n else:\n print(\"No\")\n elif i == \"b\":\n if sum(L) < A + B and L[1] < B:\n print(\"Yes\")\n L[1] += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "S", "if i == \"a\":\n if sum(L) < A + B:\n print(\"Yes\")\n L[0] += 1\n else:\n print(\"No\")\n elif i == \"b\":\n if sum(L) < A + B and L[1] < B:\n print(\"Yes\")\n L[1] += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i == \"a\"", "i", "\"a\"", "if sum(L) < A + B:\n print(\"Yes\")\n L[0] += 1\n else:\n print(\"No\")\n ", "sum(L) < A + B", "sum(L)", "sum", "L", "A + B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "L[0] += 1", "L[0]", "L", "0", "1", "print(\"No\")", "print", "\"No\"", "elif i == \"b\":\n if sum(L) < A + B and L[1] < B:\n print(\"Yes\")\n L[1] += 1\n else:\n print(\"No\")\n ", "i == \"b\"", "i", "\"b\"", "if sum(L) < A + B and L[1] < B:\n print(\"Yes\")\n L[1] += 1\n else:\n print(\"No\")\n ", "sum(L) < A + B and L[1] < B", "sum(L) < A + B", "sum(L)", "sum", "L", "A + B", "A", "B", "L[1] < B", "L[1]", "L", "1", "B", "print(\"Yes\")", "print", "\"Yes\"", "L[1] += 1", "L[1]", "L", "1", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "L = [0, 0]", "[0, 0]", "L", "S = input()", "input()", "S", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B" ]
N, A, B = map(int, input().split()) L = [0, 0] S = input() for i in S: if i == "a": if sum(L) < A + B: print("Yes") L[0] += 1 else: print("No") elif i == "b": if sum(L) < A + B and L[1] < B: print("Yes") L[1] += 1 else: print("No") else: print("No")
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 4, 13, 17, 29, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 5, 15 ], [ 5, 16 ], [ 19, 18 ], [ 25, 24 ], [ 28, 27 ], [ 31, 30 ], [ 4, 33 ], [ 18, 37 ], [ 30, 38 ], [ 24, 42 ], [ 72, 42 ], [ 47, 42 ], [ 15, 44 ], [ 16, 45 ], [ 48, 47 ], [ 18, 58 ], [ 30, 59 ], [ 47, 64 ], [ 24, 64 ], [ 72, 64 ], [ 15, 66 ], [ 16, 67 ], [ 27, 69 ], [ 75, 69 ], [ 16, 70 ], [ 73, 72 ], [ 76, 75 ], [ 18, 86 ], [ 30, 87 ], [ 97, 94 ] ]
[ "def resolve():\n N, A, B = list(map(int, input().split()))\n S = str(input())\n num = 0\n foreignnum = 1\n for i in range(N):\n if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'c':\n print('No')\n return\nresolve()", "def resolve():\n N, A, B = list(map(int, input().split()))\n S = str(input())\n num = 0\n foreignnum = 1\n for i in range(N):\n if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'c':\n print('No')\n return", "resolve", "N, A, B = list(map(int, input().split()))", "N", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = str(input())", "S", "str(input())", "str", "input()", "input", "num = 0", "num", "0", "foreignnum = 1", "foreignnum", "1", "for i in range(N):\n if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'c':\n print('No')\n ", "i", "range(N)", "range", "N", "if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n ", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n ", "num < A + B", "num", "A + B", "A", "B", "num += 1", "num", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n ", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n ", "(num < A + B) and (foreignnum <= B)", "num < A + B", "num", "A + B", "A", "B", "foreignnum <= B", "foreignnum", "B", "num += 1", "num", "1", "foreignnum += 1", "foreignnum", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "if S[i] == 'c':\n print('No')\n ", "S[i] == 'c'", "S[i]", "S", "i", "'c'", "print('No')", "print", "'No'", "return", "resolve()", "resolve", "def resolve():\n N, A, B = list(map(int, input().split()))\n S = str(input())\n num = 0\n foreignnum = 1\n for i in range(N):\n if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'c':\n print('No')\n return", "def resolve():\n N, A, B = list(map(int, input().split()))\n S = str(input())\n num = 0\n foreignnum = 1\n for i in range(N):\n if S[i] == 'a':\n if (num < A + B):\n num += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'b':\n if (num < A + B) and (foreignnum <= B):\n num += 1\n foreignnum += 1\n print('Yes')\n else:\n print('No')\n\n if S[i] == 'c':\n print('No')\n return", "resolve" ]
def resolve(): N, A, B = list(map(int, input().split())) S = str(input()) num = 0 foreignnum = 1 for i in range(N): if S[i] == 'a': if (num < A + B): num += 1 print('Yes') else: print('No') if S[i] == 'b': if (num < A + B) and (foreignnum <= B): num += 1 foreignnum += 1 print('Yes') else: print('No') if S[i] == 'c': print('No') return resolve()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 92, 2 ], [ 92, 11 ], [ 92, 12 ], [ 98, 14 ], [ 107, 20 ], [ 95, 23 ], [ 27, 26 ], [ 93, 29 ], [ 99, 33 ], [ 26, 34 ], [ 108, 38 ], [ 84, 38 ], [ 105, 38 ], [ 87, 40 ], [ 90, 41 ], [ 104, 46 ], [ 99, 54 ], [ 26, 55 ], [ 108, 60 ], [ 84, 60 ], [ 105, 60 ], [ 87, 62 ], [ 90, 63 ], [ 96, 65 ], [ 102, 65 ], [ 90, 66 ], [ 83, 71 ], [ 101, 74 ], [ 83, 84 ], [ 92, 87 ], [ 92, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ] ]
[ "N,A,B = map(int, input().split())\nS = list(input())\ncnt_all = 0\ncnt_over = 0\nfor i in range(N):\n if S[i] == 'a':\n if cnt_all < A+B:\n print(\"Yes\")\n cnt_all += 1\n else:\n print(\"No\")\n elif S[i] == 'b':\n if cnt_all < A+B and cnt_over < B:\n print(\"Yes\")\n cnt_all += 1\n cnt_over += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "N,A,B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = list(input())", "S", "list(input())", "list", "input()", "input", "cnt_all = 0", "cnt_all", "0", "cnt_over = 0", "cnt_over", "0", "for i in range(N):\n if S[i] == 'a':\n if cnt_all < A+B:\n print(\"Yes\")\n cnt_all += 1\n else:\n print(\"No\")\n elif S[i] == 'b':\n if cnt_all < A+B and cnt_over < B:\n print(\"Yes\")\n cnt_all += 1\n cnt_over += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(N)", "range", "N", "if S[i] == 'a':\n if cnt_all < A+B:\n print(\"Yes\")\n cnt_all += 1\n else:\n print(\"No\")\n elif S[i] == 'b':\n if cnt_all < A+B and cnt_over < B:\n print(\"Yes\")\n cnt_all += 1\n cnt_over += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "if cnt_all < A+B:\n print(\"Yes\")\n cnt_all += 1\n else:\n print(\"No\")\n ", "cnt_all < A+B", "cnt_all", "A+B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "cnt_all += 1", "cnt_all", "1", "print(\"No\")", "print", "\"No\"", "elif S[i] == 'b':\n if cnt_all < A+B and cnt_over < B:\n print(\"Yes\")\n cnt_all += 1\n cnt_over += 1\n else:\n print(\"No\")\n ", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "if cnt_all < A+B and cnt_over < B:\n print(\"Yes\")\n cnt_all += 1\n cnt_over += 1\n else:\n print(\"No\")\n ", "cnt_all < A+B and cnt_over < B", "cnt_all < A+B", "cnt_all", "A+B", "A", "B", "cnt_over < B", "cnt_over", "B", "print(\"Yes\")", "print", "\"Yes\"", "cnt_all += 1", "cnt_all", "1", "cnt_over += 1", "cnt_over", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "cnt_all += 1", "1", "cnt_all", "A,B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "N,A,B = map(int, input().split())", "map(int, input().split())", "N", "cnt_over = 0", "0", "cnt_over", "S = list(input())", "list(input())", "S", "cnt_over += 1", "1", "cnt_over", "cnt_all += 1", "1", "cnt_all", "cnt_all = 0", "0", "cnt_all" ]
N,A,B = map(int, input().split()) S = list(input()) cnt_all = 0 cnt_over = 0 for i in range(N): if S[i] == 'a': if cnt_all < A+B: print("Yes") cnt_all += 1 else: print("No") elif S[i] == 'b': if cnt_all < A+B and cnt_over < B: print("Yes") cnt_all += 1 cnt_over += 1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 82, 2 ], [ 82, 11 ], [ 82, 12 ], [ 88, 14 ], [ 85, 18 ], [ 85, 21 ], [ 25, 24 ], [ 89, 24 ], [ 24, 29 ], [ 71, 33 ], [ 92, 33 ], [ 86, 34 ], [ 80, 34 ], [ 74, 36 ], [ 77, 37 ], [ 91, 39 ], [ 24, 48 ], [ 71, 52 ], [ 92, 52 ], [ 86, 53 ], [ 80, 53 ], [ 74, 55 ], [ 77, 56 ], [ 86, 58 ], [ 80, 58 ], [ 77, 59 ], [ 79, 61 ], [ 85, 71 ], [ 82, 74 ], [ 82, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ] ]
[ "N,A,B=map(int,input().split())\nS=input()\na=b=0\nfor s in S:\n if s==\"a\" and a+b<A+B:\n a+=1\n print(\"Yes\")\n elif s==\"b\" and a+b<A+B and b<B:\n b+=1\n print(\"Yes\")\n else:\n print(\"No\")", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input()", "S", "input()", "input", "a=b=0", "a", "0", "=b=0", "b", "0", "for s in S:\n if s==\"a\" and a+b<A+B:\n a+=1\n print(\"Yes\")\n elif s==\"b\" and a+b<A+B and b<B:\n b+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s", "S", "if s==\"a\" and a+b<A+B:\n a+=1\n print(\"Yes\")\n elif s==\"b\" and a+b<A+B and b<B:\n b+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s==\"a\" and a+b<A+B", "s==\"a\"", "s", "\"a\"", "a+b<A+B", "a+b", "a", "b", "A+B", "A", "B", "a+=1", "a", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s==\"b\" and a+b<A+B and b<B:\n b+=1\n print(\"Yes\")\n ", "s==\"b\" and a+b<A+B and b<B", "s==\"b\" and a+b<A+B", "s==\"b\"", "s", "\"b\"", "a+b<A+B", "a+b", "a", "b", "A+B", "A", "B", "b<B", "b", "B", "b+=1", "b", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "a=b=0", "0", "a", "A,B=map(int,input().split())", "map(int,input().split())", "A", "B=map(int,input().split())", "map(int,input().split())", "B", "b+=1", "1", "b", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "b=0", "0", "b", "S=input()", "input()", "S", "a+=1", "1", "a" ]
N,A,B=map(int,input().split()) S=input() a=b=0 for s in S: if s=="a" and a+b<A+B: a+=1 print("Yes") elif s=="b" and a+b<A+B and b<B: b+=1 print("Yes") else: print("No")
[ 7, 15, 13, 12, 13, 29, 4, 18, 4, 18, 18, 13, 13, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 29, 13, 12, 13, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 109, 21 ], [ 27, 26 ], [ 109, 30 ], [ 26, 35 ], [ 42, 41 ], [ 112, 43 ], [ 42, 44 ], [ 42, 45 ], [ 48, 47 ], [ 109, 49 ], [ 52, 51 ], [ 55, 54 ], [ 58, 57 ], [ 47, 57 ], [ 57, 62 ], [ 51, 65 ], [ 93, 65 ], [ 70, 65 ], [ 44, 67 ], [ 45, 68 ], [ 71, 70 ], [ 57, 79 ], [ 51, 82 ], [ 93, 82 ], [ 70, 82 ], [ 44, 84 ], [ 45, 85 ], [ 54, 87 ], [ 90, 87 ], [ 45, 88 ], [ 91, 90 ], [ 94, 93 ], [ 118, 106 ] ]
[ "import sys\n# sys.setrecursionlimit(100000)\n\n\ndef input():\n return sys.stdin.readline().strip()\n\n\ndef input_int():\n return int(input())\n\n\ndef input_int_list():\n return [int(i) for i in input().split()]\n\n\ndef main():\n n, a, b = input_int_list()\n S = input()\n passed = 0\n oversea = 0\n for s in S:\n if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n\nif __name__ == \"__main__\":\n main()", "import sys", "sys", "def input():\n return sys.stdin.readline().strip()", "input", "return sys.stdin.readline().strip()", "sys.stdin.readline().strip()", "sys.stdin.readline().strip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "strip", "def input_int():\n return int(input())", "input_int", "return int(input())", "int(input())", "int", "input()", "input", "def input_int_list():\n return [int(i) for i in input().split()]", "input_int_list", "int(i) for i in input().split()", "for i in input().split()", "i", "input().split()", "().split", "()", "input", "split", "for i in input().split()", "int(i)", "int", "i", "return [int(i) for i in input().split()]", "[int(i) for i in input().split()]", "def main():\n n, a, b = input_int_list()\n S = input()\n passed = 0\n oversea = 0\n for s in S:\n if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")", "main", "n, a, b = input_int_list()", "n", "input_int_list()", "input_int_list", "a", "b", "S = input()", "S", "input()", "input", "passed = 0", "passed", "0", "oversea = 0", "oversea", "0", "for s in S:\n if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")", "s", "S", "if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")", "s == \"a\" and passed < a + b", "s == \"a\"", "s", "\"a\"", "passed < a + b", "passed", "a + b", "a", "b", "passed += 1", "passed", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n ", "s == \"b\" and passed < a + b and oversea < b", "s == \"b\" and passed < a + b", "s == \"b\"", "s", "\"b\"", "passed < a + b", "passed", "a + b", "a", "b", "oversea < b", "oversea", "b", "oversea += 1", "oversea", "1", "passed += 1", "passed", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if __name__ == \"__main__\":\n main()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "main()", "main", "def input():\n return sys.stdin.readline().strip()", "def input():\n return sys.stdin.readline().strip()", "input", "def input_int_list():\n return [int(i) for i in input().split()]", "def input_int_list():\n return [int(i) for i in input().split()]", "input_int_list", "def input_int():\n return int(input())", "def input_int():\n return int(input())", "input_int", "def main():\n n, a, b = input_int_list()\n S = input()\n passed = 0\n oversea = 0\n for s in S:\n if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")", "def main():\n n, a, b = input_int_list()\n S = input()\n passed = 0\n oversea = 0\n for s in S:\n if s == \"a\" and passed < a + b:\n passed += 1\n print(\"Yes\")\n elif s == \"b\" and passed < a + b and oversea < b:\n oversea += 1\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")", "main" ]
import sys # sys.setrecursionlimit(100000) def input(): return sys.stdin.readline().strip() def input_int(): return int(input()) def input_int_list(): return [int(i) for i in input().split()] def main(): n, a, b = input_int_list() S = input() passed = 0 oversea = 0 for s in S: if s == "a" and passed < a + b: passed += 1 print("Yes") elif s == "b" and passed < a + b and oversea < b: oversea += 1 passed += 1 print("Yes") else: print("No") if __name__ == "__main__": main()
[ 7, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 5, 13 ], [ 5, 14 ], [ 17, 16 ], [ 21, 20 ], [ 23, 22 ], [ 26, 25 ], [ 16, 30 ], [ 16, 34 ], [ 25, 35 ], [ 22, 39 ], [ 72, 39 ], [ 47, 39 ], [ 13, 41 ], [ 14, 42 ], [ 48, 47 ], [ 16, 55 ], [ 25, 56 ], [ 22, 61 ], [ 72, 61 ], [ 47, 61 ], [ 13, 63 ], [ 14, 64 ], [ 20, 66 ], [ 75, 66 ], [ 14, 67 ], [ 73, 72 ], [ 76, 75 ], [ 91, 88 ] ]
[ "def main():\n n, a, b = map(int, input().split())\n s = input()\n foreign, passed = 0, 0\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")\n\n\nif __name__ == \"__main__\":\n main()", "def main():\n n, a, b = map(int, input().split())\n s = input()\n foreign, passed = 0, 0\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "main", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "foreign, passed = 0, 0", "foreign", "0", "passed", "0", "for i in range(len(s)):\n if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n ", "passed < a + b", "passed", "a + b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "print(\"No\")", "print", "\"No\"", "elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n ", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n ", "passed < a + b and foreign < b", "passed < a + b", "passed", "a + b", "a", "b", "foreign < b", "foreign", "b", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "foreign += 1", "foreign", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "if __name__ == \"__main__\":\n main()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "main()", "main", "def main():\n n, a, b = map(int, input().split())\n s = input()\n foreign, passed = 0, 0\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "def main():\n n, a, b = map(int, input().split())\n s = input()\n foreign, passed = 0, 0\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif s[i] == \"b\":\n if passed < a + b and foreign < b:\n print(\"Yes\")\n passed += 1\n foreign += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "main" ]
def main(): n, a, b = map(int, input().split()) s = input() foreign, passed = 0, 0 for i in range(len(s)): if s[i] == "a": if passed < a + b: print("Yes") passed += 1 else: print("No") elif s[i] == "b": if passed < a + b and foreign < b: print("Yes") passed += 1 foreign += 1 else: print("No") else: print("No") if __name__ == "__main__": main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 13, 17, 9, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 100, 2 ], [ 100, 11 ], [ 100, 12 ], [ 97, 14 ], [ 103, 18 ], [ 91, 21 ], [ 25, 24 ], [ 83, 27 ], [ 98, 31 ], [ 24, 32 ], [ 98, 41 ], [ 24, 42 ], [ 92, 47 ], [ 107, 47 ], [ 95, 48 ], [ 104, 50 ], [ 89, 50 ], [ 86, 50 ], [ 101, 52 ], [ 95, 53 ], [ 85, 58 ], [ 106, 61 ], [ 104, 68 ], [ 89, 68 ], [ 86, 68 ], [ 101, 70 ], [ 95, 71 ], [ 88, 76 ], [ 100, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 100, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\nans=0\ncount=0\nfor i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n continue\n elif s[i]==\"b\":\n if count<b and ans<a+b:\n print(\"Yes\")\n ans+=1\n count+=1\n else:\n print(\"No\")\n else:\n if ans<a+b:\n print(\"Yes\")\n ans+=1\n else:\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "ans=0", "ans", "0", "count=0", "count", "0", "for i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n continue\n elif s[i]==\"b\":\n if count<b and ans<a+b:\n print(\"Yes\")\n ans+=1\n count+=1\n else:\n print(\"No\")\n else:\n if ans<a+b:\n print(\"Yes\")\n ans+=1\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"c\":\n print(\"No\")\n continue\n elif s[i]==\"b\":\n if count<b and ans<a+b:\n print(\"Yes\")\n ans+=1\n count+=1\n else:\n print(\"No\")\n else:\n if ans<a+b:\n print(\"Yes\")\n ans+=1\n else:\n print(\"No\")", "s[i]==\"c\"", "s[i]", "s", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "continue", "elif s[i]==\"b\":\n if count<b and ans<a+b:\n print(\"Yes\")\n ans+=1\n count+=1\n else:\n print(\"No\")\n ", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "if count<b and ans<a+b:\n print(\"Yes\")\n ans+=1\n count+=1\n else:\n print(\"No\")\n ", "count<b and ans<a+b", "count<b", "count", "b", "ans<a+b", "ans", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "ans+=1", "ans", "1", "count+=1", "count", "1", "print(\"No\")", "print", "\"No\"", "if ans<a+b:\n print(\"Yes\")\n ans+=1\n else:\n print(\"No\")", "ans<a+b", "ans", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "ans+=1", "ans", "1", "print(\"No\")", "print", "\"No\"", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "ans+=1", "1", "ans", "ans+=1", "1", "ans", "count=0", "0", "count", "b=map(int,input().split())", "map(int,input().split())", "b", "s=input()", "input()", "s", "a,b=map(int,input().split())", "map(int,input().split())", "a", "ans=0", "0", "ans", "count+=1", "1", "count" ]
n,a,b=map(int,input().split()) s=input() ans=0 count=0 for i in range(n): if s[i]=="c": print("No") continue elif s[i]=="b": if count<b and ans<a+b: print("Yes") ans+=1 count+=1 else: print("No") else: if ans<a+b: print("Yes") ans+=1 else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 108, 2 ], [ 108, 13 ], [ 108, 14 ], [ 90, 16 ], [ 84, 20 ], [ 103, 22 ], [ 109, 23 ], [ 111, 25 ], [ 96, 28 ], [ 32, 31 ], [ 100, 34 ], [ 91, 38 ], [ 31, 39 ], [ 112, 43 ], [ 106, 43 ], [ 88, 43 ], [ 85, 44 ], [ 87, 46 ], [ 91, 57 ], [ 31, 58 ], [ 112, 63 ], [ 106, 63 ], [ 88, 63 ], [ 85, 64 ], [ 97, 66 ], [ 94, 66 ], [ 109, 67 ], [ 105, 69 ], [ 93, 72 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 108, 100 ], [ 108, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "n,a,b=list(map(int,input().split()))\ns=input()\nab=a+b\ntotal=0\nforeigner=0\nfor i in range(n):\n if s[i]=='a':\n if total < ab:\n total+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]=='b':\n if total < ab and foreigner < b:\n total+=1\n foreigner+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n,a,b=list(map(int,input().split()))", "n", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "ab=a+b", "ab", "a+b", "a", "b", "total=0", "total", "0", "foreigner=0", "foreigner", "0", "for i in range(n):\n if s[i]=='a':\n if total < ab:\n total+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]=='b':\n if total < ab and foreigner < b:\n total+=1\n foreigner+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]=='a':\n if total < ab:\n total+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]=='b':\n if total < ab and foreigner < b:\n total+=1\n foreigner+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "s[i]=='a'", "s[i]", "s", "i", "'a'", "if total < ab:\n total+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "total < ab", "total", "ab", "total+=1", "total", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif s[i]=='b':\n if total < ab and foreigner < b:\n total+=1\n foreigner+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i]=='b'", "s[i]", "s", "i", "'b'", "if total < ab and foreigner < b:\n total+=1\n foreigner+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "total < ab and foreigner < b", "total < ab", "total", "ab", "foreigner < b", "foreigner", "b", "total+=1", "total", "1", "foreigner+=1", "foreigner", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "ab=a+b", "a+b", "ab", "total+=1", "1", "total", "s=input()", "input()", "s", "foreigner+=1", "1", "foreigner", "foreigner=0", "0", "foreigner", "n,a,b=list(map(int,input().split()))", "list(map(int,input().split()))", "n", "a,b=list(map(int,input().split()))", "list(map(int,input().split()))", "a", "total+=1", "1", "total", "b=list(map(int,input().split()))", "list(map(int,input().split()))", "b", "total=0", "0", "total" ]
n,a,b=list(map(int,input().split())) s=input() ab=a+b total=0 foreigner=0 for i in range(n): if s[i]=='a': if total < ab: total+=1 print("Yes") else: print("No") elif s[i]=='b': if total < ab and foreigner < b: total+=1 foreigner+=1 print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 2, 39, 17, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 4, 13, 18, 13, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 122, 2 ], [ 122, 11 ], [ 122, 12 ], [ 125, 14 ], [ 98, 18 ], [ 126, 24 ], [ 110, 26 ], [ 113, 29 ], [ 33, 32 ], [ 126, 37 ], [ 126, 41 ], [ 32, 42 ], [ 111, 46 ], [ 102, 46 ], [ 117, 46 ], [ 105, 48 ], [ 108, 49 ], [ 54, 51 ], [ 99, 52 ], [ 32, 53 ], [ 116, 56 ], [ 126, 61 ], [ 32, 62 ], [ 111, 67 ], [ 102, 67 ], [ 117, 67 ], [ 105, 69 ], [ 108, 70 ], [ 114, 72 ], [ 120, 72 ], [ 108, 73 ], [ 78, 75 ], [ 99, 76 ], [ 32, 77 ], [ 101, 80 ], [ 119, 83 ], [ 87, 86 ], [ 126, 91 ], [ 75, 94 ], [ 51, 94 ], [ 99, 95 ], [ 86, 96 ], [ 98, 99 ], [ 101, 102 ], [ 122, 105 ], [ 122, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\nvec_yn = [\"No\"] * len(S)\npassed = 0\npassed_oversea = 0\nfor i in range(len(S)):\n if S[i]=='a':\n if passed < A+B:\n vec_yn[i] = \"Yes\"\n passed+=1\n else:\n pass\n elif S[i]=='b':\n if passed < A+B and passed_oversea < B:\n vec_yn[i] = \"Yes\"\n passed+=1\n passed_oversea+=1\n else:\n pass\n else:\n pass\n\nfor i in range(len(S)):\n print(vec_yn[i])", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "vec_yn = [\"No\"] * len(S)", "vec_yn", "[\"No\"] * len(S)", "[\"No\"]", "\"No\"", "len(S)", "len", "S", "passed = 0", "passed", "0", "passed_oversea = 0", "passed_oversea", "0", "for i in range(len(S)):\n if S[i]=='a':\n if passed < A+B:\n vec_yn[i] = \"Yes\"\n passed+=1\n else:\n pass\n elif S[i]=='b':\n if passed < A+B and passed_oversea < B:\n vec_yn[i] = \"Yes\"\n passed+=1\n passed_oversea+=1\n else:\n pass\n else:\n pass", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i]=='a':\n if passed < A+B:\n vec_yn[i] = \"Yes\"\n passed+=1\n else:\n pass\n elif S[i]=='b':\n if passed < A+B and passed_oversea < B:\n vec_yn[i] = \"Yes\"\n passed+=1\n passed_oversea+=1\n else:\n pass\n else:\n pass", "S[i]=='a'", "S[i]", "S", "i", "'a'", "if passed < A+B:\n vec_yn[i] = \"Yes\"\n passed+=1\n else:\n pass\n ", "passed < A+B", "passed", "A+B", "A", "B", "vec_yn[i] = \"Yes\"", "vec_yn[i]", "vec_yn", "i", "\"Yes\"", "passed+=1", "passed", "1", "elif S[i]=='b':\n if passed < A+B and passed_oversea < B:\n vec_yn[i] = \"Yes\"\n passed+=1\n passed_oversea+=1\n else:\n pass\n ", "S[i]=='b'", "S[i]", "S", "i", "'b'", "if passed < A+B and passed_oversea < B:\n vec_yn[i] = \"Yes\"\n passed+=1\n passed_oversea+=1\n else:\n pass\n ", "passed < A+B and passed_oversea < B", "passed < A+B", "passed", "A+B", "A", "B", "passed_oversea < B", "passed_oversea", "B", "vec_yn[i] = \"Yes\"", "vec_yn[i]", "vec_yn", "i", "\"Yes\"", "passed+=1", "passed", "1", "passed_oversea+=1", "passed_oversea", "1", "for i in range(len(S)):\n print(vec_yn[i])", "i", "range(len(S))", "range", "len(S)", "len", "S", "print(vec_yn[i])", "print", "vec_yn[i]", "vec_yn", "i", "vec_yn = [\"No\"] * len(S)", "[\"No\"] * len(S)", "vec_yn", "passed+=1", "1", "passed", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "passed = 0", "0", "passed", "passed_oversea = 0", "0", "passed_oversea", "passed+=1", "1", "passed", "passed_oversea+=1", "1", "passed_oversea", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "S = input()", "input()", "S" ]
N, A, B = map(int, input().split()) S = input() vec_yn = ["No"] * len(S) passed = 0 passed_oversea = 0 for i in range(len(S)): if S[i]=='a': if passed < A+B: vec_yn[i] = "Yes" passed+=1 else: pass elif S[i]=='b': if passed < A+B and passed_oversea < B: vec_yn[i] = "Yes" passed+=1 passed_oversea+=1 else: pass else: pass for i in range(len(S)): print(vec_yn[i])
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 17, 13, 17, 0, 13, 4, 13, 28, 13, 4, 13, 13, 14, 2, 13, 2, 13, 13, 4, 13, 17, 14, 2, 18, 13, 13, 17, 4, 13, 17, 9, 14, 2, 18, 13, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 2, 18, 13, 13, 17, 2, 13, 13, 0, 13, 17, 4, 13, 17, 0, 13, 17, 4, 13, 17, 9, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 88, 2 ], [ 88, 11 ], [ 88, 12 ], [ 97, 14 ], [ 91, 16 ], [ 106, 19 ], [ 24, 23 ], [ 86, 26 ], [ 98, 29 ], [ 104, 29 ], [ 95, 29 ], [ 89, 31 ], [ 83, 32 ], [ 107, 39 ], [ 23, 40 ], [ 107, 49 ], [ 23, 50 ], [ 94, 53 ], [ 107, 62 ], [ 23, 63 ], [ 92, 66 ], [ 101, 66 ], [ 83, 67 ], [ 103, 69 ], [ 100, 75 ], [ 88, 83 ], [ 88, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ] ]
[ "n,a,b = map(int,input().split())\npas,foreignpass = 0,0\ns = input()\nfor i in range (n):\n if pas == a+b:\n print(\"No\")\n elif s[i] == \"c\":\n print(\"No\")\n continue\n elif s[i] == \"a\":\n pas += 1\n print(\"Yes\")\n elif s[i] == \"b\" and foreignpass < b:\n pas += 1\n print(\"Yes\")\n foreignpass += 1\n else:\n print(\"No\")\n continue", "n,a,b = map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "pas,foreignpass = 0,0", "pas", "0", "foreignpass", "0", "s = input()", "s", "input()", "input", "for i in range (n):\n if pas == a+b:\n print(\"No\")\n elif s[i] == \"c\":\n print(\"No\")\n continue\n elif s[i] == \"a\":\n pas += 1\n print(\"Yes\")\n elif s[i] == \"b\" and foreignpass < b:\n pas += 1\n print(\"Yes\")\n foreignpass += 1\n else:\n print(\"No\")\n continue", "i", "range (n)", "range", "n", "if pas == a+b:\n print(\"No\")\n elif s[i] == \"c\":\n print(\"No\")\n continue\n elif s[i] == \"a\":\n pas += 1\n print(\"Yes\")\n elif s[i] == \"b\" and foreignpass < b:\n pas += 1\n print(\"Yes\")\n foreignpass += 1\n else:\n print(\"No\")\n continue", "pas == a+b", "pas", "a+b", "a", "b", "print(\"No\")", "print", "\"No\"", "elif s[i] == \"c\":\n print(\"No\")\n continue\n ", "s[i] == \"c\"", "s[i]", "s", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "continue", "elif s[i] == \"a\":\n pas += 1\n print(\"Yes\")\n ", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "pas += 1", "pas", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s[i] == \"b\" and foreignpass < b:\n pas += 1\n print(\"Yes\")\n foreignpass += 1\n ", "s[i] == \"b\" and foreignpass < b", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "foreignpass < b", "foreignpass", "b", "pas += 1", "pas", "1", "print(\"Yes\")", "print", "\"Yes\"", "foreignpass += 1", "foreignpass", "1", "print(\"No\")", "print", "\"No\"", "continue", "b = map(int,input().split())", "map(int,input().split())", "b", "n,a,b = map(int,input().split())", "map(int,input().split())", "n", "a,b = map(int,input().split())", "map(int,input().split())", "a", "foreignpass = 0,0", "0", "foreignpass", "pas += 1", "1", "pas", "pas,foreignpass = 0,0", "0", "pas", "foreignpass += 1", "1", "foreignpass", "pas += 1", "1", "pas", "s = input()", "input()", "s" ]
n,a,b = map(int,input().split()) pas,foreignpass = 0,0 s = input() for i in range (n): if pas == a+b: print("No") elif s[i] == "c": print("No") continue elif s[i] == "a": pas += 1 print("Yes") elif s[i] == "b" and foreignpass < b: pas += 1 print("Yes") foreignpass += 1 else: print("No") continue
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 17, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 2, 13, 13, 2, 13, 17, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 2, 13, 13, 2, 13, 17, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 91, 2 ], [ 91, 12 ], [ 91, 13 ], [ 94, 15 ], [ 70, 19 ], [ 73, 22 ], [ 26, 25 ], [ 95, 25 ], [ 71, 30 ], [ 89, 30 ], [ 77, 30 ], [ 83, 32 ], [ 92, 33 ], [ 25, 35 ], [ 76, 41 ], [ 71, 47 ], [ 89, 47 ], [ 77, 47 ], [ 83, 49 ], [ 92, 50 ], [ 25, 52 ], [ 74, 55 ], [ 86, 55 ], [ 92, 56 ], [ 88, 61 ], [ 85, 64 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 91, 80 ], [ 91, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ] ]
[ "n, a, b = map(int, input().split(' '))\ns = input()\n\npassed_count = 0\npassed_count_foreigner = 0\n\nfor person in s:\n if passed_count < a + b and person == \"a\":\n print(\"Yes\")\n passed_count += 1\n elif passed_count < a + b and person == \"b\" and passed_count_foreigner < b:\n print(\"Yes\")\n passed_count += 1\n passed_count_foreigner += 1\n else:\n print(\"No\")", "n, a, b = map(int, input().split(' '))", "n", "map(int, input().split(' '))", "map", "int", "input().split(' ')", "().split", "()", "input", "split", "' '", "a", "b", "s = input()", "s", "input()", "input", "passed_count = 0", "passed_count", "0", "passed_count_foreigner = 0", "passed_count_foreigner", "0", "for person in s:\n if passed_count < a + b and person == \"a\":\n print(\"Yes\")\n passed_count += 1\n elif passed_count < a + b and person == \"b\" and passed_count_foreigner < b:\n print(\"Yes\")\n passed_count += 1\n passed_count_foreigner += 1\n else:\n print(\"No\")", "person", "s", "if passed_count < a + b and person == \"a\":\n print(\"Yes\")\n passed_count += 1\n elif passed_count < a + b and person == \"b\" and passed_count_foreigner < b:\n print(\"Yes\")\n passed_count += 1\n passed_count_foreigner += 1\n else:\n print(\"No\")", "passed_count < a + b and person == \"a\"", "passed_count < a + b", "passed_count", "a + b", "a", "b", "person == \"a\"", "person", "\"a\"", "print(\"Yes\")", "print", "\"Yes\"", "passed_count += 1", "passed_count", "1", "elif passed_count < a + b and person == \"b\" and passed_count_foreigner < b:\n print(\"Yes\")\n passed_count += 1\n passed_count_foreigner += 1\n ", "passed_count < a + b and person == \"b\" and passed_count_foreigner < b", "passed_count < a + b and person == \"b\"", "passed_count < a + b", "passed_count", "a + b", "a", "b", "person == \"b\"", "person", "\"b\"", "passed_count_foreigner < b", "passed_count_foreigner", "b", "print(\"Yes\")", "print", "\"Yes\"", "passed_count += 1", "passed_count", "1", "passed_count_foreigner += 1", "passed_count_foreigner", "1", "print(\"No\")", "print", "\"No\"", "passed_count = 0", "0", "passed_count", "passed_count_foreigner = 0", "0", "passed_count_foreigner", "passed_count += 1", "1", "passed_count", "n, a, b = map(int, input().split(' '))", "map(int, input().split(' '))", "n", "a, b = map(int, input().split(' '))", "map(int, input().split(' '))", "a", "passed_count_foreigner += 1", "1", "passed_count_foreigner", "passed_count += 1", "1", "passed_count", "b = map(int, input().split(' '))", "map(int, input().split(' '))", "b", "s = input()", "input()", "s" ]
n, a, b = map(int, input().split(' ')) s = input() passed_count = 0 passed_count_foreigner = 0 for person in s: if passed_count < a + b and person == "a": print("Yes") passed_count += 1 elif passed_count < a + b and person == "b" and passed_count_foreigner < b: print("Yes") passed_count += 1 passed_count_foreigner += 1 else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 40, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 40, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 96, 2 ], [ 96, 11 ], [ 96, 12 ], [ 90, 14 ], [ 84, 18 ], [ 99, 21 ], [ 25, 24 ], [ 91, 24 ], [ 24, 28 ], [ 85, 32 ], [ 79, 32 ], [ 88, 32 ], [ 76, 34 ], [ 97, 35 ], [ 87, 40 ], [ 24, 47 ], [ 85, 52 ], [ 79, 52 ], [ 88, 52 ], [ 76, 54 ], [ 97, 55 ], [ 100, 57 ], [ 94, 57 ], [ 97, 58 ], [ 78, 63 ], [ 93, 66 ], [ 96, 76 ], [ 78, 79 ], [ 96, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ] ]
[ "N,A,B=map(int,input().split())\nS=input()\npass_a=1\npass_b=1\nfor x in S:\n if x==\"a\":\n if pass_a<=A+B:\n print(\"Yes\")\n pass_a+=1\n else:\n print(\"No\")\n elif x==\"b\":\n if pass_a<=A+B and pass_b<=B:\n print(\"Yes\")\n pass_a+=1\n pass_b+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input()", "S", "input()", "input", "pass_a=1", "pass_a", "1", "pass_b=1", "pass_b", "1", "for x in S:\n if x==\"a\":\n if pass_a<=A+B:\n print(\"Yes\")\n pass_a+=1\n else:\n print(\"No\")\n elif x==\"b\":\n if pass_a<=A+B and pass_b<=B:\n print(\"Yes\")\n pass_a+=1\n pass_b+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "x", "S", "if x==\"a\":\n if pass_a<=A+B:\n print(\"Yes\")\n pass_a+=1\n else:\n print(\"No\")\n elif x==\"b\":\n if pass_a<=A+B and pass_b<=B:\n print(\"Yes\")\n pass_a+=1\n pass_b+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "x==\"a\"", "x", "\"a\"", "if pass_a<=A+B:\n print(\"Yes\")\n pass_a+=1\n else:\n print(\"No\")\n ", "pass_a<=A+B", "pass_a", "A+B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "pass_a+=1", "pass_a", "1", "print(\"No\")", "print", "\"No\"", "elif x==\"b\":\n if pass_a<=A+B and pass_b<=B:\n print(\"Yes\")\n pass_a+=1\n pass_b+=1\n else:\n print(\"No\")\n ", "x==\"b\"", "x", "\"b\"", "if pass_a<=A+B and pass_b<=B:\n print(\"Yes\")\n pass_a+=1\n pass_b+=1\n else:\n print(\"No\")\n ", "pass_a<=A+B and pass_b<=B", "pass_a<=A+B", "pass_a", "A+B", "A", "B", "pass_b<=B", "pass_b", "B", "print(\"Yes\")", "print", "\"Yes\"", "pass_a+=1", "pass_a", "1", "pass_b+=1", "pass_b", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "A,B=map(int,input().split())", "map(int,input().split())", "A", "pass_a+=1", "1", "pass_a", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "pass_a=1", "1", "pass_a", "pass_a+=1", "1", "pass_a", "S=input()", "input()", "S", "pass_b+=1", "1", "pass_b", "B=map(int,input().split())", "map(int,input().split())", "B", "pass_b=1", "1", "pass_b" ]
N,A,B=map(int,input().split()) S=input() pass_a=1 pass_b=1 for x in S: if x=="a": if pass_a<=A+B: print("Yes") pass_a+=1 else: print("No") elif x=="b": if pass_a<=A+B and pass_b<=B: print("Yes") pass_a+=1 pass_b+=1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 2, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 2, 13, 13, 17, 2, 13, 17, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 71, 2 ], [ 71, 13 ], [ 71, 14 ], [ 65, 16 ], [ 21, 20 ], [ 66, 20 ], [ 20, 25 ], [ 63, 29 ], [ 75, 29 ], [ 72, 30 ], [ 78, 30 ], [ 74, 36 ], [ 20, 42 ], [ 63, 46 ], [ 75, 46 ], [ 72, 47 ], [ 78, 47 ], [ 72, 50 ], [ 78, 50 ], [ 77, 56 ], [ 71, 63 ], [ 65, 66 ], [ 71, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ] ]
[ "n,a,b = list(map(int, input().split()))\ns = input()\n\n\nfor c in s:\n if c == 'a' and (a+b) > 0:\n print(\"Yes\")\n a -= 1\n elif c == 'b' and (a + b) > 0 and b > 0:\n print(\"Yes\")\n b -= 1\n else:\n print(\"No\")", "n,a,b = list(map(int, input().split()))", "n", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "for c in s:\n if c == 'a' and (a+b) > 0:\n print(\"Yes\")\n a -= 1\n elif c == 'b' and (a + b) > 0 and b > 0:\n print(\"Yes\")\n b -= 1\n else:\n print(\"No\")", "c", "s", "if c == 'a' and (a+b) > 0:\n print(\"Yes\")\n a -= 1\n elif c == 'b' and (a + b) > 0 and b > 0:\n print(\"Yes\")\n b -= 1\n else:\n print(\"No\")", "c == 'a' and (a+b) > 0", "c == 'a'", "c", "'a'", "(a+b) > 0", "a+b", "a", "b", "0", "print(\"Yes\")", "print", "\"Yes\"", "a -= 1", "a", "1", "elif c == 'b' and (a + b) > 0 and b > 0:\n print(\"Yes\")\n b -= 1\n ", "c == 'b' and (a + b) > 0 and b > 0", "c == 'b' and (a + b) > 0", "c == 'b'", "c", "'b'", "(a + b) > 0", "a + b", "a", "b", "0", "b > 0", "b", "0", "print(\"Yes\")", "print", "\"Yes\"", "b -= 1", "b", "1", "print(\"No\")", "print", "\"No\"", "a,b = list(map(int, input().split()))", "list(map(int, input().split()))", "a", "s = input()", "input()", "s", "n,a,b = list(map(int, input().split()))", "list(map(int, input().split()))", "n", "b = list(map(int, input().split()))", "list(map(int, input().split()))", "b", "a -= 1", "1", "a", "b -= 1", "1", "b" ]
n,a,b = list(map(int, input().split())) s = input() for c in s: if c == 'a' and (a+b) > 0: print("Yes") a -= 1 elif c == 'b' and (a + b) > 0 and b > 0: print("Yes") b -= 1 else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 40, 13, 2, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 40, 13, 2, 13, 13, 40, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 28, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 122, 2 ], [ 122, 11 ], [ 122, 12 ], [ 116, 14 ], [ 110, 18 ], [ 98, 21 ], [ 101, 24 ], [ 28, 27 ], [ 114, 30 ], [ 117, 35 ], [ 27, 36 ], [ 99, 39 ], [ 105, 39 ], [ 120, 39 ], [ 96, 41 ], [ 123, 42 ], [ 102, 45 ], [ 119, 49 ], [ 117, 54 ], [ 27, 55 ], [ 107, 58 ], [ 99, 63 ], [ 105, 63 ], [ 120, 63 ], [ 96, 65 ], [ 123, 66 ], [ 108, 68 ], [ 111, 68 ], [ 123, 69 ], [ 102, 72 ], [ 104, 76 ], [ 102, 80 ], [ 102, 85 ], [ 90, 89 ], [ 102, 89 ], [ 89, 93 ], [ 122, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 122, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ] ]
[ "n , a, b = map(int, input().split())\ns = input()\nt = 0\ncount = 1\nans = []\nfor i in range(n):\n if s[i] == 'a' and count <= (a+b):\n ans.append('Yes')\n count += 1\n elif s[i] == 'b':\n t += 1\n if count <= (a+b) and t <= b:\n ans.append('Yes')\n count += 1\n else:\n ans.append('No')\n else:\n ans.append('No')\nfor i in ans:\n print(i)", "n , a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "t = 0", "t", "0", "count = 1", "count", "1", "ans = []", "ans", "[]", "for i in range(n):\n if s[i] == 'a' and count <= (a+b):\n ans.append('Yes')\n count += 1\n elif s[i] == 'b':\n t += 1\n if count <= (a+b) and t <= b:\n ans.append('Yes')\n count += 1\n else:\n ans.append('No')\n else:\n ans.append('No')", "i", "range(n)", "range", "n", "if s[i] == 'a' and count <= (a+b):\n ans.append('Yes')\n count += 1\n elif s[i] == 'b':\n t += 1\n if count <= (a+b) and t <= b:\n ans.append('Yes')\n count += 1\n else:\n ans.append('No')\n else:\n ans.append('No')", "s[i] == 'a' and count <= (a+b)", "s[i] == 'a'", "s[i]", "s", "i", "'a'", "count <= (a+b)", "count", "a+b", "a", "b", "ans.append('Yes')", "ans.append", "ans", "append", "'Yes'", "count += 1", "count", "1", "elif s[i] == 'b':\n t += 1\n if count <= (a+b) and t <= b:\n ans.append('Yes')\n count += 1\n else:\n ans.append('No')\n ", "s[i] == 'b'", "s[i]", "s", "i", "'b'", "t += 1", "t", "1", "if count <= (a+b) and t <= b:\n ans.append('Yes')\n count += 1\n else:\n ans.append('No')\n ", "count <= (a+b) and t <= b", "count <= (a+b)", "count", "a+b", "a", "b", "t <= b", "t", "b", "ans.append('Yes')", "ans.append", "ans", "append", "'Yes'", "count += 1", "count", "1", "ans.append('No')", "ans.append", "ans", "append", "'No'", "ans.append('No')", "ans.append", "ans", "append", "'No'", "for i in ans:\n print(i)", "i", "ans", "print(i)", "print", "i", "a, b = map(int, input().split())", "map(int, input().split())", "a", "count = 1", "1", "count", "ans = []", "[]", "ans", "count += 1", "1", "count", "t += 1", "1", "t", "t = 0", "0", "t", "n , a, b = map(int, input().split())", "map(int, input().split())", "n", "s = input()", "input()", "s", "count += 1", "1", "count", "b = map(int, input().split())", "map(int, input().split())", "b" ]
n , a, b = map(int, input().split()) s = input() t = 0 count = 1 ans = [] for i in range(n): if s[i] == 'a' and count <= (a+b): ans.append('Yes') count += 1 elif s[i] == 'b': t += 1 if count <= (a+b) and t <= b: ans.append('Yes') count += 1 else: ans.append('No') else: ans.append('No') for i in ans: print(i)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 17, 13, 13, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 2, 18, 13, 17, 18, 13, 17, 2, 13, 13, 0, 18, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 2, 18, 13, 17, 18, 13, 17, 2, 13, 13, 2, 18, 13, 17, 13, 0, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 21, 13 ]
[ [ 94, 2 ], [ 94, 12 ], [ 94, 13 ], [ 97, 15 ], [ 100, 19 ], [ 29, 28 ], [ 98, 28 ], [ 28, 33 ], [ 101, 38 ], [ 101, 41 ], [ 92, 44 ], [ 89, 45 ], [ 50, 47 ], [ 101, 48 ], [ 28, 58 ], [ 101, 63 ], [ 101, 66 ], [ 92, 69 ], [ 89, 70 ], [ 101, 73 ], [ 89, 75 ], [ 80, 77 ], [ 101, 78 ], [ 94, 89 ], [ 94, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ] ]
[ "N, A, B = map(int,input().split(\" \"))\nS = input()\ncount = {\"a\":0,\"b\":0}\nfor s in S:\n if s == \"a\" and count[\"a\"] + count[\"b\"] < A+B:\n count[\"a\"] += 1\n print(\"Yes\")\n elif s == \"b\" and count[\"a\"] + count[\"b\"] < A+B and count[\"b\"]<B:\n count[\"b\"]+=1\n print(\"Yes\")\n else:\n print(\"No\")", "N, A, B = map(int,input().split(\" \"))", "N", "map(int,input().split(\" \"))", "map", "int", "input().split(\" \")", "().split", "()", "input", "split", "\" \"", "A", "B", "S = input()", "S", "input()", "input", "count = {\"a\":0,\"b\":0}", "count", "{\"a\":0,\"b\":0}", "\"a\"", "\"a\"", "0", "\"b\"", "\"b\"", "0", "for s in S:\n if s == \"a\" and count[\"a\"] + count[\"b\"] < A+B:\n count[\"a\"] += 1\n print(\"Yes\")\n elif s == \"b\" and count[\"a\"] + count[\"b\"] < A+B and count[\"b\"]<B:\n count[\"b\"]+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s", "S", "if s == \"a\" and count[\"a\"] + count[\"b\"] < A+B:\n count[\"a\"] += 1\n print(\"Yes\")\n elif s == \"b\" and count[\"a\"] + count[\"b\"] < A+B and count[\"b\"]<B:\n count[\"b\"]+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s == \"a\" and count[\"a\"] + count[\"b\"] < A+B", "s == \"a\"", "s", "\"a\"", "count[\"a\"] + count[\"b\"] < A+B", "count[\"a\"] + count[\"b\"]", "count[\"a\"]", "count", "\"a\"", "count[\"b\"]", "count", "\"b\"", "A+B", "A", "B", "count[\"a\"] += 1", "count[\"a\"]", "count", "\"a\"", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s == \"b\" and count[\"a\"] + count[\"b\"] < A+B and count[\"b\"]<B:\n count[\"b\"]+=1\n print(\"Yes\")\n ", "s == \"b\" and count[\"a\"] + count[\"b\"] < A+B and count[\"b\"]<B", "s == \"b\" and count[\"a\"] + count[\"b\"] < A+B", "s == \"b\"", "s", "\"b\"", "count[\"a\"] + count[\"b\"] < A+B", "count[\"a\"] + count[\"b\"]", "count[\"a\"]", "count", "\"a\"", "count[\"b\"]", "count", "\"b\"", "A+B", "A", "B", "count[\"b\"]<B", "count[\"b\"]", "count", "\"b\"", "B", "count[\"b\"]+=1", "count[\"b\"]", "count", "\"b\"", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "B = map(int,input().split(\" \"))", "map(int,input().split(\" \"))", "B", "A, B = map(int,input().split(\" \"))", "map(int,input().split(\" \"))", "A", "N, A, B = map(int,input().split(\" \"))", "map(int,input().split(\" \"))", "N", "S = input()", "input()", "S", "count = {\"a\":0,\"b\":0}", "{\"a\":0,\"b\":0}", "count" ]
N, A, B = map(int,input().split(" ")) S = input() count = {"a":0,"b":0} for s in S: if s == "a" and count["a"] + count["b"] < A+B: count["a"] += 1 print("Yes") elif s == "b" and count["a"] + count["b"] < A+B and count["b"]<B: count["b"]+=1 print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 2, 13, 13, 0, 13, 17, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 13, 40, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 28, 13, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 119, 2 ], [ 119, 11 ], [ 119, 12 ], [ 107, 14 ], [ 122, 18 ], [ 104, 21 ], [ 96, 23 ], [ 102, 24 ], [ 98, 26 ], [ 113, 29 ], [ 33, 32 ], [ 108, 32 ], [ 32, 36 ], [ 123, 40 ], [ 117, 40 ], [ 111, 40 ], [ 105, 41 ], [ 114, 44 ], [ 110, 48 ], [ 114, 52 ], [ 32, 57 ], [ 123, 62 ], [ 117, 62 ], [ 111, 62 ], [ 105, 63 ], [ 99, 65 ], [ 126, 65 ], [ 102, 66 ], [ 114, 69 ], [ 116, 73 ], [ 114, 77 ], [ 125, 81 ], [ 114, 85 ], [ 90, 89 ], [ 114, 89 ], [ 89, 93 ], [ 119, 96 ], [ 98, 99 ], [ 119, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\n\npassed = 0\nlimit = a+b\nb_rank = 1\n\nans_list = []\nfor w in s:\n if w == 'a':\n if passed < limit:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n elif w == 'b':\n if passed < limit and b_rank <= b:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n b_rank += 1\n else:\n ans_list.append('No')\n\nfor i in ans_list:\n print(i)", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "passed = 0", "passed", "0", "limit = a+b", "limit", "a+b", "a", "b", "b_rank = 1", "b_rank", "1", "ans_list = []", "ans_list", "[]", "for w in s:\n if w == 'a':\n if passed < limit:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n elif w == 'b':\n if passed < limit and b_rank <= b:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n b_rank += 1\n else:\n ans_list.append('No')", "w", "s", "if w == 'a':\n if passed < limit:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n elif w == 'b':\n if passed < limit and b_rank <= b:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n b_rank += 1\n else:\n ans_list.append('No')", "w == 'a'", "w", "'a'", "if passed < limit:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n ", "passed < limit", "passed", "limit", "ans_list.append('Yes')", "ans_list.append", "ans_list", "append", "'Yes'", "passed += 1", "passed", "1", "ans_list.append('No')", "ans_list.append", "ans_list", "append", "'No'", "elif w == 'b':\n if passed < limit and b_rank <= b:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n b_rank += 1\n ", "w == 'b'", "w", "'b'", "if passed < limit and b_rank <= b:\n ans_list.append('Yes')\n passed += 1\n else:\n ans_list.append('No')\n ", "passed < limit and b_rank <= b", "passed < limit", "passed", "limit", "b_rank <= b", "b_rank", "b", "ans_list.append('Yes')", "ans_list.append", "ans_list", "append", "'Yes'", "passed += 1", "passed", "1", "ans_list.append('No')", "ans_list.append", "ans_list", "append", "'No'", "b_rank += 1", "b_rank", "1", "ans_list.append('No')", "ans_list.append", "ans_list", "append", "'No'", "for i in ans_list:\n print(i)", "i", "ans_list", "print(i)", "print", "i", "a, b = map(int, input().split())", "map(int, input().split())", "a", "b_rank = 1", "1", "b_rank", "b = map(int, input().split())", "map(int, input().split())", "b", "limit = a+b", "a+b", "limit", "s = input()", "input()", "s", "passed += 1", "1", "passed", "ans_list = []", "[]", "ans_list", "passed += 1", "1", "passed", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "passed = 0", "0", "passed", "b_rank += 1", "1", "b_rank" ]
n, a, b = map(int, input().split()) s = input() passed = 0 limit = a+b b_rank = 1 ans_list = [] for w in s: if w == 'a': if passed < limit: ans_list.append('Yes') passed += 1 else: ans_list.append('No') elif w == 'b': if passed < limit and b_rank <= b: ans_list.append('Yes') passed += 1 else: ans_list.append('No') b_rank += 1 else: ans_list.append('No') for i in ans_list: print(i)
[ 7, 15, 41, 28, 13, 4, 18, 4, 18, 4, 18, 13, 13, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 13, 0, 13, 4, 18, 4, 18, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 9, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 9, 14, 2, 13, 17, 4, 13, 17, 10, 17, 13, 10, 13, 13, 10, 13, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 5, 4 ], [ 4, 18 ], [ 115, 20 ], [ 115, 22 ], [ 115, 23 ], [ 106, 25 ], [ 118, 34 ], [ 112, 37 ], [ 41, 40 ], [ 107, 40 ], [ 40, 44 ], [ 119, 48 ], [ 110, 48 ], [ 98, 48 ], [ 116, 50 ], [ 101, 51 ], [ 97, 56 ], [ 40, 64 ], [ 98, 69 ], [ 119, 69 ], [ 110, 69 ], [ 116, 71 ], [ 101, 72 ], [ 113, 74 ], [ 122, 74 ], [ 101, 75 ], [ 109, 80 ], [ 121, 83 ], [ 40, 91 ], [ 97, 98 ], [ 115, 101 ], [ 115, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ] ]
[ "from sys import stdin\nN,A,B = [int(x) for x in stdin.readline().rstrip().split()]\nS = stdin.readline().rstrip()\n#print(N,A,B)\n#print(S)\nn=0 #予選通過者人数\nn_f=0 #海外学生通過者人数\nfor i in S:\n if i == \"a\":\n if n < A+B:\n print(\"Yes\")\n n+=1\n else:\n print(\"No\")\n continue\n \n if i == \"b\":\n if n < A+B and n_f < B:\n print(\"Yes\")\n n+=1\n n_f+=1\n else:\n print(\"No\")\n continue\n \n if i ==\"c\":\n print(\"No\")", "from sys import stdin", "int(x) for x in stdin.readline().rstrip().split()", "for x in stdin.readline().rstrip().split()", "x", "stdin.readline().rstrip().split()", "stdin.readline().rstrip().split", "stdin.readline().rstrip()", "stdin.readline().rstrip", "stdin.readline()", "stdin.readline", "stdin", "readline", "rstrip", "split", "for x in stdin.readline().rstrip().split()", "int(x)", "int", "x", "N,A,B = [int(x) for x in stdin.readline().rstrip().split()]", "N", "[int(x) for x in stdin.readline().rstrip().split()]", "A", "B", "S = stdin.readline().rstrip()", "S", "stdin.readline().rstrip()", "stdin.readline().rstrip", "stdin.readline()", "stdin.readline", "stdin", "readline", "rstrip", "n=0", "n", "0", "n_f=0", "n_f", "0", "for i in S:\n if i == \"a\":\n if n < A+B:\n print(\"Yes\")\n n+=1\n else:\n print(\"No\")\n continue\n \n if i == \"b\":\n if n < A+B and n_f < B:\n print(\"Yes\")\n n+=1\n n_f+=1\n else:\n print(\"No\")\n continue\n \n if i ==\"c\":\n print(\"No\")", "i", "S", "if i == \"a\":\n if n < A+B:\n print(\"Yes\")\n n+=1\n else:\n print(\"No\")\n continue\n \n ", "i == \"a\"", "i", "\"a\"", "if n < A+B:\n print(\"Yes\")\n n+=1\n else:\n print(\"No\")\n ", "n < A+B", "n", "A+B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "n+=1", "n", "1", "print(\"No\")", "print", "\"No\"", "continue", "if i == \"b\":\n if n < A+B and n_f < B:\n print(\"Yes\")\n n+=1\n n_f+=1\n else:\n print(\"No\")\n continue\n \n ", "i == \"b\"", "i", "\"b\"", "if n < A+B and n_f < B:\n print(\"Yes\")\n n+=1\n n_f+=1\n else:\n print(\"No\")\n ", "n < A+B and n_f < B", "n < A+B", "n", "A+B", "A", "B", "n_f < B", "n_f", "B", "print(\"Yes\")", "print", "\"Yes\"", "n+=1", "n", "1", "n_f+=1", "n_f", "1", "print(\"No\")", "print", "\"No\"", "continue", "if i ==\"c\":\n print(\"No\")", "i ==\"c\"", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "n+=1", "1", "n", "B = [int(x) for x in stdin.readline().rstrip().split()]", "[int(x) for x in stdin.readline().rstrip().split()]", "B", "N,A,B = [int(x) for x in stdin.readline().rstrip().split()]", "[int(x) for x in stdin.readline().rstrip().split()]", "N", "S = stdin.readline().rstrip()", "stdin.readline().rstrip()", "S", "n+=1", "1", "n", "n_f=0", "0", "n_f", "A,B = [int(x) for x in stdin.readline().rstrip().split()]", "[int(x) for x in stdin.readline().rstrip().split()]", "A", "n=0", "0", "n", "n_f+=1", "1", "n_f" ]
from sys import stdin N,A,B = [int(x) for x in stdin.readline().rstrip().split()] S = stdin.readline().rstrip() #print(N,A,B) #print(S) n=0 #予選通過者人数 n_f=0 #海外学生通過者人数 for i in S: if i == "a": if n < A+B: print("Yes") n+=1 else: print("No") continue if i == "b": if n < A+B and n_f < B: print("Yes") n+=1 n_f+=1 else: print("No") continue if i =="c": print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 39, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 40, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 28, 13, 4, 13, 13, 4, 13, 18, 13, 13, 10, 4, 13, 10, 39, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 143, 2 ], [ 143, 11 ], [ 143, 12 ], [ 134, 14 ], [ 116, 20 ], [ 140, 23 ], [ 122, 26 ], [ 125, 29 ], [ 33, 32 ], [ 114, 35 ], [ 135, 39 ], [ 32, 40 ], [ 141, 45 ], [ 129, 45 ], [ 123, 46 ], [ 120, 46 ], [ 138, 48 ], [ 144, 49 ], [ 117, 52 ], [ 128, 56 ], [ 117, 60 ], [ 135, 66 ], [ 32, 67 ], [ 141, 73 ], [ 129, 73 ], [ 123, 74 ], [ 120, 74 ], [ 138, 76 ], [ 144, 77 ], [ 126, 79 ], [ 132, 79 ], [ 144, 80 ], [ 117, 83 ], [ 119, 87 ], [ 131, 90 ], [ 117, 94 ], [ 117, 99 ], [ 104, 103 ], [ 114, 106 ], [ 117, 110 ], [ 103, 111 ], [ 143, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ], [ 128, 129 ], [ 131, 132 ], [ 134, 135 ], [ 143, 138 ], [ 140, 141 ], [ 143, 144 ] ]
[ "N,A,B=map(int,input().split())\nS=list(input())\nyesno=[]\na=0\nb=0\nc=1\nfor i in range(N):\n if S[i]=='a':\n if a+b<A+B:\n yesno.append('Yes')\n a+=1\n else:\n yesno.append('No')\n elif S[i]=='b':\n if a+b<A+B and c<=B:\n yesno.append('Yes')\n b+=1\n c+=1\n else:\n yesno.append('No')\n else:\n yesno.append('No')\nfor i in range(N):\n print(yesno[i])", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=list(input())", "S", "list(input())", "list", "input()", "input", "yesno=[]", "yesno", "[]", "a=0", "a", "0", "b=0", "b", "0", "c=1", "c", "1", "for i in range(N):\n if S[i]=='a':\n if a+b<A+B:\n yesno.append('Yes')\n a+=1\n else:\n yesno.append('No')\n elif S[i]=='b':\n if a+b<A+B and c<=B:\n yesno.append('Yes')\n b+=1\n c+=1\n else:\n yesno.append('No')\n else:\n yesno.append('No')", "i", "range(N)", "range", "N", "if S[i]=='a':\n if a+b<A+B:\n yesno.append('Yes')\n a+=1\n else:\n yesno.append('No')\n elif S[i]=='b':\n if a+b<A+B and c<=B:\n yesno.append('Yes')\n b+=1\n c+=1\n else:\n yesno.append('No')\n else:\n yesno.append('No')", "S[i]=='a'", "S[i]", "S", "i", "'a'", "if a+b<A+B:\n yesno.append('Yes')\n a+=1\n else:\n yesno.append('No')\n ", "a+b<A+B", "a+b", "a", "b", "A+B", "A", "B", "yesno.append('Yes')", "yesno.append", "yesno", "append", "'Yes'", "a+=1", "a", "1", "yesno.append('No')", "yesno.append", "yesno", "append", "'No'", "elif S[i]=='b':\n if a+b<A+B and c<=B:\n yesno.append('Yes')\n b+=1\n c+=1\n else:\n yesno.append('No')\n ", "S[i]=='b'", "S[i]", "S", "i", "'b'", "if a+b<A+B and c<=B:\n yesno.append('Yes')\n b+=1\n c+=1\n else:\n yesno.append('No')\n ", "a+b<A+B and c<=B", "a+b<A+B", "a+b", "a", "b", "A+B", "A", "B", "c<=B", "c", "B", "yesno.append('Yes')", "yesno.append", "yesno", "append", "'Yes'", "b+=1", "b", "1", "c+=1", "c", "1", "yesno.append('No')", "yesno.append", "yesno", "append", "'No'", "yesno.append('No')", "yesno.append", "yesno", "append", "'No'", "for i in range(N):\n print(yesno[i])", "i", "range(N)", "range", "N", "print(yesno[i])", "print", "yesno[i]", "yesno", "i", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "yesno=[]", "[]", "yesno", "b+=1", "1", "b", "b=0", "0", "b", "c=1", "1", "c", "a+=1", "1", "a", "c+=1", "1", "c", "S=list(input())", "list(input())", "S", "A,B=map(int,input().split())", "map(int,input().split())", "A", "a=0", "0", "a", "B=map(int,input().split())", "map(int,input().split())", "B" ]
N,A,B=map(int,input().split()) S=list(input()) yesno=[] a=0 b=0 c=1 for i in range(N): if S[i]=='a': if a+b<A+B: yesno.append('Yes') a+=1 else: yesno.append('No') elif S[i]=='b': if a+b<A+B and c<=B: yesno.append('Yes') b+=1 c+=1 else: yesno.append('No') else: yesno.append('No') for i in range(N): print(yesno[i])
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 87, 2 ], [ 87, 11 ], [ 87, 12 ], [ 90, 14 ], [ 93, 18 ], [ 75, 21 ], [ 25, 24 ], [ 91, 24 ], [ 24, 29 ], [ 94, 32 ], [ 82, 32 ], [ 70, 32 ], [ 85, 34 ], [ 88, 35 ], [ 69, 40 ], [ 24, 46 ], [ 94, 49 ], [ 82, 49 ], [ 70, 49 ], [ 85, 51 ], [ 88, 52 ], [ 76, 54 ], [ 73, 54 ], [ 88, 55 ], [ 81, 60 ], [ 72, 63 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 87, 79 ], [ 81, 82 ], [ 87, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "N, A, B = map(int, input().split())\n\nS = input()\n\ntotal = 0\nabroad = 0\n\nfor s in S:\n if s == 'a' and total < (A+B):\n print('Yes')\n total += 1\n elif s == 'b' and total < (A+B) and abroad < B:\n print('Yes')\n total += 1\n abroad += 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "total = 0", "total", "0", "abroad = 0", "abroad", "0", "for s in S:\n if s == 'a' and total < (A+B):\n print('Yes')\n total += 1\n elif s == 'b' and total < (A+B) and abroad < B:\n print('Yes')\n total += 1\n abroad += 1\n else:\n print('No')", "s", "S", "if s == 'a' and total < (A+B):\n print('Yes')\n total += 1\n elif s == 'b' and total < (A+B) and abroad < B:\n print('Yes')\n total += 1\n abroad += 1\n else:\n print('No')", "s == 'a' and total < (A+B)", "s == 'a'", "s", "'a'", "total < (A+B)", "total", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "total += 1", "total", "1", "elif s == 'b' and total < (A+B) and abroad < B:\n print('Yes')\n total += 1\n abroad += 1\n ", "s == 'b' and total < (A+B) and abroad < B", "s == 'b' and total < (A+B)", "s == 'b'", "s", "'b'", "total < (A+B)", "total", "A+B", "A", "B", "abroad < B", "abroad", "B", "print('Yes')", "print", "'Yes'", "total += 1", "total", "1", "abroad += 1", "abroad", "1", "print('No')", "print", "'No'", "total += 1", "1", "total", "abroad += 1", "1", "abroad", "abroad = 0", "0", "abroad", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "total += 1", "1", "total", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "S = input()", "input()", "S", "total = 0", "0", "total" ]
N, A, B = map(int, input().split()) S = input() total = 0 abroad = 0 for s in S: if s == 'a' and total < (A+B): print('Yes') total += 1 elif s == 'b' and total < (A+B) and abroad < B: print('Yes') total += 1 abroad += 1 else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 40, 13, 2, 13, 13, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 0, 13, 17, 14, 2, 13, 17, 14, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 97, 2 ], [ 97, 13 ], [ 97, 14 ], [ 88, 16 ], [ 82, 22 ], [ 85, 25 ], [ 29, 28 ], [ 89, 28 ], [ 83, 32 ], [ 77, 32 ], [ 74, 32 ], [ 80, 34 ], [ 98, 35 ], [ 28, 41 ], [ 73, 47 ], [ 28, 51 ], [ 86, 55 ], [ 95, 55 ], [ 98, 56 ], [ 94, 61 ], [ 76, 64 ], [ 73, 74 ], [ 76, 77 ], [ 97, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 97, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "n,a,b = list(map(int,input().split()))\ns = list(input())\nok = 0\nrank = 1\nfor i in s:\n if ok >= a+b:\n print('No')\n elif i == 'a':\n print('Yes')\n ok += 1\n elif i == 'b':\n if rank <= b:\n print('Yes')\n rank += 1\n ok += 1\n else:\n print('No')\n else:\n print('No')", "n,a,b = list(map(int,input().split()))", "n", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ok = 0", "ok", "0", "rank = 1", "rank", "1", "for i in s:\n if ok >= a+b:\n print('No')\n elif i == 'a':\n print('Yes')\n ok += 1\n elif i == 'b':\n if rank <= b:\n print('Yes')\n rank += 1\n ok += 1\n else:\n print('No')\n else:\n print('No')", "i", "s", "if ok >= a+b:\n print('No')\n elif i == 'a':\n print('Yes')\n ok += 1\n elif i == 'b':\n if rank <= b:\n print('Yes')\n rank += 1\n ok += 1\n else:\n print('No')\n else:\n print('No')", "ok >= a+b", "ok", "a+b", "a", "b", "print('No')", "print", "'No'", "elif i == 'a':\n print('Yes')\n ok += 1\n ", "i == 'a'", "i", "'a'", "print('Yes')", "print", "'Yes'", "ok += 1", "ok", "1", "elif i == 'b':\n if rank <= b:\n print('Yes')\n rank += 1\n ok += 1\n else:\n print('No')\n ", "i == 'b'", "i", "'b'", "if rank <= b:\n print('Yes')\n rank += 1\n ok += 1\n else:\n print('No')\n ", "rank <= b", "rank", "b", "print('Yes')", "print", "'Yes'", "rank += 1", "rank", "1", "ok += 1", "ok", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "ok += 1", "1", "ok", "ok += 1", "1", "ok", "a,b = list(map(int,input().split()))", "list(map(int,input().split()))", "a", "ok = 0", "0", "ok", "rank = 1", "1", "rank", "s = list(input())", "list(input())", "s", "n,a,b = list(map(int,input().split()))", "list(map(int,input().split()))", "n", "rank += 1", "1", "rank", "b = list(map(int,input().split()))", "list(map(int,input().split()))", "b" ]
n,a,b = list(map(int,input().split())) s = list(input()) ok = 0 rank = 1 for i in s: if ok >= a+b: print('No') elif i == 'a': print('Yes') ok += 1 elif i == 'b': if rank <= b: print('Yes') rank += 1 ok += 1 else: print('No') else: print('No')
[ 7, 12, 13, 0, 13, 2, 39, 17, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 2, 13, 13, 2, 13, 13, 0, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 18, 13, 13, 17, 0, 13, 17, 0, 18, 13, 13, 17, 29, 13, 23, 13, 23, 13, 23, 13, 23, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 13, 13, 13, 28, 13, 4, 13, 13, 4, 13, 18, 13, 13, 29, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 76, 8 ], [ 11, 10 ], [ 14, 13 ], [ 17, 16 ], [ 76, 19 ], [ 82, 24 ], [ 16, 25 ], [ 10, 29 ], [ 40, 29 ], [ 13, 30 ], [ 66, 30 ], [ 78, 32 ], [ 80, 33 ], [ 38, 35 ], [ 4, 36 ], [ 16, 37 ], [ 41, 40 ], [ 82, 47 ], [ 16, 48 ], [ 10, 52 ], [ 40, 52 ], [ 13, 53 ], [ 66, 53 ], [ 78, 55 ], [ 80, 56 ], [ 13, 58 ], [ 66, 58 ], [ 80, 59 ], [ 64, 61 ], [ 4, 62 ], [ 16, 63 ], [ 67, 66 ], [ 72, 69 ], [ 4, 70 ], [ 16, 71 ], [ 4, 74 ], [ 76, 76 ], [ 78, 78 ], [ 80, 80 ], [ 82, 82 ], [ 87, 86 ], [ 87, 95 ], [ 87, 96 ], [ 99, 98 ], [ 103, 102 ], [ 131, 104 ], [ 86, 105 ], [ 95, 106 ], [ 96, 107 ], [ 98, 108 ], [ 111, 110 ], [ 86, 113 ], [ 102, 117 ], [ 110, 118 ], [ 128, 125 ] ]
[ "#!/usr/bin/env python3\n\n# from numba import njit\n\n# from collections import Counter\n# from itertools import accumulate\n# import numpy as np\n# from heapq import heappop,heappush\n# from bisect import bisect_left\n\n# @njit\ndef solve(n,a,b,s):\n ans = [\"\"]*n\n japaneseStudents = 0\n foreignStudents = 0\n for i in range(n):\n if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n return ans\n\n\n\ndef main():\n N,A,B = map(int,input().split())\n s = input()\n ans = solve(N,A,B,s)\n for i in range(N):\n print(ans[i])\n return\n\nif __name__ == '__main__':\n main()", "def solve(n,a,b,s):\n ans = [\"\"]*n\n japaneseStudents = 0\n foreignStudents = 0\n for i in range(n):\n if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n return ans", "solve", "ans = [\"\"]*n", "ans", "[\"\"]*n", "[\"\"]", "\"\"", "n", "japaneseStudents = 0", "japaneseStudents", "0", "foreignStudents = 0", "foreignStudents", "0", "for i in range(n):\n if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n ", "i", "range(n)", "range", "n", "if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n ", "s[i] == \"a\" and japaneseStudents + foreignStudents < a+b", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "japaneseStudents + foreignStudents < a+b", "japaneseStudents + foreignStudents", "japaneseStudents", "foreignStudents", "a+b", "a", "b", "ans[i] = \"Yes\"", "ans[i]", "ans", "i", "\"Yes\"", "japaneseStudents += 1", "japaneseStudents", "1", "elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n ", "s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b", "s[i] == \"b\" and japaneseStudents + foreignStudents < a+b", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "japaneseStudents + foreignStudents < a+b", "japaneseStudents + foreignStudents", "japaneseStudents", "foreignStudents", "a+b", "a", "b", "foreignStudents < b", "foreignStudents", "b", "ans[i] = \"Yes\"", "ans[i]", "ans", "i", "\"Yes\"", "foreignStudents += 1", "foreignStudents", "1", "ans[i] = \"No\"", "ans[i]", "ans", "i", "\"No\"", "return ans", "ans", "n", "n", "a", "a", "b", "b", "s", "s", "def main():\n N,A,B = map(int,input().split())\n s = input()\n ans = solve(N,A,B,s)\n for i in range(N):\n print(ans[i])\n return", "main", "N,A,B = map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "s = input()", "s", "input()", "input", "ans = solve(N,A,B,s)", "ans", "solve(N,A,B,s)", "solve", "N", "A", "B", "s", "for i in range(N):\n print(ans[i])\n ", "i", "range(N)", "range", "N", "print(ans[i])", "print", "ans[i]", "ans", "i", "return", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n N,A,B = map(int,input().split())\n s = input()\n ans = solve(N,A,B,s)\n for i in range(N):\n print(ans[i])\n return", "def main():\n N,A,B = map(int,input().split())\n s = input()\n ans = solve(N,A,B,s)\n for i in range(N):\n print(ans[i])\n return", "main", "def solve(n,a,b,s):\n ans = [\"\"]*n\n japaneseStudents = 0\n foreignStudents = 0\n for i in range(n):\n if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n return ans", "def solve(n,a,b,s):\n ans = [\"\"]*n\n japaneseStudents = 0\n foreignStudents = 0\n for i in range(n):\n if s[i] == \"a\" and japaneseStudents + foreignStudents < a+b:\n ans[i] = \"Yes\"\n japaneseStudents += 1\n elif s[i] == \"b\" and japaneseStudents + foreignStudents < a+b and foreignStudents < b:\n ans[i] = \"Yes\"\n foreignStudents += 1\n else:\n ans[i] = \"No\"\n return ans", "solve" ]
#!/usr/bin/env python3 # from numba import njit # from collections import Counter # from itertools import accumulate # import numpy as np # from heapq import heappop,heappush # from bisect import bisect_left # @njit def solve(n,a,b,s): ans = [""]*n japaneseStudents = 0 foreignStudents = 0 for i in range(n): if s[i] == "a" and japaneseStudents + foreignStudents < a+b: ans[i] = "Yes" japaneseStudents += 1 elif s[i] == "b" and japaneseStudents + foreignStudents < a+b and foreignStudents < b: ans[i] = "Yes" foreignStudents += 1 else: ans[i] = "No" return ans def main(): N,A,B = map(int,input().split()) s = input() ans = solve(N,A,B,s) for i in range(N): print(ans[i]) return if __name__ == '__main__': main()
[ 7, 12, 13, 15, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 28, 13, 13, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 9, 8 ], [ 6, 15 ], [ 9, 17 ], [ 9, 18 ], [ 21, 20 ], [ 6, 22 ], [ 25, 24 ], [ 20, 24 ], [ 28, 27 ], [ 24, 31 ], [ 35, 34 ], [ 24, 38 ], [ 17, 42 ], [ 45, 42 ], [ 46, 45 ], [ 18, 49 ], [ 62, 49 ], [ 52, 49 ], [ 53, 52 ], [ 56, 55 ], [ 18, 59 ], [ 62, 59 ], [ 52, 59 ], [ 63, 62 ], [ 66, 65 ], [ 65, 69 ], [ 55, 69 ], [ 34, 69 ], [ 27, 69 ], [ 78, 75 ] ]
[ "def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n n, a, b = map(int, input().split())\n s = input()\n for ch in s:\n ans = 'Yes'\n if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n print(ans)\n\n\nif __name__ == '__main__':\n main()", "def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n n, a, b = map(int, input().split())\n s = input()\n for ch in s:\n ans = 'Yes'\n if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n print(ans)", "main", "import sys", "sys", "def input(): return sys.stdin.readline().rstrip()\n ", "input", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "for ch in s:\n ans = 'Yes'\n if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n print(ans)", "ch", "s", "ans = 'Yes'", "ans", "'Yes'", "if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n ", "ch == 'c'", "ch", "'c'", "ans = 'No'", "ans", "'No'", "elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n ", "ch == 'a'", "ch", "'a'", "if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n ", "a > 0", "a", "0", "a -=1", "a", "1", "elif b > 0:\n b -= 1\n ", "b > 0", "b", "0", "b -= 1", "b", "1", "ans = 'No'", "ans", "'No'", "if b > 0:\n b -= 1\n else:\n ans = 'No'\n ", "b > 0", "b", "0", "b -= 1", "b", "1", "ans = 'No'", "ans", "'No'", "print(ans)", "print", "ans", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n n, a, b = map(int, input().split())\n s = input()\n for ch in s:\n ans = 'Yes'\n if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n print(ans)", "def main():\n import sys\n def input(): return sys.stdin.readline().rstrip()\n n, a, b = map(int, input().split())\n s = input()\n for ch in s:\n ans = 'Yes'\n if ch == 'c':\n ans = 'No'\n elif ch == 'a':\n if a > 0:\n a -=1\n elif b > 0:\n b -= 1\n else:\n ans = 'No'\n else:\n if b > 0:\n b -= 1\n else:\n ans = 'No'\n print(ans)", "main" ]
def main(): import sys def input(): return sys.stdin.readline().rstrip() n, a, b = map(int, input().split()) s = input() for ch in s: ans = 'Yes' if ch == 'c': ans = 'No' elif ch == 'a': if a > 0: a -=1 elif b > 0: b -= 1 else: ans = 'No' else: if b > 0: b -= 1 else: ans = 'No' print(ans) if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 2, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 113, 2 ], [ 113, 11 ], [ 113, 12 ], [ 110, 14 ], [ 86, 18 ], [ 99, 20 ], [ 114, 21 ], [ 89, 23 ], [ 114, 24 ], [ 101, 26 ], [ 104, 29 ], [ 33, 32 ], [ 111, 32 ], [ 32, 36 ], [ 32, 43 ], [ 102, 47 ], [ 108, 47 ], [ 93, 47 ], [ 87, 48 ], [ 92, 53 ], [ 32, 60 ], [ 102, 65 ], [ 108, 65 ], [ 93, 65 ], [ 87, 66 ], [ 105, 68 ], [ 96, 68 ], [ 90, 69 ], [ 107, 74 ], [ 95, 77 ], [ 113, 84 ], [ 86, 87 ], [ 114, 89 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 113, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\nstudent_pass = A + B\nabroad_student_pass = B\npassed_students = 0\npassed_students_abroad = 0\n\n\nfor status in S:\n if status == 'c':\n print('No')\n elif status == 'a':\n if passed_students < student_pass:\n print('Yes')\n passed_students += 1\n else:\n print('No')\n elif status == 'b':\n if passed_students < student_pass and passed_students_abroad < abroad_student_pass:\n print('Yes')\n passed_students += 1\n passed_students_abroad += 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "student_pass = A + B", "student_pass", "A + B", "A", "B", "abroad_student_pass = B", "abroad_student_pass", "B", "passed_students = 0", "passed_students", "0", "passed_students_abroad = 0", "passed_students_abroad", "0", "for status in S:\n if status == 'c':\n print('No')\n elif status == 'a':\n if passed_students < student_pass:\n print('Yes')\n passed_students += 1\n else:\n print('No')\n elif status == 'b':\n if passed_students < student_pass and passed_students_abroad < abroad_student_pass:\n print('Yes')\n passed_students += 1\n passed_students_abroad += 1\n else:\n print('No')", "status", "S", "if status == 'c':\n print('No')\n elif status == 'a':\n if passed_students < student_pass:\n print('Yes')\n passed_students += 1\n else:\n print('No')\n elif status == 'b':\n if passed_students < student_pass and passed_students_abroad < abroad_student_pass:\n print('Yes')\n passed_students += 1\n passed_students_abroad += 1\n else:\n print('No')", "status == 'c'", "status", "'c'", "print('No')", "print", "'No'", "elif status == 'a':\n if passed_students < student_pass:\n print('Yes')\n passed_students += 1\n else:\n print('No')\n ", "status == 'a'", "status", "'a'", "if passed_students < student_pass:\n print('Yes')\n passed_students += 1\n else:\n print('No')\n ", "passed_students < student_pass", "passed_students", "student_pass", "print('Yes')", "print", "'Yes'", "passed_students += 1", "passed_students", "1", "print('No')", "print", "'No'", "elif status == 'b':\n if passed_students < student_pass and passed_students_abroad < abroad_student_pass:\n print('Yes')\n passed_students += 1\n passed_students_abroad += 1\n else:\n print('No')", "status == 'b'", "status", "'b'", "if passed_students < student_pass and passed_students_abroad < abroad_student_pass:\n print('Yes')\n passed_students += 1\n passed_students_abroad += 1\n else:\n print('No')", "passed_students < student_pass and passed_students_abroad < abroad_student_pass", "passed_students < student_pass", "passed_students", "student_pass", "passed_students_abroad < abroad_student_pass", "passed_students_abroad", "abroad_student_pass", "print('Yes')", "print", "'Yes'", "passed_students += 1", "passed_students", "1", "passed_students_abroad += 1", "passed_students_abroad", "1", "print('No')", "print", "'No'", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "student_pass = A + B", "A + B", "student_pass", "abroad_student_pass = B", "B", "abroad_student_pass", "passed_students += 1", "1", "passed_students", "passed_students_abroad += 1", "1", "passed_students_abroad", "A, B = map(int, input().split())", "map(int, input().split())", "A", "passed_students = 0", "0", "passed_students", "passed_students_abroad = 0", "0", "passed_students_abroad", "passed_students += 1", "1", "passed_students", "S = input()", "input()", "S", "B = map(int, input().split())", "map(int, input().split())", "B" ]
N, A, B = map(int, input().split()) S = input() student_pass = A + B abroad_student_pass = B passed_students = 0 passed_students_abroad = 0 for status in S: if status == 'c': print('No') elif status == 'a': if passed_students < student_pass: print('Yes') passed_students += 1 else: print('No') elif status == 'b': if passed_students < student_pass and passed_students_abroad < abroad_student_pass: print('Yes') passed_students += 1 passed_students_abroad += 1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 118, 2 ], [ 118, 11 ], [ 118, 12 ], [ 127, 14 ], [ 91, 18 ], [ 94, 21 ], [ 115, 24 ], [ 28, 27 ], [ 101, 30 ], [ 128, 34 ], [ 27, 35 ], [ 95, 40 ], [ 125, 40 ], [ 116, 41 ], [ 113, 41 ], [ 104, 43 ], [ 119, 44 ], [ 121, 46 ], [ 124, 49 ], [ 106, 52 ], [ 128, 57 ], [ 27, 58 ], [ 95, 64 ], [ 125, 64 ], [ 116, 65 ], [ 113, 65 ], [ 104, 67 ], [ 119, 68 ], [ 116, 70 ], [ 113, 70 ], [ 119, 71 ], [ 88, 73 ], [ 112, 76 ], [ 109, 79 ], [ 97, 82 ], [ 98, 86 ], [ 110, 86 ], [ 89, 86 ], [ 107, 86 ], [ 122, 86 ], [ 92, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 118, 101 ], [ 118, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\nJ = \"\"\n\na_cnt = 0\nb_cnt = 0\n\nfor i in range(N):\n if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n J += \"Yes\\n\"\n a_cnt += 1\n else:\n J += \"No\\n\"\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n J += \"Yes\\n\"\n b_cnt += 1\n else:\n J += \"No\\n\"\n else:\n J += \"No\\n\"\n\nprint(J)", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "J = \"\"", "J", "\"\"", "a_cnt = 0", "a_cnt", "0", "b_cnt = 0", "b_cnt", "0", "for i in range(N):\n if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n J += \"Yes\\n\"\n a_cnt += 1\n else:\n J += \"No\\n\"\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n J += \"Yes\\n\"\n b_cnt += 1\n else:\n J += \"No\\n\"\n else:\n J += \"No\\n\"", "i", "range(N)", "range", "N", "if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n J += \"Yes\\n\"\n a_cnt += 1\n else:\n J += \"No\\n\"\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n J += \"Yes\\n\"\n b_cnt += 1\n else:\n J += \"No\\n\"\n else:\n J += \"No\\n\"", "S[i] == \"a\"", "S[i]", "S", "i", "\"a\"", "if a_cnt + b_cnt < A + B:\n J += \"Yes\\n\"\n a_cnt += 1\n else:\n J += \"No\\n\"\n ", "a_cnt + b_cnt < A + B", "a_cnt + b_cnt", "a_cnt", "b_cnt", "A + B", "A", "B", "J += \"Yes\\n\"", "J", "\"Yes\\n\"", "a_cnt += 1", "a_cnt", "1", "J += \"No\\n\"", "J", "\"No\\n\"", "elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n J += \"Yes\\n\"\n b_cnt += 1\n else:\n J += \"No\\n\"\n ", "S[i] == \"b\"", "S[i]", "S", "i", "\"b\"", "if a_cnt + b_cnt < A + B and b_cnt < B:\n J += \"Yes\\n\"\n b_cnt += 1\n else:\n J += \"No\\n\"\n ", "a_cnt + b_cnt < A + B and b_cnt < B", "a_cnt + b_cnt < A + B", "a_cnt + b_cnt", "a_cnt", "b_cnt", "A + B", "A", "B", "b_cnt < B", "b_cnt", "B", "J += \"Yes\\n\"", "J", "\"Yes\\n\"", "b_cnt += 1", "b_cnt", "1", "J += \"No\\n\"", "J", "\"No\\n\"", "J += \"No\\n\"", "J", "\"No\\n\"", "print(J)", "print", "J", "J += \"Yes\\n\"", "\"Yes\\n\"", "J", "J = \"\"", "\"\"", "J", "a_cnt = 0", "0", "a_cnt", "J += \"No\\n\"", "\"No\\n\"", "J", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "A, B = map(int, input().split())", "map(int, input().split())", "A", "J += \"No\\n\"", "\"No\\n\"", "J", "J += \"No\\n\"", "\"No\\n\"", "J", "b_cnt += 1", "1", "b_cnt", "b_cnt = 0", "0", "b_cnt", "B = map(int, input().split())", "map(int, input().split())", "B", "J += \"Yes\\n\"", "\"Yes\\n\"", "J", "a_cnt += 1", "1", "a_cnt", "S = input()", "input()", "S" ]
N, A, B = map(int, input().split()) S = input() J = "" a_cnt = 0 b_cnt = 0 for i in range(N): if S[i] == "a": if a_cnt + b_cnt < A + B: J += "Yes\n" a_cnt += 1 else: J += "No\n" elif S[i] == "b": if a_cnt + b_cnt < A + B and b_cnt < B: J += "Yes\n" b_cnt += 1 else: J += "No\n" else: J += "No\n" print(J)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 17, 18, 13, 13, 2, 17, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 17, 18, 13, 13, 2, 17, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 97, 2 ], [ 97, 11 ], [ 97, 12 ], [ 82, 14 ], [ 88, 18 ], [ 80, 20 ], [ 77, 21 ], [ 94, 23 ], [ 27, 26 ], [ 98, 29 ], [ 83, 35 ], [ 26, 36 ], [ 89, 39 ], [ 86, 39 ], [ 92, 39 ], [ 91, 44 ], [ 83, 52 ], [ 26, 53 ], [ 89, 56 ], [ 86, 56 ], [ 92, 56 ], [ 95, 58 ], [ 74, 58 ], [ 77, 59 ], [ 85, 64 ], [ 73, 67 ], [ 73, 74 ], [ 97, 77 ], [ 97, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n\ncapacity = A+B\nrank = 1\nfor i in range(N):\n if 'a' == S[i] and 0 < capacity:\n print('Yes')\n capacity -= 1\n elif 'b' == S[i] and 0 < capacity and rank <= B:\n print('Yes')\n capacity -= 1\n rank += 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "capacity = A+B", "capacity", "A+B", "A", "B", "rank = 1", "rank", "1", "for i in range(N):\n if 'a' == S[i] and 0 < capacity:\n print('Yes')\n capacity -= 1\n elif 'b' == S[i] and 0 < capacity and rank <= B:\n print('Yes')\n capacity -= 1\n rank += 1\n else:\n print('No')", "i", "range(N)", "range", "N", "if 'a' == S[i] and 0 < capacity:\n print('Yes')\n capacity -= 1\n elif 'b' == S[i] and 0 < capacity and rank <= B:\n print('Yes')\n capacity -= 1\n rank += 1\n else:\n print('No')", "'a' == S[i] and 0 < capacity", "'a' == S[i]", "'a'", "S[i]", "S", "i", "0 < capacity", "0", "capacity", "print('Yes')", "print", "'Yes'", "capacity -= 1", "capacity", "1", "elif 'b' == S[i] and 0 < capacity and rank <= B:\n print('Yes')\n capacity -= 1\n rank += 1\n ", "'b' == S[i] and 0 < capacity and rank <= B", "'b' == S[i] and 0 < capacity", "'b' == S[i]", "'b'", "S[i]", "S", "i", "0 < capacity", "0", "capacity", "rank <= B", "rank", "B", "print('Yes')", "print", "'Yes'", "capacity -= 1", "capacity", "1", "rank += 1", "rank", "1", "print('No')", "print", "'No'", "rank += 1", "1", "rank", "B = map(int, input().split())", "map(int, input().split())", "B", "A, B = map(int, input().split())", "map(int, input().split())", "A", "S = input()", "input()", "S", "capacity -= 1", "1", "capacity", "capacity = A+B", "A+B", "capacity", "capacity -= 1", "1", "capacity", "rank = 1", "1", "rank", "N, A, B = map(int, input().split())", "map(int, input().split())", "N" ]
N, A, B = map(int, input().split()) S = input() capacity = A+B rank = 1 for i in range(N): if 'a' == S[i] and 0 < capacity: print('Yes') capacity -= 1 elif 'b' == S[i] and 0 < capacity and rank <= B: print('Yes') capacity -= 1 rank += 1 else: print('No')
[ 7, 12, 13, 14, 2, 13, 2, 13, 13, 4, 13, 17, 29, 2, 13, 17, 4, 13, 17, 29, 13, 23, 13, 23, 13, 12, 13, 14, 2, 2, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 29, 39, 2, 13, 17, 2, 13, 17, 4, 13, 17, 29, 39, 13, 2, 13, 17, 23, 13, 23, 13, 23, 13, 23, 13, 14, 2, 13, 17, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 13, 17, 0, 13, 4, 13, 13, 2, 13, 13, 14, 2, 13, 17, 0, 13, 4, 13, 13, 13, 2, 13, 13, 13, 13, 4, 13, 17, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 22, 5 ], [ 22, 14 ], [ 22, 20 ], [ 22, 22 ], [ 24, 24 ], [ 58, 30 ], [ 60, 35 ], [ 64, 36 ], [ 58, 43 ], [ 60, 46 ], [ 60, 55 ], [ 58, 58 ], [ 60, 60 ], [ 62, 62 ], [ 64, 64 ], [ 150, 70 ], [ 150, 81 ], [ 150, 82 ], [ 144, 84 ], [ 156, 88 ], [ 141, 91 ], [ 95, 94 ], [ 145, 97 ], [ 94, 100 ], [ 159, 103 ], [ 130, 105 ], [ 157, 106 ], [ 139, 106 ], [ 160, 106 ], [ 151, 108 ], [ 136, 109 ], [ 94, 112 ], [ 147, 115 ], [ 154, 117 ], [ 157, 118 ], [ 139, 118 ], [ 160, 118 ], [ 142, 119 ], [ 148, 119 ], [ 151, 121 ], [ 136, 122 ], [ 136, 123 ], [ 147, 124 ], [ 150, 133 ], [ 150, 136 ], [ 147, 139 ], [ 141, 142 ], [ 144, 145 ], [ 147, 148 ], [ 150, 151 ], [ 156, 157 ], [ 159, 160 ] ]
[ "def judge_passing_qualifying_domestic(i, line):\n if i < A+B:\n print('Yes')\n return i+1\n else:\n print('No')\n return i\n\ndef judge_passing_qualifying_foreign(i, rank_in_foreign, line, line_foreign):\n if (i < A+B)&(rank_in_foreign <= line_foreign):\n print('Yes')\n return i+1, rank_in_foreign+1\n else:\n print('No')\n return i, rank_in_foreign+1\n\n\nif __name__ == \"__main__\":\n N, A, B = list(map(int, input().split()))\n S = input()\n num_of_pass = 0\n rank_in_foreign = 1\n for p in list(S):\n if p == 'a':\n num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)\n elif p =='b':\n num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)\n else:\n print('No')", "def judge_passing_qualifying_domestic(i, line):\n if i < A+B:\n print('Yes')\n return i+1\n else:\n print('No')\n return i", "judge_passing_qualifying_domestic", "if i < A+B:\n print('Yes')\n return i+1\n else:\n print('No')\n return i", "i < A+B", "i", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "return i+1", "i+1", "i", "1", "print('No')", "print", "'No'", "return i", "i", "i", "i", "line", "line", "def judge_passing_qualifying_foreign(i, rank_in_foreign, line, line_foreign):\n if (i < A+B)&(rank_in_foreign <= line_foreign):\n print('Yes')\n return i+1, rank_in_foreign+1\n else:\n print('No')\n return i, rank_in_foreign+1", "judge_passing_qualifying_foreign", "if (i < A+B)&(rank_in_foreign <= line_foreign):\n print('Yes')\n return i+1, rank_in_foreign+1\n else:\n print('No')\n return i, rank_in_foreign+1", "(i < A+B)&(rank_in_foreign <= line_foreign)", "i < A+B", "i", "A+B", "A", "B", "rank_in_foreign <= line_foreign", "rank_in_foreign", "line_foreign", "print('Yes')", "print", "'Yes'", "return i+1, rank_in_foreign+1", "return i+1, rank_in_foreign+1", "i+1", "i", "1", "rank_in_foreign+1", "rank_in_foreign", "1", "print('No')", "print", "'No'", "return i, rank_in_foreign+1", "return i, rank_in_foreign+1", "i", "rank_in_foreign+1", "rank_in_foreign", "1", "i", "i", "rank_in_foreign", "rank_in_foreign", "line", "line", "line_foreign", "line_foreign", "if __name__ == \"__main__\":\n N, A, B = list(map(int, input().split()))\n S = input()\n num_of_pass = 0\n rank_in_foreign = 1\n for p in list(S):\n if p == 'a':\n num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)\n elif p =='b':\n num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)\n else:\n print('No')", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "N, A, B = list(map(int, input().split()))", "N", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "num_of_pass = 0", "num_of_pass", "0", "rank_in_foreign = 1", "rank_in_foreign", "1", "for p in list(S):\n if p == 'a':\n num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)\n elif p =='b':\n num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)\n else:\n print('No')", "p", "list(S)", "list", "S", "if p == 'a':\n num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)\n elif p =='b':\n num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)\n else:\n print('No')", "p == 'a'", "p", "'a'", "num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)", "num_of_pass", "judge_passing_qualifying_domestic(num_of_pass, A+B)", "judge_passing_qualifying_domestic", "num_of_pass", "A+B", "A", "B", "elif p =='b':\n num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)\n ", "p =='b'", "p", "'b'", "num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "num_of_pass", "judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "judge_passing_qualifying_foreign", "num_of_pass", "rank_in_foreign", "A+B", "A", "B", "B", "rank_in_foreign", "print('No')", "print", "'No'", "def judge_passing_qualifying_domestic(i, line):\n if i < A+B:\n print('Yes')\n return i+1\n else:\n print('No')\n return i", "def judge_passing_qualifying_domestic(i, line):\n if i < A+B:\n print('Yes')\n return i+1\n else:\n print('No')\n return i", "judge_passing_qualifying_domestic", "N, A, B = list(map(int, input().split()))", "list(map(int, input().split()))", "N", "B = list(map(int, input().split()))", "list(map(int, input().split()))", "B", "num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "num_of_pass", "rank_in_foreign = 1", "1", "rank_in_foreign", "S = input()", "input()", "S", "rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B)", "rank_in_foreign", "A, B = list(map(int, input().split()))", "list(map(int, input().split()))", "A", "def judge_passing_qualifying_foreign(i, rank_in_foreign, line, line_foreign):\n if (i < A+B)&(rank_in_foreign <= line_foreign):\n print('Yes')\n return i+1, rank_in_foreign+1\n else:\n print('No')\n return i, rank_in_foreign+1", "def judge_passing_qualifying_foreign(i, rank_in_foreign, line, line_foreign):\n if (i < A+B)&(rank_in_foreign <= line_foreign):\n print('Yes')\n return i+1, rank_in_foreign+1\n else:\n print('No')\n return i, rank_in_foreign+1", "judge_passing_qualifying_foreign", "num_of_pass = 0", "0", "num_of_pass", "num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B)", "judge_passing_qualifying_domestic(num_of_pass, A+B)", "num_of_pass" ]
def judge_passing_qualifying_domestic(i, line): if i < A+B: print('Yes') return i+1 else: print('No') return i def judge_passing_qualifying_foreign(i, rank_in_foreign, line, line_foreign): if (i < A+B)&(rank_in_foreign <= line_foreign): print('Yes') return i+1, rank_in_foreign+1 else: print('No') return i, rank_in_foreign+1 if __name__ == "__main__": N, A, B = list(map(int, input().split())) S = input() num_of_pass = 0 rank_in_foreign = 1 for p in list(S): if p == 'a': num_of_pass = judge_passing_qualifying_domestic(num_of_pass, A+B) elif p =='b': num_of_pass, rank_in_foreign = judge_passing_qualifying_foreign(num_of_pass, rank_in_foreign, A+B, B) else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 17, 14, 2, 13, 13, 4, 18, 13, 13, 17, 9, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 3, 41, 28, 13, 4, 13, 2, 13, 4, 13, 13, 4, 17, 0, 13, 13, 4, 13, 31, 13, 0, 13, 17, 10, 4, 13, 10, 4, 13, 10, 39, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 118, 2 ], [ 118, 11 ], [ 118, 12 ], [ 103, 14 ], [ 124, 18 ], [ 109, 21 ], [ 106, 24 ], [ 28, 27 ], [ 104, 27 ], [ 27, 31 ], [ 115, 34 ], [ 107, 38 ], [ 27, 43 ], [ 110, 47 ], [ 128, 47 ], [ 119, 48 ], [ 107, 51 ], [ 127, 56 ], [ 107, 60 ], [ 107, 65 ], [ 116, 71 ], [ 125, 71 ], [ 128, 72 ], [ 110, 72 ], [ 113, 74 ], [ 119, 75 ], [ 80, 79 ], [ 101, 83 ], [ 107, 86 ], [ 121, 90 ], [ 122, 95 ], [ 107, 95 ], [ 98, 97 ], [ 118, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 118, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\ninternal = 0\nexternal = 0\nres = []\nfor s in S:\n if s == 'a':\n internal += 1\n res.append('Yes')\n elif s == 'b':\n if external == B:\n res.append('No')\n continue\n external += 1\n res.append('Yes')\n else:\n res.append('No')\n if internal + external == A + B:\n break\nres += ['No' for _ in range(N - len(res))]\nprint(*res, sep='\\n')\n", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "internal = 0", "internal", "0", "external = 0", "external", "0", "res = []", "res", "[]", "for s in S:\n if s == 'a':\n internal += 1\n res.append('Yes')\n elif s == 'b':\n if external == B:\n res.append('No')\n continue\n external += 1\n res.append('Yes')\n else:\n res.append('No')\n if internal + external == A + B:\n break", "s", "S", "if s == 'a':\n internal += 1\n res.append('Yes')\n elif s == 'b':\n if external == B:\n res.append('No')\n continue\n external += 1\n res.append('Yes')\n else:\n res.append('No')\n ", "s == 'a'", "s", "'a'", "internal += 1", "internal", "1", "res.append('Yes')", "res.append", "res", "append", "'Yes'", "elif s == 'b':\n if external == B:\n res.append('No')\n continue\n external += 1\n res.append('Yes')\n ", "s == 'b'", "s", "'b'", "if external == B:\n res.append('No')\n continue\n ", "external == B", "external", "B", "res.append('No')", "res.append", "res", "append", "'No'", "continue", "external += 1", "external", "1", "res.append('Yes')", "res.append", "res", "append", "'Yes'", "res.append('No')", "res.append", "res", "append", "'No'", "if internal + external == A + B:\n break", "internal + external == A + B", "internal + external", "internal", "external", "A + B", "A", "B", "break", "'No' for _ in range(N - len(res))", "for _ in range(N - len(res))", "_", "range(N - len(res))", "range", "N - len(res)", "N", "len(res)", "len", "res", "for _ in range(N - len(res))", "'No'", "res += ['No' for _ in range(N - len(res))]", "res", "['No' for _ in range(N - len(res))]", "print(*res, sep='\\n')", "print", "*res", "res", "sep='\\n'", "sep", "'\\n'", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "S = input()", "input()", "S", "res = []", "[]", "res", "external = 0", "0", "external", "A, B = map(int, input().split())", "map(int, input().split())", "A", "internal += 1", "1", "internal", "B = map(int, input().split())", "map(int, input().split())", "B", "res += ['No' for _ in range(N - len(res))]", "['No' for _ in range(N - len(res))]", "res", "internal = 0", "0", "internal", "external += 1", "1", "external" ]
N, A, B = map(int, input().split()) S = input() internal = 0 external = 0 res = [] for s in S: if s == 'a': internal += 1 res.append('Yes') elif s == 'b': if external == B: res.append('No') continue external += 1 res.append('Yes') else: res.append('No') if internal + external == A + B: break res += ['No' for _ in range(N - len(res))] print(*res, sep='\n')
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 17, 14, 40, 2, 13, 13, 2, 13, 13, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 40, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 114, 2 ], [ 114, 13 ], [ 114, 14 ], [ 105, 16 ], [ 108, 22 ], [ 111, 25 ], [ 29, 28 ], [ 106, 28 ], [ 78, 31 ], [ 109, 36 ], [ 97, 36 ], [ 112, 37 ], [ 118, 37 ], [ 103, 39 ], [ 115, 40 ], [ 81, 42 ], [ 28, 46 ], [ 96, 49 ], [ 93, 52 ], [ 28, 56 ], [ 84, 59 ], [ 112, 63 ], [ 118, 63 ], [ 115, 64 ], [ 99, 66 ], [ 117, 69 ], [ 90, 72 ], [ 91, 76 ], [ 100, 76 ], [ 94, 76 ], [ 82, 76 ], [ 85, 76 ], [ 79, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 114, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 114, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ] ]
[ "n, a, b = list(map(int, input().split()))\n\ns = str(input())\n\ncount_a = 0\ncount_b = 0\n\nfor i in s:\n \n j = \"\"\n \n if count_a+count_b >= (a+b):\n j = \"No\"\n \n elif i == \"a\":\n count_a += 1\n j = \"Yes\"\n \n elif i==\"b\":\n j = \"Yes\"\n \n if count_b >= b:\n j = \"No\"\n \n else:\n count_b += 1\n \n else:\n j = \"No\"\n \n print(j)", "n, a, b = list(map(int, input().split()))", "n", "list(map(int, input().split()))", "list", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = str(input())", "s", "str(input())", "str", "input()", "input", "count_a = 0", "count_a", "0", "count_b = 0", "count_b", "0", "for i in s:\n \n j = \"\"\n \n if count_a+count_b >= (a+b):\n j = \"No\"\n \n elif i == \"a\":\n count_a += 1\n j = \"Yes\"\n \n elif i==\"b\":\n j = \"Yes\"\n \n if count_b >= b:\n j = \"No\"\n \n else:\n count_b += 1\n \n else:\n j = \"No\"\n \n print(j)", "i", "s", "j = \"\"", "j", "\"\"", "if count_a+count_b >= (a+b):\n j = \"No\"\n \n elif i == \"a\":\n count_a += 1\n j = \"Yes\"\n \n elif i==\"b\":\n j = \"Yes\"\n \n if count_b >= b:\n j = \"No\"\n \n else:\n count_b += 1\n \n else:\n j = \"No\"\n \n ", "count_a+count_b >= (a+b)", "count_a+count_b", "count_a", "count_b", "a+b", "a", "b", "j = \"No\"", "j", "\"No\"", "elif i == \"a\":\n count_a += 1\n j = \"Yes\"\n \n ", "i == \"a\"", "i", "\"a\"", "count_a += 1", "count_a", "1", "j = \"Yes\"", "j", "\"Yes\"", "elif i==\"b\":\n j = \"Yes\"\n \n if count_b >= b:\n j = \"No\"\n \n else:\n count_b += 1\n \n ", "i==\"b\"", "i", "\"b\"", "j = \"Yes\"", "j", "\"Yes\"", "if count_b >= b:\n j = \"No\"\n \n else:\n count_b += 1\n \n ", "count_b >= b", "count_b", "b", "j = \"No\"", "j", "\"No\"", "count_b += 1", "count_b", "1", "j = \"No\"", "j", "\"No\"", "print(j)", "print", "j", "j = \"\"", "\"\"", "j", "j = \"No\"", "\"No\"", "j", "j = \"Yes\"", "\"Yes\"", "j", "n, a, b = list(map(int, input().split()))", "list(map(int, input().split()))", "n", "j = \"No\"", "\"No\"", "j", "j = \"Yes\"", "\"Yes\"", "j", "count_a += 1", "1", "count_a", "j = \"No\"", "\"No\"", "j", "a, b = list(map(int, input().split()))", "list(map(int, input().split()))", "a", "s = str(input())", "str(input())", "s", "count_a = 0", "0", "count_a", "count_b = 0", "0", "count_b", "b = list(map(int, input().split()))", "list(map(int, input().split()))", "b", "count_b += 1", "1", "count_b" ]
n, a, b = list(map(int, input().split())) s = str(input()) count_a = 0 count_b = 0 for i in s: j = "" if count_a+count_b >= (a+b): j = "No" elif i == "a": count_a += 1 j = "Yes" elif i=="b": j = "Yes" if count_b >= b: j = "No" else: count_b += 1 else: j = "No" print(j)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 40, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 103, 2 ], [ 103, 11 ], [ 103, 12 ], [ 82, 14 ], [ 97, 18 ], [ 104, 20 ], [ 89, 21 ], [ 106, 23 ], [ 94, 26 ], [ 30, 29 ], [ 92, 32 ], [ 83, 36 ], [ 29, 37 ], [ 107, 41 ], [ 86, 41 ], [ 110, 41 ], [ 98, 42 ], [ 109, 47 ], [ 83, 55 ], [ 29, 56 ], [ 100, 59 ], [ 101, 64 ], [ 95, 64 ], [ 89, 65 ], [ 107, 67 ], [ 86, 67 ], [ 110, 67 ], [ 98, 68 ], [ 85, 73 ], [ 82, 83 ], [ 85, 86 ], [ 103, 89 ], [ 103, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\nab=a+b\nnow=0\nnowb=0\nfor i in range(n):\n if s[i]==\"a\":\n if now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n nowb+=1\n if nowb<=b and now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "ab=a+b", "ab", "a+b", "a", "b", "now=0", "now", "0", "nowb=0", "nowb", "0", "for i in range(n):\n if s[i]==\"a\":\n if now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n nowb+=1\n if nowb<=b and now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"a\":\n if now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n nowb+=1\n if nowb<=b and now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s[i]==\"a\"", "s[i]", "s", "i", "\"a\"", "if now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n ", "now<ab", "now", "ab", "print(\"Yes\")", "print", "\"Yes\"", "now+=1", "now", "1", "print(\"No\")", "print", "\"No\"", "elif s[i]==\"b\":\n nowb+=1\n if nowb<=b and now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n ", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "nowb+=1", "nowb", "1", "if nowb<=b and now<ab:\n print(\"Yes\")\n now+=1\n else:\n print(\"No\")\n ", "nowb<=b and now<ab", "nowb<=b", "nowb", "b", "now<ab", "now", "ab", "print(\"Yes\")", "print", "\"Yes\"", "now+=1", "now", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "s=input()", "input()", "s", "now+=1", "1", "now", "b=map(int,input().split())", "map(int,input().split())", "b", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "nowb=0", "0", "nowb", "ab=a+b", "a+b", "ab", "nowb+=1", "1", "nowb", "a,b=map(int,input().split())", "map(int,input().split())", "a", "now=0", "0", "now", "now+=1", "1", "now" ]
n,a,b=map(int,input().split()) s=input() ab=a+b now=0 nowb=0 for i in range(n): if s[i]=="a": if now<ab: print("Yes") now+=1 else: print("No") elif s[i]=="b": nowb+=1 if nowb<=b and now<ab: print("Yes") now+=1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 40, 13, 2, 2, 13, 13, 17, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 40, 13, 2, 2, 13, 13, 17, 40, 13, 2, 13, 17, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 111, 2 ], [ 111, 11 ], [ 111, 12 ], [ 114, 14 ], [ 105, 18 ], [ 96, 21 ], [ 25, 24 ], [ 112, 27 ], [ 115, 31 ], [ 24, 32 ], [ 106, 36 ], [ 118, 36 ], [ 100, 36 ], [ 109, 39 ], [ 91, 40 ], [ 99, 46 ], [ 115, 54 ], [ 24, 55 ], [ 106, 60 ], [ 118, 60 ], [ 100, 60 ], [ 109, 63 ], [ 91, 64 ], [ 97, 67 ], [ 103, 67 ], [ 94, 67 ], [ 91, 69 ], [ 117, 75 ], [ 93, 78 ], [ 102, 84 ], [ 111, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 111, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ] ]
[ "# coding: utf-8\n\nn, a, b = map(int,input().split())\ns = input()\n\ncapacity = 0\nforeigner = 0\nfor i in range(n):\n if s[i] == 'a':\n if capacity <= a+b-1:\n print('Yes')\n capacity += 1\n else:\n print('No')\n elif s[i] == 'b':\n if capacity <= a+b-1 and foreigner <= b-1:\n print('Yes')\n capacity += 1\n foreigner += 1\n else:\n print('No')\n foreigner += 1\n else:\n print('No')", "n, a, b = map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "capacity = 0", "capacity", "0", "foreigner = 0", "foreigner", "0", "for i in range(n):\n if s[i] == 'a':\n if capacity <= a+b-1:\n print('Yes')\n capacity += 1\n else:\n print('No')\n elif s[i] == 'b':\n if capacity <= a+b-1 and foreigner <= b-1:\n print('Yes')\n capacity += 1\n foreigner += 1\n else:\n print('No')\n foreigner += 1\n else:\n print('No')", "i", "range(n)", "range", "n", "if s[i] == 'a':\n if capacity <= a+b-1:\n print('Yes')\n capacity += 1\n else:\n print('No')\n elif s[i] == 'b':\n if capacity <= a+b-1 and foreigner <= b-1:\n print('Yes')\n capacity += 1\n foreigner += 1\n else:\n print('No')\n foreigner += 1\n else:\n print('No')", "s[i] == 'a'", "s[i]", "s", "i", "'a'", "if capacity <= a+b-1:\n print('Yes')\n capacity += 1\n else:\n print('No')\n ", "capacity <= a+b-1", "capacity", "a+b-1", "a+b", "a", "b", "1", "print('Yes')", "print", "'Yes'", "capacity += 1", "capacity", "1", "print('No')", "print", "'No'", "elif s[i] == 'b':\n if capacity <= a+b-1 and foreigner <= b-1:\n print('Yes')\n capacity += 1\n foreigner += 1\n else:\n print('No')\n foreigner += 1\n ", "s[i] == 'b'", "s[i]", "s", "i", "'b'", "if capacity <= a+b-1 and foreigner <= b-1:\n print('Yes')\n capacity += 1\n foreigner += 1\n else:\n print('No')\n foreigner += 1\n ", "capacity <= a+b-1 and foreigner <= b-1", "capacity <= a+b-1", "capacity", "a+b-1", "a+b", "a", "b", "1", "foreigner <= b-1", "foreigner", "b-1", "b", "1", "print('Yes')", "print", "'Yes'", "capacity += 1", "capacity", "1", "foreigner += 1", "foreigner", "1", "print('No')", "print", "'No'", "foreigner += 1", "foreigner", "1", "print('No')", "print", "'No'", "b = map(int,input().split())", "map(int,input().split())", "b", "foreigner += 1", "1", "foreigner", "foreigner = 0", "0", "foreigner", "capacity += 1", "1", "capacity", "foreigner += 1", "1", "foreigner", "capacity = 0", "0", "capacity", "a, b = map(int,input().split())", "map(int,input().split())", "a", "n, a, b = map(int,input().split())", "map(int,input().split())", "n", "s = input()", "input()", "s", "capacity += 1", "1", "capacity" ]
# coding: utf-8 n, a, b = map(int,input().split()) s = input() capacity = 0 foreigner = 0 for i in range(n): if s[i] == 'a': if capacity <= a+b-1: print('Yes') capacity += 1 else: print('No') elif s[i] == 'b': if capacity <= a+b-1 and foreigner <= b-1: print('Yes') capacity += 1 foreigner += 1 else: print('No') foreigner += 1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 111, 2 ], [ 111, 11 ], [ 111, 12 ], [ 105, 14 ], [ 102, 18 ], [ 87, 21 ], [ 25, 24 ], [ 97, 27 ], [ 106, 31 ], [ 24, 32 ], [ 103, 36 ], [ 91, 36 ], [ 94, 36 ], [ 112, 38 ], [ 100, 39 ], [ 93, 41 ], [ 106, 52 ], [ 24, 53 ], [ 108, 56 ], [ 94, 61 ], [ 103, 61 ], [ 91, 61 ], [ 112, 63 ], [ 100, 64 ], [ 109, 66 ], [ 88, 66 ], [ 100, 67 ], [ 90, 69 ], [ 106, 80 ], [ 24, 81 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 111, 97 ], [ 111, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n\npassed = 0\nforeigners = 0\n\nfor i in range(N):\n # 国内学生\n if S[i] == \"a\":\n if passed < (A + B):\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n # 海外学生\n if S[i] == \"b\":\n foreigners += 1\n if passed < (A + B) and foreigners <= B:\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n if S[i] == \"c\":\n print(\"No\")", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "passed = 0", "passed", "0", "foreigners = 0", "foreigners", "0", "for i in range(N):\n # 国内学生\n if S[i] == \"a\":\n if passed < (A + B):\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n # 海外学生\n if S[i] == \"b\":\n foreigners += 1\n if passed < (A + B) and foreigners <= B:\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n if S[i] == \"c\":\n print(\"No\")", "i", "range(N)", "range", "N", "if S[i] == \"a\":\n if passed < (A + B):\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n # 海外学生\n ", "S[i] == \"a\"", "S[i]", "S", "i", "\"a\"", "if passed < (A + B):\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n # 海外学生\n ", "passed < (A + B)", "passed", "A + B", "A", "B", "passed += 1", "passed", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if S[i] == \"b\":\n foreigners += 1\n if passed < (A + B) and foreigners <= B:\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n ", "S[i] == \"b\"", "S[i]", "S", "i", "\"b\"", "foreigners += 1", "foreigners", "1", "if passed < (A + B) and foreigners <= B:\n passed += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n ", "passed < (A + B) and foreigners <= B", "passed < (A + B)", "passed", "A + B", "A", "B", "foreigners <= B", "foreigners", "B", "passed += 1", "passed", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if S[i] == \"c\":\n print(\"No\")", "S[i] == \"c\"", "S[i]", "S", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "foreigners = 0", "0", "foreigners", "passed += 1", "1", "passed", "passed += 1", "1", "passed", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "B = map(int, input().split())", "map(int, input().split())", "B", "passed = 0", "0", "passed", "S = input()", "input()", "S", "foreigners += 1", "1", "foreigners", "A, B = map(int, input().split())", "map(int, input().split())", "A" ]
N, A, B = map(int, input().split()) S = input() passed = 0 foreigners = 0 for i in range(N): # 国内学生 if S[i] == "a": if passed < (A + B): passed += 1 print("Yes") else: print("No") # 海外学生 if S[i] == "b": foreigners += 1 if passed < (A + B) and foreigners <= B: passed += 1 print("Yes") else: print("No") if S[i] == "c": print("No")
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 29, 39, 13, 13, 13, 13, 12, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 23, 13, 23, 13, 23, 13, 23, 13, 14, 2, 13, 17, 0, 13, 4, 13, 13, 13, 13, 4, 13, 13, 13, 13, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 5, 4 ], [ 5, 15 ], [ 5, 16 ], [ 19, 18 ], [ 31, 30 ], [ 34, 33 ], [ 37, 36 ], [ 94, 36 ], [ 36, 40 ], [ 30, 45 ], [ 54, 45 ], [ 33, 46 ], [ 79, 46 ], [ 90, 48 ], [ 92, 49 ], [ 55, 54 ], [ 36, 61 ], [ 30, 67 ], [ 54, 67 ], [ 33, 68 ], [ 79, 68 ], [ 90, 70 ], [ 92, 71 ], [ 33, 73 ], [ 79, 73 ], [ 92, 74 ], [ 80, 79 ], [ 88, 88 ], [ 90, 90 ], [ 92, 92 ], [ 94, 94 ], [ 128, 100 ], [ 126, 102 ], [ 128, 103 ], [ 128, 104 ], [ 128, 105 ], [ 120, 107 ], [ 117, 108 ], [ 129, 109 ], [ 114, 110 ], [ 123, 111 ], [ 128, 114 ], [ 128, 117 ], [ 128, 123 ], [ 128, 129 ] ]
[ "def readinput():\n n,a,b=list(map(int,input().split()))\n s=input()\n return n,a,b,s\n\ndef main(n,a,b,s):\n kokunai=0\n kaigai=0\n for c in s:\n if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')\n\nif __name__=='__main__':\n n,a,b,s=readinput()\n main(n,a,b,s)", "def readinput():\n n,a,b=list(map(int,input().split()))\n s=input()\n return n,a,b,s", "readinput", "n,a,b=list(map(int,input().split()))", "n", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "return n,a,b,s", "return n,a,b,s", "n", "a", "b", "s", "def main(n,a,b,s):\n kokunai=0\n kaigai=0\n for c in s:\n if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')", "main", "kokunai=0", "kokunai", "0", "kaigai=0", "kaigai", "0", "for c in s:\n if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')", "c", "s", "if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')", "c=='a'", "c", "'a'", "if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n ", "kokunai+kaigai<a+b", "kokunai+kaigai", "kokunai", "kaigai", "a+b", "a", "b", "print('Yes')", "print", "'Yes'", "kokunai+=1", "kokunai", "1", "print('No')", "print", "'No'", "elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n ", "c=='b'", "c", "'b'", "if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n ", "kokunai+kaigai<a+b and kaigai<b", "kokunai+kaigai<a+b", "kokunai+kaigai", "kokunai", "kaigai", "a+b", "a", "b", "kaigai<b", "kaigai", "b", "print('Yes')", "print", "'Yes'", "kaigai+=1", "kaigai", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "n", "n", "a", "a", "b", "b", "s", "s", "if __name__=='__main__':\n n,a,b,s=readinput()\n main(n,a,b,s)", "__name__=='__main__'", "__name__", "'__main__'", "n,a,b,s=readinput()", "n", "readinput()", "readinput", "a", "b", "s", "main(n,a,b,s)", "main", "n", "a", "b", "s", "b,s=readinput()", "readinput()", "b", "n,a,b,s=readinput()", "readinput()", "n", "def main(n,a,b,s):\n kokunai=0\n kaigai=0\n for c in s:\n if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')", "def main(n,a,b,s):\n kokunai=0\n kaigai=0\n for c in s:\n if c=='a':\n if kokunai+kaigai<a+b:\n print('Yes')\n kokunai+=1\n else:\n print('No')\n elif c=='b':\n if kokunai+kaigai<a+b and kaigai<b:\n print('Yes')\n kaigai+=1\n else:\n print('No')\n else:\n print('No')", "main", "s=readinput()", "readinput()", "s", "def readinput():\n n,a,b=list(map(int,input().split()))\n s=input()\n return n,a,b,s", "def readinput():\n n,a,b=list(map(int,input().split()))\n s=input()\n return n,a,b,s", "readinput", "a,b,s=readinput()", "readinput()", "a" ]
def readinput(): n,a,b=list(map(int,input().split())) s=input() return n,a,b,s def main(n,a,b,s): kokunai=0 kaigai=0 for c in s: if c=='a': if kokunai+kaigai<a+b: print('Yes') kokunai+=1 else: print('No') elif c=='b': if kokunai+kaigai<a+b and kaigai<b: print('Yes') kaigai+=1 else: print('No') else: print('No') if __name__=='__main__': n,a,b,s=readinput() main(n,a,b,s)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 94, 2 ], [ 94, 11 ], [ 94, 12 ], [ 97, 14 ], [ 100, 18 ], [ 91, 21 ], [ 25, 24 ], [ 83, 27 ], [ 98, 31 ], [ 24, 32 ], [ 101, 37 ], [ 89, 37 ], [ 92, 38 ], [ 104, 38 ], [ 95, 40 ], [ 86, 41 ], [ 88, 43 ], [ 98, 54 ], [ 24, 55 ], [ 101, 61 ], [ 89, 61 ], [ 92, 62 ], [ 104, 62 ], [ 95, 64 ], [ 86, 65 ], [ 92, 67 ], [ 104, 67 ], [ 86, 68 ], [ 103, 70 ], [ 94, 83 ], [ 94, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\ncnt_a=0\ncnt_b=0\nfor i in range(n):\n if s[i]==\"a\":\n if cnt_a+cnt_b<a+b:\n cnt_a+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if cnt_a+cnt_b<a+b and cnt_b<b:\n cnt_b+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "cnt_a=0", "cnt_a", "0", "cnt_b=0", "cnt_b", "0", "for i in range(n):\n if s[i]==\"a\":\n if cnt_a+cnt_b<a+b:\n cnt_a+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if cnt_a+cnt_b<a+b and cnt_b<b:\n cnt_b+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"a\":\n if cnt_a+cnt_b<a+b:\n cnt_a+=1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if cnt_a+cnt_b<a+b and cnt_b<b:\n cnt_b+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "s[i]==\"a\"", "s[i]", "s", "i", "\"a\"", "if cnt_a+cnt_b<a+b:\n cnt_a+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "cnt_a+cnt_b<a+b", "cnt_a+cnt_b", "cnt_a", "cnt_b", "a+b", "a", "b", "cnt_a+=1", "cnt_a", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif s[i]==\"b\":\n if cnt_a+cnt_b<a+b and cnt_b<b:\n cnt_b+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "if cnt_a+cnt_b<a+b and cnt_b<b:\n cnt_b+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "cnt_a+cnt_b<a+b and cnt_b<b", "cnt_a+cnt_b<a+b", "cnt_a+cnt_b", "cnt_a", "cnt_b", "a+b", "a", "b", "cnt_b<b", "cnt_b", "b", "cnt_b+=1", "cnt_b", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "b=map(int,input().split())", "map(int,input().split())", "b", "cnt_a+=1", "1", "cnt_a", "cnt_b=0", "0", "cnt_b", "a,b=map(int,input().split())", "map(int,input().split())", "a", "s=input()", "input()", "s", "cnt_a=0", "0", "cnt_a", "cnt_b+=1", "1", "cnt_b" ]
n,a,b=map(int,input().split()) s=input() cnt_a=0 cnt_b=0 for i in range(n): if s[i]=="a": if cnt_a+cnt_b<a+b: cnt_a+=1 print("Yes") else: print("No") elif s[i]=="b": if cnt_a+cnt_b<a+b and cnt_b<b: cnt_b+=1 print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 106, 2 ], [ 106, 11 ], [ 106, 12 ], [ 94, 14 ], [ 88, 18 ], [ 103, 21 ], [ 25, 24 ], [ 92, 27 ], [ 95, 31 ], [ 24, 32 ], [ 95, 40 ], [ 24, 41 ], [ 89, 46 ], [ 98, 46 ], [ 104, 47 ], [ 110, 47 ], [ 107, 49 ], [ 101, 50 ], [ 97, 55 ], [ 95, 63 ], [ 24, 64 ], [ 89, 70 ], [ 98, 70 ], [ 104, 71 ], [ 110, 71 ], [ 107, 73 ], [ 101, 74 ], [ 104, 76 ], [ 110, 76 ], [ 101, 77 ], [ 109, 82 ], [ 88, 89 ], [ 106, 92 ], [ 94, 95 ], [ 97, 98 ], [ 106, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\nta=0\ntb=0\nfor i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"a\":\n if ta+tb<a+b:\n print(\"Yes\")\n ta+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if ta+tb<a+b and tb<b:\n print(\"Yes\")\n tb+=1\n else:\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "ta=0", "ta", "0", "tb=0", "tb", "0", "for i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"a\":\n if ta+tb<a+b:\n print(\"Yes\")\n ta+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if ta+tb<a+b and tb<b:\n print(\"Yes\")\n tb+=1\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"a\":\n if ta+tb<a+b:\n print(\"Yes\")\n ta+=1\n else:\n print(\"No\")\n elif s[i]==\"b\":\n if ta+tb<a+b and tb<b:\n print(\"Yes\")\n tb+=1\n else:\n print(\"No\")", "s[i]==\"c\"", "s[i]", "s", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "elif s[i]==\"a\":\n if ta+tb<a+b:\n print(\"Yes\")\n ta+=1\n else:\n print(\"No\")\n ", "s[i]==\"a\"", "s[i]", "s", "i", "\"a\"", "if ta+tb<a+b:\n print(\"Yes\")\n ta+=1\n else:\n print(\"No\")\n ", "ta+tb<a+b", "ta+tb", "ta", "tb", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "ta+=1", "ta", "1", "print(\"No\")", "print", "\"No\"", "elif s[i]==\"b\":\n if ta+tb<a+b and tb<b:\n print(\"Yes\")\n tb+=1\n else:\n print(\"No\")", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "if ta+tb<a+b and tb<b:\n print(\"Yes\")\n tb+=1\n else:\n print(\"No\")", "ta+tb<a+b and tb<b", "ta+tb<a+b", "ta+tb", "ta", "tb", "a+b", "a", "b", "tb<b", "tb", "b", "print(\"Yes\")", "print", "\"Yes\"", "tb+=1", "tb", "1", "print(\"No\")", "print", "\"No\"", "ta=0", "0", "ta", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "s=input()", "input()", "s", "ta+=1", "1", "ta", "b=map(int,input().split())", "map(int,input().split())", "b", "tb=0", "0", "tb", "a,b=map(int,input().split())", "map(int,input().split())", "a", "tb+=1", "1", "tb" ]
n,a,b=map(int,input().split()) s=input() ta=0 tb=0 for i in range(n): if s[i]=="c": print("No") elif s[i]=="a": if ta+tb<a+b: print("Yes") ta+=1 else: print("No") elif s[i]=="b": if ta+tb<a+b and tb<b: print("Yes") tb+=1 else: print("No")
[ 7, 15, 13, 13, 13, 13, 13, 13, 15, 13, 12, 13, 12, 13, 12, 13, 12, 13, 12, 13, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 40, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 40, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 22, 21 ], [ 100, 23 ], [ 22, 24 ], [ 22, 25 ], [ 28, 27 ], [ 91, 29 ], [ 32, 31 ], [ 35, 34 ], [ 38, 37 ], [ 27, 37 ], [ 37, 41 ], [ 31, 45 ], [ 76, 45 ], [ 53, 45 ], [ 24, 47 ], [ 25, 48 ], [ 54, 53 ], [ 37, 60 ], [ 31, 65 ], [ 76, 65 ], [ 53, 65 ], [ 24, 67 ], [ 25, 68 ], [ 34, 70 ], [ 79, 70 ], [ 25, 71 ], [ 77, 76 ], [ 80, 79 ], [ 94, 88 ] ]
[ "import bisect,collections,copy,itertools,math,string\nimport sys\ndef I(): return int(sys.stdin.readline().rstrip())\ndef LI(): return list(map(int,sys.stdin.readline().rstrip().split()))\ndef S(): return sys.stdin.readline().rstrip()\ndef LS(): return list(sys.stdin.readline().rstrip.split())\ndef main():\n n,a,b = LI()\n s = S()\n cnt = 1\n cntb = 1\n\n for i in s:\n if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\nmain()", "import bisect,collections,copy,itertools,math,string", "bisect", "collections", "copy", "itertools", "math", "string", "import sys", "sys", "def I(): return int(sys.stdin.readline().rstrip())", "I", "def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))", "LI", "def S(): return sys.stdin.readline().rstrip()", "S", "def LS(): return list(sys.stdin.readline().rstrip.split())", "LS", "def main():\n n,a,b = LI()\n s = S()\n cnt = 1\n cntb = 1\n\n for i in s:\n if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "main", "n,a,b = LI()", "n", "LI()", "LI", "a", "b", "s = S()", "s", "S()", "S", "cnt = 1", "cnt", "1", "cntb = 1", "cntb", "1", "for i in s:\n if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "s", "if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i == \"a\"", "i", "\"a\"", "if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n ", "cnt<=a+b", "cnt", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "cnt+=1", "cnt", "1", "print(\"No\")", "print", "\"No\"", "elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n ", "i == \"b\"", "i", "\"b\"", "if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n ", "cnt<=a+b and cntb<=b", "cnt<=a+b", "cnt", "a+b", "a", "b", "cntb<=b", "cntb", "b", "print(\"Yes\")", "print", "\"Yes\"", "cnt+=1", "cnt", "1", "cntb+=1", "cntb", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "main()", "main", "def S(): return sys.stdin.readline().rstrip()", "def S(): return sys.stdin.readline().rstrip()", "S", "def main():\n n,a,b = LI()\n s = S()\n cnt = 1\n cntb = 1\n\n for i in s:\n if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "def main():\n n,a,b = LI()\n s = S()\n cnt = 1\n cntb = 1\n\n for i in s:\n if i == \"a\":\n if cnt<=a+b:\n print(\"Yes\")\n cnt+=1\n else:\n print(\"No\")\n elif i == \"b\":\n if cnt<=a+b and cntb<=b:\n print(\"Yes\")\n cnt+=1\n cntb+=1\n else:\n print(\"No\")\n else:\n print(\"No\")", "main", "def LS(): return list(sys.stdin.readline().rstrip.split())", "def LS(): return list(sys.stdin.readline().rstrip.split())", "LS", "def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))", "def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))", "LI", "def I(): return int(sys.stdin.readline().rstrip())", "def I(): return int(sys.stdin.readline().rstrip())", "I" ]
import bisect,collections,copy,itertools,math,string import sys def I(): return int(sys.stdin.readline().rstrip()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip.split()) def main(): n,a,b = LI() s = S() cnt = 1 cntb = 1 for i in s: if i == "a": if cnt<=a+b: print("Yes") cnt+=1 else: print("No") elif i == "b": if cnt<=a+b and cntb<=b: print("Yes") cnt+=1 cntb+=1 else: print("No") else: print("No") main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 9, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 9, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 90, 2 ], [ 90, 11 ], [ 90, 12 ], [ 75, 14 ], [ 84, 18 ], [ 72, 21 ], [ 25, 24 ], [ 76, 24 ], [ 24, 28 ], [ 85, 33 ], [ 79, 33 ], [ 73, 34 ], [ 94, 34 ], [ 88, 36 ], [ 82, 37 ], [ 78, 42 ], [ 24, 47 ], [ 73, 52 ], [ 94, 52 ], [ 82, 53 ], [ 79, 56 ], [ 85, 56 ], [ 73, 57 ], [ 94, 57 ], [ 88, 59 ], [ 82, 60 ], [ 93, 65 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 90, 82 ], [ 84, 85 ], [ 90, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "N,A,B = map(int,input().split())\nS = input()\n\ncount_in = 0\ncount_out = 0\nfor s in S:\n if s == 'a':\n if count_in+count_out<A+B:\n print('Yes')\n count_in += 1\n continue\n\n if s == 'b':\n if count_out<B and count_in+count_out<A+B:\n print('Yes')\n count_out += 1\n continue\n print('No')\n", "N,A,B = map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "count_in = 0", "count_in", "0", "count_out = 0", "count_out", "0", "for s in S:\n if s == 'a':\n if count_in+count_out<A+B:\n print('Yes')\n count_in += 1\n continue\n\n if s == 'b':\n if count_out<B and count_in+count_out<A+B:\n print('Yes')\n count_out += 1\n continue\n print('No')", "s", "S", "if s == 'a':\n if count_in+count_out<A+B:\n print('Yes')\n count_in += 1\n continue\n\n ", "s == 'a'", "s", "'a'", "if count_in+count_out<A+B:\n print('Yes')\n count_in += 1\n continue\n\n ", "count_in+count_out<A+B", "count_in+count_out", "count_in", "count_out", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "count_in += 1", "count_in", "1", "continue", "if s == 'b':\n if count_out<B and count_in+count_out<A+B:\n print('Yes')\n count_out += 1\n continue\n ", "s == 'b'", "s", "'b'", "if count_out<B and count_in+count_out<A+B:\n print('Yes')\n count_out += 1\n continue\n ", "count_out<B and count_in+count_out<A+B", "count_out<B", "count_out", "B", "count_in+count_out<A+B", "count_in+count_out", "count_in", "count_out", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "count_out += 1", "count_out", "1", "continue", "print('No')", "print", "'No'", "count_out = 0", "0", "count_out", "S = input()", "input()", "S", "count_in += 1", "1", "count_in", "B = map(int,input().split())", "map(int,input().split())", "B", "count_in = 0", "0", "count_in", "A,B = map(int,input().split())", "map(int,input().split())", "A", "N,A,B = map(int,input().split())", "map(int,input().split())", "N", "count_out += 1", "1", "count_out" ]
N,A,B = map(int,input().split()) S = input() count_in = 0 count_out = 0 for s in S: if s == 'a': if count_in+count_out<A+B: print('Yes') count_in += 1 continue if s == 'b': if count_out<B and count_in+count_out<A+B: print('Yes') count_out += 1 continue print('No')
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 18, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 96, 2 ], [ 108, 14 ], [ 114, 18 ], [ 97, 20 ], [ 111, 23 ], [ 97, 25 ], [ 99, 28 ], [ 97, 30 ], [ 105, 33 ], [ 90, 36 ], [ 40, 39 ], [ 115, 42 ], [ 109, 47 ], [ 39, 48 ], [ 106, 51 ], [ 118, 51 ], [ 103, 51 ], [ 112, 53 ], [ 100, 54 ], [ 102, 56 ], [ 109, 66 ], [ 39, 67 ], [ 106, 70 ], [ 118, 70 ], [ 103, 70 ], [ 112, 72 ], [ 100, 73 ], [ 91, 75 ], [ 94, 75 ], [ 100, 76 ], [ 117, 78 ], [ 93, 81 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ] ]
[ "Input = list(map(int,input().split()))\nS = input()\n\nN = Input[0]\nA = Input[1]\nB = Input[2]\nPass = 0\nB_Pass = 0\nfor iter in range(N):\n if S[iter] == 'a' and Pass < A+B:\n Pass += 1\n print(\"Yes\")\n elif S[iter] == 'b' and Pass < A+B and B_Pass < B:\n Pass += 1\n B_Pass += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "Input = list(map(int,input().split()))", "Input", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "S = input()", "S", "input()", "input", "N = Input[0]", "N", "Input[0]", "Input", "0", "A = Input[1]", "A", "Input[1]", "Input", "1", "B = Input[2]", "B", "Input[2]", "Input", "2", "Pass = 0", "Pass", "0", "B_Pass = 0", "B_Pass", "0", "for iter in range(N):\n if S[iter] == 'a' and Pass < A+B:\n Pass += 1\n print(\"Yes\")\n elif S[iter] == 'b' and Pass < A+B and B_Pass < B:\n Pass += 1\n B_Pass += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "iter", "range(N)", "range", "N", "if S[iter] == 'a' and Pass < A+B:\n Pass += 1\n print(\"Yes\")\n elif S[iter] == 'b' and Pass < A+B and B_Pass < B:\n Pass += 1\n B_Pass += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "S[iter] == 'a' and Pass < A+B", "S[iter] == 'a'", "S[iter]", "S", "iter", "'a'", "Pass < A+B", "Pass", "A+B", "A", "B", "Pass += 1", "Pass", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif S[iter] == 'b' and Pass < A+B and B_Pass < B:\n Pass += 1\n B_Pass += 1\n print(\"Yes\")\n ", "S[iter] == 'b' and Pass < A+B and B_Pass < B", "S[iter] == 'b' and Pass < A+B", "S[iter] == 'b'", "S[iter]", "S", "iter", "'b'", "Pass < A+B", "Pass", "A+B", "A", "B", "B_Pass < B", "B_Pass", "B", "Pass += 1", "Pass", "1", "B_Pass += 1", "B_Pass", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "B_Pass = 0", "0", "B_Pass", "B_Pass += 1", "1", "B_Pass", "Input = list(map(int,input().split()))", "list(map(int,input().split()))", "Input", "B = Input[2]", "Input[2]", "B", "Pass += 1", "1", "Pass", "Pass = 0", "0", "Pass", "S = input()", "input()", "S", "A = Input[1]", "Input[1]", "A", "N = Input[0]", "Input[0]", "N", "Pass += 1", "1", "Pass" ]
Input = list(map(int,input().split())) S = input() N = Input[0] A = Input[1] B = Input[2] Pass = 0 B_Pass = 0 for iter in range(N): if S[iter] == 'a' and Pass < A+B: Pass += 1 print("Yes") elif S[iter] == 'b' and Pass < A+B and B_Pass < B: Pass += 1 B_Pass += 1 print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 40, 2, 13, 17, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 40, 2, 13, 17, 2, 13, 13, 40, 2, 13, 17, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 117, 2 ], [ 117, 11 ], [ 117, 12 ], [ 105, 14 ], [ 93, 18 ], [ 108, 21 ], [ 25, 24 ], [ 103, 27 ], [ 106, 31 ], [ 24, 32 ], [ 94, 37 ], [ 112, 37 ], [ 115, 37 ], [ 118, 40 ], [ 97, 41 ], [ 114, 43 ], [ 106, 54 ], [ 24, 55 ], [ 115, 61 ], [ 94, 61 ], [ 112, 61 ], [ 118, 64 ], [ 97, 65 ], [ 109, 68 ], [ 100, 68 ], [ 97, 70 ], [ 111, 72 ], [ 99, 75 ], [ 106, 86 ], [ 24, 87 ], [ 93, 94 ], [ 117, 97 ], [ 99, 100 ], [ 117, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\ncnt=0\ncntt=0\nfor i in range(n):\n if s[i]==\"a\":\n if cnt+1<=a+b:\n cnt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n if s[i]==\"b\":\n if cnt+1<=a+b and cntt+1<=b:\n cnt+=1\n cntt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n if s[i]==\"c\":\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "cnt=0", "cnt", "0", "cntt=0", "cntt", "0", "for i in range(n):\n if s[i]==\"a\":\n if cnt+1<=a+b:\n cnt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n if s[i]==\"b\":\n if cnt+1<=a+b and cntt+1<=b:\n cnt+=1\n cntt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n if s[i]==\"c\":\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"a\":\n if cnt+1<=a+b:\n cnt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i]==\"a\"", "s[i]", "s", "i", "\"a\"", "if cnt+1<=a+b:\n cnt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "cnt+1<=a+b", "cnt+1", "cnt", "1", "a+b", "a", "b", "cnt+=1", "cnt", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if s[i]==\"b\":\n if cnt+1<=a+b and cntt+1<=b:\n cnt+=1\n cntt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "if cnt+1<=a+b and cntt+1<=b:\n cnt+=1\n cntt+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "cnt+1<=a+b and cntt+1<=b", "cnt+1<=a+b", "cnt+1", "cnt", "1", "a+b", "a", "b", "cntt+1<=b", "cntt+1", "cntt", "1", "b", "cnt+=1", "cnt", "1", "cntt+=1", "cntt", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if s[i]==\"c\":\n print(\"No\")", "s[i]==\"c\"", "s[i]", "s", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "cnt=0", "0", "cnt", "b=map(int,input().split())", "map(int,input().split())", "b", "cntt+=1", "1", "cntt", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "s=input()", "input()", "s", "cntt=0", "0", "cntt", "cnt+=1", "1", "cnt", "cnt+=1", "1", "cnt", "a,b=map(int,input().split())", "map(int,input().split())", "a" ]
n,a,b=map(int,input().split()) s=input() cnt=0 cntt=0 for i in range(n): if s[i]=="a": if cnt+1<=a+b: cnt+=1 print("Yes") else: print("No") if s[i]=="b": if cnt+1<=a+b and cntt+1<=b: cnt+=1 cntt+=1 print("Yes") else: print("No") if s[i]=="c": print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 97, 2 ], [ 97, 11 ], [ 97, 12 ], [ 79, 14 ], [ 76, 18 ], [ 85, 21 ], [ 25, 24 ], [ 80, 24 ], [ 24, 28 ], [ 77, 33 ], [ 89, 33 ], [ 86, 34 ], [ 95, 34 ], [ 83, 36 ], [ 98, 37 ], [ 88, 39 ], [ 24, 49 ], [ 77, 55 ], [ 89, 55 ], [ 86, 56 ], [ 95, 56 ], [ 83, 58 ], [ 98, 59 ], [ 86, 61 ], [ 95, 61 ], [ 98, 62 ], [ 94, 64 ], [ 76, 77 ], [ 79, 80 ], [ 97, 83 ], [ 85, 86 ], [ 88, 89 ], [ 97, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\n\ni = 0\nj = 0\nfor n in s:\n if n == \"a\":\n if i + j < a + b:\n i += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif n == \"b\":\n if (i + j < a + b) and j < b:\n j += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "i = 0", "i", "0", "j = 0", "j", "0", "for n in s:\n if n == \"a\":\n if i + j < a + b:\n i += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif n == \"b\":\n if (i + j < a + b) and j < b:\n j += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n", "s", "if n == \"a\":\n if i + j < a + b:\n i += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif n == \"b\":\n if (i + j < a + b) and j < b:\n j += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "n == \"a\"", "n", "\"a\"", "if i + j < a + b:\n i += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "i + j < a + b", "i + j", "i", "j", "a + b", "a", "b", "i += 1", "i", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif n == \"b\":\n if (i + j < a + b) and j < b:\n j += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "n == \"b\"", "n", "\"b\"", "if (i + j < a + b) and j < b:\n j += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "(i + j < a + b) and j < b", "i + j < a + b", "i + j", "i", "j", "a + b", "a", "b", "j < b", "j", "b", "j += 1", "j", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "i = 0", "0", "i", "s = input()", "input()", "s", "a, b = map(int, input().split())", "map(int, input().split())", "a", "j = 0", "0", "j", "i += 1", "1", "i", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "j += 1", "1", "j", "b = map(int, input().split())", "map(int, input().split())", "b" ]
n, a, b = map(int, input().split()) s = input() i = 0 j = 0 for n in s: if n == "a": if i + j < a + b: i += 1 print("Yes") else: print("No") elif n == "b": if (i + j < a + b) and j < b: j += 1 print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 113, 2 ], [ 113, 11 ], [ 113, 12 ], [ 95, 14 ], [ 107, 20 ], [ 98, 23 ], [ 27, 26 ], [ 102, 29 ], [ 96, 33 ], [ 26, 34 ], [ 96, 42 ], [ 26, 43 ], [ 108, 47 ], [ 93, 47 ], [ 105, 47 ], [ 114, 49 ], [ 90, 50 ], [ 104, 55 ], [ 96, 63 ], [ 26, 64 ], [ 108, 69 ], [ 93, 69 ], [ 105, 69 ], [ 114, 71 ], [ 90, 72 ], [ 99, 74 ], [ 111, 74 ], [ 90, 75 ], [ 92, 80 ], [ 110, 83 ], [ 113, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 113, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ] ]
[ "n, a, b = map(int, input().split())\ns = list(input())\nm = 0\nk = 0\nfor i in range(n):\n \n if s[i] == 'c':\n print('No')\n elif s[i] == 'a':\n if m < a + b:\n print('Yes')\n m += 1 \n else:\n print('No')\n elif s[i] == 'b':\n if m < a + b and k < b:\n print('Yes')\n m += 1\n k += 1\n else:\n print('No')", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = list(input())", "s", "list(input())", "list", "input()", "input", "m = 0", "m", "0", "k = 0", "k", "0", "for i in range(n):\n \n if s[i] == 'c':\n print('No')\n elif s[i] == 'a':\n if m < a + b:\n print('Yes')\n m += 1 \n else:\n print('No')\n elif s[i] == 'b':\n if m < a + b and k < b:\n print('Yes')\n m += 1\n k += 1\n else:\n print('No')", "i", "range(n)", "range", "n", "if s[i] == 'c':\n print('No')\n elif s[i] == 'a':\n if m < a + b:\n print('Yes')\n m += 1 \n else:\n print('No')\n elif s[i] == 'b':\n if m < a + b and k < b:\n print('Yes')\n m += 1\n k += 1\n else:\n print('No')", "s[i] == 'c'", "s[i]", "s", "i", "'c'", "print('No')", "print", "'No'", "elif s[i] == 'a':\n if m < a + b:\n print('Yes')\n m += 1 \n else:\n print('No')\n ", "s[i] == 'a'", "s[i]", "s", "i", "'a'", "if m < a + b:\n print('Yes')\n m += 1 \n else:\n print('No')\n ", "m < a + b", "m", "a + b", "a", "b", "print('Yes')", "print", "'Yes'", "m += 1", "m", "1", "print('No')", "print", "'No'", "elif s[i] == 'b':\n if m < a + b and k < b:\n print('Yes')\n m += 1\n k += 1\n else:\n print('No')", "s[i] == 'b'", "s[i]", "s", "i", "'b'", "if m < a + b and k < b:\n print('Yes')\n m += 1\n k += 1\n else:\n print('No')", "m < a + b and k < b", "m < a + b", "m", "a + b", "a", "b", "k < b", "k", "b", "print('Yes')", "print", "'Yes'", "m += 1", "m", "1", "k += 1", "k", "1", "print('No')", "print", "'No'", "b = map(int, input().split())", "map(int, input().split())", "b", "m += 1", "1", "m", "s = list(input())", "list(input())", "s", "k = 0", "0", "k", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "m += 1", "1", "m", "m = 0", "0", "m", "k += 1", "1", "k", "a, b = map(int, input().split())", "map(int, input().split())", "a" ]
n, a, b = map(int, input().split()) s = list(input()) m = 0 k = 0 for i in range(n): if s[i] == 'c': print('No') elif s[i] == 'a': if m < a + b: print('Yes') m += 1 else: print('No') elif s[i] == 'b': if m < a + b and k < b: print('Yes') m += 1 k += 1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 14, 40, 13, 13, 14, 2, 2, 13, 17, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 119, 2 ], [ 119, 11 ], [ 119, 12 ], [ 101, 14 ], [ 116, 20 ], [ 105, 22 ], [ 108, 23 ], [ 110, 25 ], [ 95, 28 ], [ 32, 31 ], [ 102, 31 ], [ 31, 36 ], [ 31, 39 ], [ 111, 43 ], [ 90, 43 ], [ 99, 43 ], [ 117, 44 ], [ 31, 48 ], [ 96, 51 ], [ 93, 51 ], [ 114, 51 ], [ 108, 52 ], [ 113, 57 ], [ 98, 60 ], [ 31, 65 ], [ 96, 68 ], [ 93, 68 ], [ 114, 68 ], [ 108, 69 ], [ 92, 74 ], [ 89, 80 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 119, 105 ], [ 119, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ] ]
[ "n ,a, b =map(int, input().split())\nS = list(input())\nthreshold = a + b\nrank = 1\nbnum = 1\nfor p in S:\n if p == \"a\" or p == \"b\":\n if rank <= threshold:\n if p == \"b\" and bnum <= b:\n print(\"Yes\")\n bnum += 1\n rank += 1\n elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n else:\n print(\"Yes\")\n rank += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "n ,a, b =map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "S = list(input())", "S", "list(input())", "list", "input()", "input", "threshold = a + b", "threshold", "a + b", "a", "b", "rank = 1", "rank", "1", "bnum = 1", "bnum", "1", "for p in S:\n if p == \"a\" or p == \"b\":\n if rank <= threshold:\n if p == \"b\" and bnum <= b:\n print(\"Yes\")\n bnum += 1\n rank += 1\n elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n else:\n print(\"Yes\")\n rank += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "p", "S", "if p == \"a\" or p == \"b\":\n if rank <= threshold:\n if p == \"b\" and bnum <= b:\n print(\"Yes\")\n bnum += 1\n rank += 1\n elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n else:\n print(\"Yes\")\n rank += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "p == \"a\" or p == \"b\"", "p == \"a\"", "p", "\"a\"", "p == \"b\"", "p", "\"b\"", "if rank <= threshold:\n if p == \"b\" and bnum <= b:\n print(\"Yes\")\n bnum += 1\n rank += 1\n elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n else:\n print(\"Yes\")\n rank += 1\n else:\n print(\"No\")\n ", "rank <= threshold", "rank", "threshold", "if p == \"b\" and bnum <= b:\n print(\"Yes\")\n bnum += 1\n rank += 1\n elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n else:\n print(\"Yes\")\n rank += 1\n ", "p == \"b\" and bnum <= b", "p == \"b\"", "p", "\"b\"", "bnum <= b", "bnum", "b", "print(\"Yes\")", "print", "\"Yes\"", "bnum += 1", "bnum", "1", "rank += 1", "rank", "1", "elif p == \"b\" and bnum > b:\n print(\"No\")\n bnum += 1\n ", "p == \"b\" and bnum > b", "p == \"b\"", "p", "\"b\"", "bnum > b", "bnum", "b", "print(\"No\")", "print", "\"No\"", "bnum += 1", "bnum", "1", "print(\"Yes\")", "print", "\"Yes\"", "rank += 1", "rank", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "rank += 1", "1", "rank", "bnum += 1", "1", "bnum", "bnum = 1", "1", "bnum", "rank += 1", "1", "rank", "S = list(input())", "list(input())", "S", "a, b =map(int, input().split())", "map(int, input().split())", "a", "b =map(int, input().split())", "map(int, input().split())", "b", "rank = 1", "1", "rank", "bnum += 1", "1", "bnum", "threshold = a + b", "a + b", "threshold", "n ,a, b =map(int, input().split())", "map(int, input().split())", "n" ]
n ,a, b =map(int, input().split()) S = list(input()) threshold = a + b rank = 1 bnum = 1 for p in S: if p == "a" or p == "b": if rank <= threshold: if p == "b" and bnum <= b: print("Yes") bnum += 1 rank += 1 elif p == "b" and bnum > b: print("No") bnum += 1 else: print("Yes") rank += 1 else: print("No") else: print("No")
[ 7, 15, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 12, 13, 12, 13, 12, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 12, 13, 23, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 12, 13, 23, 13, 12, 13, 12, 13, 12, 13, 41, 28, 13, 4, 13, 13, 4, 13, 12, 13, 23, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 12, 13, 23, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 12, 13, 23, 13, 12, 13, 23, 13, 23, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 4, 13, 17, 0, 13, 2, 2, 17, 17, 17, 0, 13, 39, 0, 13, 39, 12, 13, 0, 13, 4, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 13, 18, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 2, 13, 17, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 39, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 2, 13, 10, 12, 13, 10, 39, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 21, 20 ], [ 221, 26 ], [ 30, 30 ], [ 34, 33 ], [ 224, 39 ], [ 43, 43 ], [ 53, 52 ], [ 239, 57 ], [ 61, 61 ], [ 65, 64 ], [ 242, 70 ], [ 74, 74 ], [ 78, 77 ], [ 239, 85 ], [ 89, 89 ], [ 93, 93 ], [ 95, 95 ], [ 250, 104 ], [ 229, 109 ], [ 235, 116 ], [ 214, 119 ], [ 125, 124 ], [ 224, 126 ], [ 125, 127 ], [ 125, 128 ], [ 131, 130 ], [ 239, 132 ], [ 135, 134 ], [ 138, 137 ], [ 141, 140 ], [ 130, 145 ], [ 148, 147 ], [ 130, 149 ], [ 140, 150 ], [ 147, 153 ], [ 134, 157 ], [ 187, 157 ], [ 162, 157 ], [ 127, 159 ], [ 128, 160 ], [ 163, 162 ], [ 147, 172 ], [ 134, 177 ], [ 187, 177 ], [ 162, 177 ], [ 127, 179 ], [ 128, 180 ], [ 137, 183 ], [ 190, 183 ], [ 128, 185 ], [ 188, 187 ], [ 191, 190 ], [ 248, 206 ], [ 214, 215 ], [ 229, 230 ], [ 235, 236 ], [ 250, 251 ] ]
[ "import sys, re\nfrom math import ceil, floor, sqrt, pi, factorial, gcd\nfrom copy import deepcopy\nfrom collections import Counter, deque\nfrom heapq import heapify, heappop, heappush\nfrom itertools import accumulate, product, combinations, combinations_with_replacement\nfrom bisect import bisect, bisect_left, bisect_right\nfrom functools import reduce\nfrom decimal import Decimal, getcontext\n# input = sys.stdin.readline \ndef i_input(): return int(input())\ndef i_map(): return map(int, input().split())\ndef i_list(): return list(i_map())\ndef i_row(N): return [i_input() for _ in range(N)]\ndef i_row_list(N): return [i_list() for _ in range(N)]\ndef s_input(): return input()\ndef s_map(): return input().split()\ndef s_list(): return list(s_map())\ndef s_row(N): return [s_input for _ in range(N)]\ndef s_row_str(N): return [s_list() for _ in range(N)]\ndef s_row_list(N): return [list(s_input()) for _ in range(N)]\ndef lcm(a, b): return a * b // gcd(a, b)\nsys.setrecursionlimit(10 ** 6)\nINF = float('inf')\nMOD = 10 ** 9 + 7\nnum_list = []\nstr_list = []\n\ndef main():\n n, a, b = i_list()\n ss = s_input()\n\n kakuteisha = 0\n b_juni = 0\n for i in range(len(ss)):\n s = ss[i]\n if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n\nif __name__ == '__main__':\n main()", "import sys, re", "sys", "re", "from math import ceil, floor, sqrt, pi, factorial, gcd", "from copy import deepcopy", "from collections import Counter, deque", "from heapq import heapify, heappop, heappush", "from itertools import accumulate, product, combinations, combinations_with_replacement", "from bisect import bisect, bisect_left, bisect_right", "from functools import reduce", "from decimal import Decimal, getcontext", "def i_input(): return int(input())", "i_input", "def i_map(): return map(int, input().split())", "i_map", "def i_list(): return list(i_map())", "i_list", "i_input() for _ in range(N)", "for _ in range(N)", "_", "range(N)", "range", "N", "for _ in range(N)", "i_input()", "i_input", "def i_row(N): return [i_input() for _ in range(N)]", "i_row", "N", "N", "i_list() for _ in range(N)", "for _ in range(N)", "_", "range(N)", "range", "N", "for _ in range(N)", "i_list()", "i_list", "def i_row_list(N): return [i_list() for _ in range(N)]", "i_row_list", "N", "N", "def s_input(): return input()", "s_input", "def s_map(): return input().split()", "s_map", "def s_list(): return list(s_map())", "s_list", "s_input for _ in range(N)", "for _ in range(N)", "_", "range(N)", "range", "N", "for _ in range(N)", "s_input", "def s_row(N): return [s_input for _ in range(N)]", "s_row", "N", "N", "s_list() for _ in range(N)", "for _ in range(N)", "_", "range(N)", "range", "N", "for _ in range(N)", "s_list()", "s_list", "def s_row_str(N): return [s_list() for _ in range(N)]", "s_row_str", "N", "N", "list(s_input()) for _ in range(N)", "for _ in range(N)", "_", "range(N)", "range", "N", "for _ in range(N)", "list(s_input())", "list", "s_input()", "s_input", "def s_row_list(N): return [list(s_input()) for _ in range(N)]", "s_row_list", "N", "N", "def lcm(a, b): return a * b // gcd(a, b)", "lcm", "a", "a", "b", "b", "sys.setrecursionlimit(10 ** 6)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 6", "10", "6", "INF = float('inf')", "INF", "float('inf')", "float", "'inf'", "MOD = 10 ** 9 + 7", "MOD", "10 ** 9 + 7", "10 ** 9", "10", "9", "7", "num_list = []", "num_list", "[]", "str_list = []", "str_list", "[]", "def main():\n n, a, b = i_list()\n ss = s_input()\n\n kakuteisha = 0\n b_juni = 0\n for i in range(len(ss)):\n s = ss[i]\n if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "main", "n, a, b = i_list()", "n", "i_list()", "i_list", "a", "b", "ss = s_input()", "ss", "s_input()", "s_input", "kakuteisha = 0", "kakuteisha", "0", "b_juni = 0", "b_juni", "0", "for i in range(len(ss)):\n s = ss[i]\n if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(len(ss))", "range", "len(ss)", "len", "ss", "s = ss[i]", "s", "ss[i]", "ss", "i", "if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "s == \"a\"", "s", "\"a\"", "if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "kakuteisha < a + b", "kakuteisha", "a + b", "a", "b", "kakuteisha += 1", "kakuteisha", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s == \"b\"", "s", "\"b\"", "if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "kakuteisha < a + b and b_juni + 1 <= b", "kakuteisha < a + b", "kakuteisha", "a + b", "a", "b", "b_juni + 1 <= b", "b_juni + 1", "b_juni", "1", "b", "kakuteisha += 1", "kakuteisha", "1", "b_juni += 1", "b_juni", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def s_row(N): return [s_input for _ in range(N)]", "def s_row(N): return [s_input for _ in range(N)]", "s_row", "def s_map(): return input().split()", "def s_map(): return input().split()", "s_map", "str_list = []", "[]", "str_list", "def i_row_list(N): return [i_list() for _ in range(N)]", "def i_row_list(N): return [i_list() for _ in range(N)]", "i_row_list", "def i_input(): return int(input())", "def i_input(): return int(input())", "i_input", "def i_list(): return list(i_map())", "def i_list(): return list(i_map())", "i_list", "def s_row_str(N): return [s_list() for _ in range(N)]", "def s_row_str(N): return [s_list() for _ in range(N)]", "s_row_str", "MOD = 10 ** 9 + 7", "10 ** 9 + 7", "MOD", "def s_row_list(N): return [list(s_input()) for _ in range(N)]", "def s_row_list(N): return [list(s_input()) for _ in range(N)]", "s_row_list", "num_list = []", "[]", "num_list", "def s_input(): return input()", "def s_input(): return input()", "s_input", "def s_list(): return list(s_map())", "def s_list(): return list(s_map())", "s_list", "def i_row(N): return [i_input() for _ in range(N)]", "def i_row(N): return [i_input() for _ in range(N)]", "i_row", "def main():\n n, a, b = i_list()\n ss = s_input()\n\n kakuteisha = 0\n b_juni = 0\n for i in range(len(ss)):\n s = ss[i]\n if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "def main():\n n, a, b = i_list()\n ss = s_input()\n\n kakuteisha = 0\n b_juni = 0\n for i in range(len(ss)):\n s = ss[i]\n if s == \"a\":\n if kakuteisha < a + b:\n kakuteisha += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif s == \"b\":\n if kakuteisha < a + b and b_juni + 1 <= b:\n kakuteisha += 1\n b_juni += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "main", "INF = float('inf')", "float('inf')", "INF", "def i_map(): return map(int, input().split())", "def i_map(): return map(int, input().split())", "i_map", "def lcm(a, b): return a * b // gcd(a, b)", "def lcm(a, b): return a * b // gcd(a, b)", "lcm" ]
import sys, re from math import ceil, floor, sqrt, pi, factorial, gcd from copy import deepcopy from collections import Counter, deque from heapq import heapify, heappop, heappush from itertools import accumulate, product, combinations, combinations_with_replacement from bisect import bisect, bisect_left, bisect_right from functools import reduce from decimal import Decimal, getcontext # input = sys.stdin.readline def i_input(): return int(input()) def i_map(): return map(int, input().split()) def i_list(): return list(i_map()) def i_row(N): return [i_input() for _ in range(N)] def i_row_list(N): return [i_list() for _ in range(N)] def s_input(): return input() def s_map(): return input().split() def s_list(): return list(s_map()) def s_row(N): return [s_input for _ in range(N)] def s_row_str(N): return [s_list() for _ in range(N)] def s_row_list(N): return [list(s_input()) for _ in range(N)] def lcm(a, b): return a * b // gcd(a, b) sys.setrecursionlimit(10 ** 6) INF = float('inf') MOD = 10 ** 9 + 7 num_list = [] str_list = [] def main(): n, a, b = i_list() ss = s_input() kakuteisha = 0 b_juni = 0 for i in range(len(ss)): s = ss[i] if s == "a": if kakuteisha < a + b: kakuteisha += 1 print("Yes") else: print("No") elif s == "b": if kakuteisha < a + b and b_juni + 1 <= b: kakuteisha += 1 b_juni += 1 print("Yes") else: print("No") else: print("No") if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 78, 2 ], [ 78, 11 ], [ 78, 12 ], [ 87, 14 ], [ 93, 20 ], [ 90, 23 ], [ 27, 26 ], [ 88, 26 ], [ 26, 31 ], [ 94, 35 ], [ 82, 35 ], [ 91, 36 ], [ 85, 36 ], [ 73, 38 ], [ 76, 39 ], [ 81, 44 ], [ 26, 50 ], [ 94, 54 ], [ 82, 54 ], [ 91, 55 ], [ 85, 55 ], [ 73, 57 ], [ 76, 58 ], [ 91, 60 ], [ 85, 60 ], [ 76, 61 ], [ 84, 66 ], [ 78, 73 ], [ 78, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "n, a, b = map(int, input().split())\nS = str(input())\n\ndom = 0\nglo = 0\n\nfor s in S:\n if (s == 'a') and (dom + glo < a + b):\n print('Yes')\n dom += 1\n elif (s == 'b') and (dom + glo < a + b) and (glo < b):\n print('Yes')\n glo += 1\n else:\n print('No')", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "S = str(input())", "S", "str(input())", "str", "input()", "input", "dom = 0", "dom", "0", "glo = 0", "glo", "0", "for s in S:\n if (s == 'a') and (dom + glo < a + b):\n print('Yes')\n dom += 1\n elif (s == 'b') and (dom + glo < a + b) and (glo < b):\n print('Yes')\n glo += 1\n else:\n print('No')", "s", "S", "if (s == 'a') and (dom + glo < a + b):\n print('Yes')\n dom += 1\n elif (s == 'b') and (dom + glo < a + b) and (glo < b):\n print('Yes')\n glo += 1\n else:\n print('No')", "(s == 'a') and (dom + glo < a + b)", "s == 'a'", "s", "'a'", "dom + glo < a + b", "dom + glo", "dom", "glo", "a + b", "a", "b", "print('Yes')", "print", "'Yes'", "dom += 1", "dom", "1", "elif (s == 'b') and (dom + glo < a + b) and (glo < b):\n print('Yes')\n glo += 1\n ", "(s == 'b') and (dom + glo < a + b) and (glo < b)", "(s == 'b') and (dom + glo < a + b)", "s == 'b'", "s", "'b'", "dom + glo < a + b", "dom + glo", "dom", "glo", "a + b", "a", "b", "glo < b", "glo", "b", "print('Yes')", "print", "'Yes'", "glo += 1", "glo", "1", "print('No')", "print", "'No'", "a, b = map(int, input().split())", "map(int, input().split())", "a", "b = map(int, input().split())", "map(int, input().split())", "b", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "dom += 1", "1", "dom", "glo += 1", "1", "glo", "S = str(input())", "str(input())", "S", "glo = 0", "0", "glo", "dom = 0", "0", "dom" ]
n, a, b = map(int, input().split()) S = str(input()) dom = 0 glo = 0 for s in S: if (s == 'a') and (dom + glo < a + b): print('Yes') dom += 1 elif (s == 'b') and (dom + glo < a + b) and (glo < b): print('Yes') glo += 1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 104, 2 ], [ 104, 11 ], [ 104, 12 ], [ 95, 14 ], [ 83, 18 ], [ 101, 21 ], [ 25, 24 ], [ 96, 29 ], [ 96, 33 ], [ 24, 34 ], [ 84, 38 ], [ 93, 38 ], [ 87, 38 ], [ 105, 40 ], [ 90, 41 ], [ 86, 43 ], [ 96, 54 ], [ 24, 55 ], [ 84, 60 ], [ 93, 60 ], [ 87, 60 ], [ 105, 62 ], [ 90, 63 ], [ 102, 65 ], [ 108, 65 ], [ 90, 66 ], [ 92, 68 ], [ 107, 71 ], [ 83, 84 ], [ 86, 87 ], [ 104, 90 ], [ 92, 93 ], [ 95, 96 ], [ 104, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ] ]
[ "# n, m, l = map(int, input().split())\n\n# list_n = list(map(int, input().split()))\n\n# n = input()\n# list = [input() for i in range(N)\n\n# list = [[i for i in range(N)] for _ in range(M)]\n\nN, A, B = map(int, input().split())\nS = input()\n\nP = 0\nPb = 0\nfor i in range(len(S)):\n if S[i] == 'a':\n if P < A + B:\n P += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if P < A + B and Pb < B:\n P += 1\n Pb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "P = 0", "P", "0", "Pb = 0", "Pb", "0", "for i in range(len(S)):\n if S[i] == 'a':\n if P < A + B:\n P += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if P < A + B and Pb < B:\n P += 1\n Pb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i] == 'a':\n if P < A + B:\n P += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if P < A + B and Pb < B:\n P += 1\n Pb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "if P < A + B:\n P += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "P < A + B", "P", "A + B", "A", "B", "P += 1", "P", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif S[i] == \"b\":\n if P < A + B and Pb < B:\n P += 1\n Pb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "S[i] == \"b\"", "S[i]", "S", "i", "\"b\"", "if P < A + B and Pb < B:\n P += 1\n Pb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "P < A + B and Pb < B", "P < A + B", "P", "A + B", "A", "B", "Pb < B", "Pb", "B", "P += 1", "P", "1", "Pb += 1", "Pb", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "P = 0", "0", "P", "P += 1", "1", "P", "B = map(int, input().split())", "map(int, input().split())", "B", "P += 1", "1", "P", "S = input()", "input()", "S", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "Pb = 0", "0", "Pb", "A, B = map(int, input().split())", "map(int, input().split())", "A", "Pb += 1", "1", "Pb" ]
# n, m, l = map(int, input().split()) # list_n = list(map(int, input().split())) # n = input() # list = [input() for i in range(N) # list = [[i for i in range(N)] for _ in range(M)] N, A, B = map(int, input().split()) S = input() P = 0 Pb = 0 for i in range(len(S)): if S[i] == 'a': if P < A + B: P += 1 print("Yes") else: print("No") elif S[i] == "b": if P < A + B and Pb < B: P += 1 Pb += 1 print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 91, 2 ], [ 91, 11 ], [ 91, 12 ], [ 97, 14 ], [ 82, 18 ], [ 88, 21 ], [ 25, 24 ], [ 98, 24 ], [ 24, 28 ], [ 83, 33 ], [ 95, 33 ], [ 89, 34 ], [ 77, 34 ], [ 92, 36 ], [ 80, 37 ], [ 94, 42 ], [ 24, 49 ], [ 83, 55 ], [ 95, 55 ], [ 89, 56 ], [ 77, 56 ], [ 92, 58 ], [ 80, 59 ], [ 89, 61 ], [ 77, 61 ], [ 80, 62 ], [ 76, 67 ], [ 76, 77 ], [ 91, 80 ], [ 82, 83 ], [ 91, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n\na = 0\nb = 0\nfor s in S:\n if s == 'a':\n if a+b < A+B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif s == 'b':\n if a+b < A+B and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "a = 0", "a", "0", "b = 0", "b", "0", "for s in S:\n if s == 'a':\n if a+b < A+B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif s == 'b':\n if a+b < A+B and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n else:\n print('No')", "s", "S", "if s == 'a':\n if a+b < A+B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif s == 'b':\n if a+b < A+B and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n else:\n print('No')", "s == 'a'", "s", "'a'", "if a+b < A+B:\n print('Yes')\n a += 1\n else:\n print('No')\n ", "a+b < A+B", "a+b", "a", "b", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "a += 1", "a", "1", "print('No')", "print", "'No'", "elif s == 'b':\n if a+b < A+B and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n ", "s == 'b'", "s", "'b'", "if a+b < A+B and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n ", "a+b < A+B and b < B", "a+b < A+B", "a+b", "a", "b", "A+B", "A", "B", "b < B", "b", "B", "print('Yes')", "print", "'Yes'", "b += 1", "b", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "b += 1", "1", "b", "B = map(int, input().split())", "map(int, input().split())", "B", "a = 0", "0", "a", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "b = 0", "0", "b", "A, B = map(int, input().split())", "map(int, input().split())", "A", "a += 1", "1", "a", "S = input()", "input()", "S" ]
N, A, B = map(int, input().split()) S = input() a = 0 b = 0 for s in S: if s == 'a': if a+b < A+B: print('Yes') a += 1 else: print('No') elif s == 'b': if a+b < A+B and b < B: print('Yes') b += 1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 2, 13, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 18, 13, 13, 17, 2, 2, 13, 13, 13, 0, 13, 17, 14, 40, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 104, 2 ], [ 104, 11 ], [ 104, 12 ], [ 83, 14 ], [ 95, 20 ], [ 98, 23 ], [ 27, 26 ], [ 81, 29 ], [ 84, 34 ], [ 26, 35 ], [ 105, 39 ], [ 93, 40 ], [ 96, 41 ], [ 90, 41 ], [ 102, 41 ], [ 101, 46 ], [ 84, 52 ], [ 26, 53 ], [ 105, 57 ], [ 93, 58 ], [ 96, 59 ], [ 90, 59 ], [ 102, 59 ], [ 86, 61 ], [ 87, 65 ], [ 99, 65 ], [ 93, 66 ], [ 89, 71 ], [ 104, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 104, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ] ]
[ "N,A,B = map(int,input().split())\nl = list(input())\nnum = 0\ncount = 0\nfor i in range(N):\n if l[i] == 'a' and A + B > num:\n print('Yes')\n num += 1\n elif l[i] == 'b' and (A + B > num):\n count += 1\n if count <= B:\n print('Yes')\n num += 1\n else:\n print('No')\n else:\n print('No')", "N,A,B = map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "l = list(input())", "l", "list(input())", "list", "input()", "input", "num = 0", "num", "0", "count = 0", "count", "0", "for i in range(N):\n if l[i] == 'a' and A + B > num:\n print('Yes')\n num += 1\n elif l[i] == 'b' and (A + B > num):\n count += 1\n if count <= B:\n print('Yes')\n num += 1\n else:\n print('No')\n else:\n print('No')", "i", "range(N)", "range", "N", "if l[i] == 'a' and A + B > num:\n print('Yes')\n num += 1\n elif l[i] == 'b' and (A + B > num):\n count += 1\n if count <= B:\n print('Yes')\n num += 1\n else:\n print('No')\n else:\n print('No')", "l[i] == 'a' and A + B > num", "l[i] == 'a'", "l[i]", "l", "i", "'a'", "A + B > num", "A + B", "A", "B", "num", "print('Yes')", "print", "'Yes'", "num += 1", "num", "1", "elif l[i] == 'b' and (A + B > num):\n count += 1\n if count <= B:\n print('Yes')\n num += 1\n else:\n print('No')\n ", "l[i] == 'b' and (A + B > num)", "l[i] == 'b'", "l[i]", "l", "i", "'b'", "A + B > num", "A + B", "A", "B", "num", "count += 1", "count", "1", "if count <= B:\n print('Yes')\n num += 1\n else:\n print('No')\n ", "count <= B", "count", "B", "print('Yes')", "print", "'Yes'", "num += 1", "num", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "N,A,B = map(int,input().split())", "map(int,input().split())", "N", "l = list(input())", "list(input())", "l", "count += 1", "1", "count", "num += 1", "1", "num", "B = map(int,input().split())", "map(int,input().split())", "B", "num = 0", "0", "num", "count = 0", "0", "count", "num += 1", "1", "num", "A,B = map(int,input().split())", "map(int,input().split())", "A" ]
N,A,B = map(int,input().split()) l = list(input()) num = 0 count = 0 for i in range(N): if l[i] == 'a' and A + B > num: print('Yes') num += 1 elif l[i] == 'b' and (A + B > num): count += 1 if count <= B: print('Yes') num += 1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 2, 13, 17, 0, 13, 2, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 99, 2 ], [ 99, 11 ], [ 99, 12 ], [ 111, 14 ], [ 84, 18 ], [ 102, 21 ], [ 90, 24 ], [ 28, 27 ], [ 97, 30 ], [ 112, 35 ], [ 27, 36 ], [ 103, 39 ], [ 109, 39 ], [ 106, 39 ], [ 88, 41 ], [ 100, 42 ], [ 105, 47 ], [ 103, 49 ], [ 109, 49 ], [ 106, 49 ], [ 112, 56 ], [ 27, 57 ], [ 103, 60 ], [ 109, 60 ], [ 106, 60 ], [ 88, 62 ], [ 100, 63 ], [ 91, 65 ], [ 94, 65 ], [ 100, 66 ], [ 108, 71 ], [ 103, 73 ], [ 109, 73 ], [ 106, 73 ], [ 93, 76 ], [ 91, 78 ], [ 94, 78 ], [ 84, 85 ], [ 99, 88 ], [ 90, 91 ], [ 93, 94 ], [ 99, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "n,a,b = map(int , input().split())\ns = input()\nJudgment = 0\nrank = 0\noverseas=0\nfor num in range(n):\n if s[num] == 'a' and rank < a+b:\n print('Yes')\n rank = rank+1\n elif s[num] == 'b' and rank < a+b and overseas < b:\n print('Yes')\n rank = rank +1\n overseas = overseas + 1\n else:\n print('No')", "n,a,b = map(int , input().split())", "n", "map(int , input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "Judgment = 0", "Judgment", "0", "rank = 0", "rank", "0", "overseas=0", "overseas", "0", "for num in range(n):\n if s[num] == 'a' and rank < a+b:\n print('Yes')\n rank = rank+1\n elif s[num] == 'b' and rank < a+b and overseas < b:\n print('Yes')\n rank = rank +1\n overseas = overseas + 1\n else:\n print('No')", "num", "range(n)", "range", "n", "if s[num] == 'a' and rank < a+b:\n print('Yes')\n rank = rank+1\n elif s[num] == 'b' and rank < a+b and overseas < b:\n print('Yes')\n rank = rank +1\n overseas = overseas + 1\n else:\n print('No')", "s[num] == 'a' and rank < a+b", "s[num] == 'a'", "s[num]", "s", "num", "'a'", "rank < a+b", "rank", "a+b", "a", "b", "print('Yes')", "print", "'Yes'", "rank = rank+1", "rank", "rank+1", "rank", "1", "elif s[num] == 'b' and rank < a+b and overseas < b:\n print('Yes')\n rank = rank +1\n overseas = overseas + 1\n ", "s[num] == 'b' and rank < a+b and overseas < b", "s[num] == 'b' and rank < a+b", "s[num] == 'b'", "s[num]", "s", "num", "'b'", "rank < a+b", "rank", "a+b", "a", "b", "overseas < b", "overseas", "b", "print('Yes')", "print", "'Yes'", "rank = rank +1", "rank", "rank +1", "rank", "1", "overseas = overseas + 1", "overseas", "overseas + 1", "overseas", "1", "print('No')", "print", "'No'", "Judgment = 0", "0", "Judgment", "a,b = map(int , input().split())", "map(int , input().split())", "a", "overseas=0", "0", "overseas", "overseas = overseas + 1", "overseas + 1", "overseas", "n,a,b = map(int , input().split())", "map(int , input().split())", "n", "b = map(int , input().split())", "map(int , input().split())", "b", "rank = 0", "0", "rank", "rank = rank+1", "rank+1", "rank", "rank = rank +1", "rank +1", "rank", "s = input()", "input()", "s" ]
n,a,b = map(int , input().split()) s = input() Judgment = 0 rank = 0 overseas=0 for num in range(n): if s[num] == 'a' and rank < a+b: print('Yes') rank = rank+1 elif s[num] == 'b' and rank < a+b and overseas < b: print('Yes') rank = rank +1 overseas = overseas + 1 else: print('No')
[ 7, 15, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 2, 13, 13, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 13, 17, 14, 2, 2, 18, 13, 13, 17, 40, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 40, 13, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 108, 4 ], [ 108, 13 ], [ 108, 14 ], [ 111, 16 ], [ 96, 20 ], [ 99, 23 ], [ 88, 25 ], [ 109, 26 ], [ 102, 28 ], [ 32, 31 ], [ 94, 34 ], [ 112, 38 ], [ 31, 39 ], [ 112, 48 ], [ 31, 49 ], [ 103, 52 ], [ 106, 52 ], [ 91, 52 ], [ 100, 53 ], [ 90, 58 ], [ 112, 65 ], [ 31, 66 ], [ 97, 69 ], [ 115, 69 ], [ 109, 70 ], [ 103, 72 ], [ 106, 72 ], [ 91, 72 ], [ 100, 73 ], [ 105, 78 ], [ 114, 81 ], [ 108, 88 ], [ 90, 91 ], [ 108, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ] ]
[ "import math\na,b,c = map(int,input().split())\ns = input()\ng = 1\nd = b+c\nk = 1\nfor i in range(a):\n if s[i]=='c':\n print(\"No\")\n elif s[i] == 'a' and k<=d:\n print(\"Yes\")\n k+=1\n elif s[i] == 'b' and g<=c and k<=d:\n print(\"Yes\")\n k+=1\n g += 1\n else:\n print(\"No\")", "import math", "math", "a,b,c = map(int,input().split())", "a", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "b", "c", "s = input()", "s", "input()", "input", "g = 1", "g", "1", "d = b+c", "d", "b+c", "b", "c", "k = 1", "k", "1", "for i in range(a):\n if s[i]=='c':\n print(\"No\")\n elif s[i] == 'a' and k<=d:\n print(\"Yes\")\n k+=1\n elif s[i] == 'b' and g<=c and k<=d:\n print(\"Yes\")\n k+=1\n g += 1\n else:\n print(\"No\")", "i", "range(a)", "range", "a", "if s[i]=='c':\n print(\"No\")\n elif s[i] == 'a' and k<=d:\n print(\"Yes\")\n k+=1\n elif s[i] == 'b' and g<=c and k<=d:\n print(\"Yes\")\n k+=1\n g += 1\n else:\n print(\"No\")", "s[i]=='c'", "s[i]", "s", "i", "'c'", "print(\"No\")", "print", "\"No\"", "elif s[i] == 'a' and k<=d:\n print(\"Yes\")\n k+=1\n ", "s[i] == 'a' and k<=d", "s[i] == 'a'", "s[i]", "s", "i", "'a'", "k<=d", "k", "d", "print(\"Yes\")", "print", "\"Yes\"", "k+=1", "k", "1", "elif s[i] == 'b' and g<=c and k<=d:\n print(\"Yes\")\n k+=1\n g += 1\n ", "s[i] == 'b' and g<=c and k<=d", "s[i] == 'b' and g<=c", "s[i] == 'b'", "s[i]", "s", "i", "'b'", "g<=c", "g", "c", "k<=d", "k", "d", "print(\"Yes\")", "print", "\"Yes\"", "k+=1", "k", "1", "g += 1", "g", "1", "print(\"No\")", "print", "\"No\"", "b,c = map(int,input().split())", "map(int,input().split())", "b", "k+=1", "1", "k", "a,b,c = map(int,input().split())", "map(int,input().split())", "a", "g = 1", "1", "g", "d = b+c", "b+c", "d", "k = 1", "1", "k", "k+=1", "1", "k", "c = map(int,input().split())", "map(int,input().split())", "c", "s = input()", "input()", "s", "g += 1", "1", "g" ]
import math a,b,c = map(int,input().split()) s = input() g = 1 d = b+c k = 1 for i in range(a): if s[i]=='c': print("No") elif s[i] == 'a' and k<=d: print("Yes") k+=1 elif s[i] == 'b' and g<=c and k<=d: print("Yes") k+=1 g += 1 else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 39, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 13, 13, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 9, 28, 13, 13, 4, 13, 13, 10, 39, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 110, 2 ], [ 110, 11 ], [ 110, 12 ], [ 113, 14 ], [ 122, 18 ], [ 116, 21 ], [ 95, 24 ], [ 28, 27 ], [ 114, 27 ], [ 27, 31 ], [ 123, 35 ], [ 120, 35 ], [ 108, 35 ], [ 111, 37 ], [ 99, 38 ], [ 107, 40 ], [ 96, 44 ], [ 96, 49 ], [ 27, 54 ], [ 101, 57 ], [ 123, 62 ], [ 120, 62 ], [ 108, 62 ], [ 111, 64 ], [ 99, 65 ], [ 102, 67 ], [ 117, 67 ], [ 99, 68 ], [ 119, 70 ], [ 96, 74 ], [ 96, 79 ], [ 96, 84 ], [ 90, 89 ], [ 96, 89 ], [ 89, 93 ], [ 95, 96 ], [ 110, 99 ], [ 101, 102 ], [ 110, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\ntol = 0\nbcnt = 0\nans = []\nfor c in S:\n if c == 'a':\n if tol < (A+B):\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif c == 'b':\n bcnt += 1\n if tol < (A+B) and bcnt <= B:\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n else:\n ans.append('No')\n continue\nfor s in ans:\n print(s)", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "tol = 0", "tol", "0", "bcnt = 0", "bcnt", "0", "ans = []", "ans", "[]", "for c in S:\n if c == 'a':\n if tol < (A+B):\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif c == 'b':\n bcnt += 1\n if tol < (A+B) and bcnt <= B:\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n else:\n ans.append('No')\n continue", "c", "S", "if c == 'a':\n if tol < (A+B):\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif c == 'b':\n bcnt += 1\n if tol < (A+B) and bcnt <= B:\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n else:\n ans.append('No')\n continue", "c == 'a'", "c", "'a'", "if tol < (A+B):\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n ", "tol < (A+B)", "tol", "A+B", "A", "B", "tol += 1", "tol", "1", "ans.append('Yes')", "ans.append", "ans", "append", "'Yes'", "ans.append('No')", "ans.append", "ans", "append", "'No'", "elif c == 'b':\n bcnt += 1\n if tol < (A+B) and bcnt <= B:\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n ", "c == 'b'", "c", "'b'", "bcnt += 1", "bcnt", "1", "if tol < (A+B) and bcnt <= B:\n tol += 1\n ans.append('Yes')\n else:\n ans.append('No')\n ", "tol < (A+B) and bcnt <= B", "tol < (A+B)", "tol", "A+B", "A", "B", "bcnt <= B", "bcnt", "B", "tol += 1", "tol", "1", "ans.append('Yes')", "ans.append", "ans", "append", "'Yes'", "ans.append('No')", "ans.append", "ans", "append", "'No'", "ans.append('No')", "ans.append", "ans", "append", "'No'", "continue", "for s in ans:\n print(s)", "s", "ans", "print(s)", "print", "s", "ans = []", "[]", "ans", "B = map(int, input().split())", "map(int, input().split())", "B", "bcnt += 1", "1", "bcnt", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "tol += 1", "1", "tol", "A, B = map(int, input().split())", "map(int, input().split())", "A", "S = input()", "input()", "S", "bcnt = 0", "0", "bcnt", "tol += 1", "1", "tol", "tol = 0", "0", "tol" ]
N, A, B = map(int, input().split()) S = input() tol = 0 bcnt = 0 ans = [] for c in S: if c == 'a': if tol < (A+B): tol += 1 ans.append('Yes') else: ans.append('No') elif c == 'b': bcnt += 1 if tol < (A+B) and bcnt <= B: tol += 1 ans.append('Yes') else: ans.append('No') else: ans.append('No') continue for s in ans: print(s)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 105, 2 ], [ 105, 11 ], [ 105, 12 ], [ 96, 14 ], [ 84, 18 ], [ 99, 21 ], [ 25, 24 ], [ 103, 27 ], [ 97, 31 ], [ 24, 32 ], [ 97, 40 ], [ 24, 41 ], [ 85, 46 ], [ 91, 46 ], [ 88, 46 ], [ 106, 48 ], [ 82, 49 ], [ 100, 51 ], [ 94, 51 ], [ 82, 52 ], [ 87, 54 ], [ 93, 57 ], [ 85, 67 ], [ 91, 67 ], [ 88, 67 ], [ 106, 69 ], [ 82, 70 ], [ 90, 72 ], [ 105, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 105, 103 ], [ 105, 106 ] ]
[ "n,a,b=map(int,input().split())\ns=input()\ncounta=0\ncountb=0\nfor i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"b\":\n if counta<a+b and countb<b:\n counta+=1\n countb+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n if counta<a+b:\n counta+=1\n print(\"Yes\")\n else:\n print(\"No\")", "n,a,b=map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s=input()", "s", "input()", "input", "counta=0", "counta", "0", "countb=0", "countb", "0", "for i in range(n):\n if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"b\":\n if counta<a+b and countb<b:\n counta+=1\n countb+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n if counta<a+b:\n counta+=1\n print(\"Yes\")\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i]==\"c\":\n print(\"No\")\n elif s[i]==\"b\":\n if counta<a+b and countb<b:\n counta+=1\n countb+=1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n if counta<a+b:\n counta+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s[i]==\"c\"", "s[i]", "s", "i", "\"c\"", "print(\"No\")", "print", "\"No\"", "elif s[i]==\"b\":\n if counta<a+b and countb<b:\n counta+=1\n countb+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i]==\"b\"", "s[i]", "s", "i", "\"b\"", "if counta<a+b and countb<b:\n counta+=1\n countb+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "counta<a+b and countb<b", "counta<a+b", "counta", "a+b", "a", "b", "countb<b", "countb", "b", "counta+=1", "counta", "1", "countb+=1", "countb", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if counta<a+b:\n counta+=1\n print(\"Yes\")\n else:\n print(\"No\")", "counta<a+b", "counta", "a+b", "a", "b", "counta+=1", "counta", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "b=map(int,input().split())", "map(int,input().split())", "b", "counta=0", "0", "counta", "counta+=1", "1", "counta", "counta+=1", "1", "counta", "countb+=1", "1", "countb", "s=input()", "input()", "s", "countb=0", "0", "countb", "n,a,b=map(int,input().split())", "map(int,input().split())", "n", "a,b=map(int,input().split())", "map(int,input().split())", "a" ]
n,a,b=map(int,input().split()) s=input() counta=0 countb=0 for i in range(n): if s[i]=="c": print("No") elif s[i]=="b": if counta<a+b and countb<b: counta+=1 countb+=1 print("Yes") else: print("No") else: if counta<a+b: counta+=1 print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 0, 13, 40, 13, 2, 13, 13, 14, 2, 2, 13, 17, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 40, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 83, 2 ], [ 83, 11 ], [ 83, 12 ], [ 80, 14 ], [ 74, 18 ], [ 92, 21 ], [ 25, 24 ], [ 81, 24 ], [ 77, 27 ], [ 75, 29 ], [ 90, 29 ], [ 96, 29 ], [ 84, 31 ], [ 72, 32 ], [ 24, 36 ], [ 78, 38 ], [ 95, 43 ], [ 24, 49 ], [ 78, 51 ], [ 93, 53 ], [ 87, 53 ], [ 72, 54 ], [ 89, 59 ], [ 86, 62 ], [ 83, 69 ], [ 83, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "#!/usr/local/bin/python3\n\nN, A, B = map(int, input().split())\nS = input()\ncur_rank = 1\nworld_cur_rank = 1\n\nfor s in S:\n pass_cond = cur_rank <= A+B\n if s == 'a' and pass_cond:\n print('Yes')\n cur_rank += 1\n elif s == 'b' and pass_cond and world_cur_rank <= B:\n print('Yes')\n cur_rank += 1\n world_cur_rank += 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "cur_rank = 1", "cur_rank", "1", "world_cur_rank = 1", "world_cur_rank", "1", "for s in S:\n pass_cond = cur_rank <= A+B\n if s == 'a' and pass_cond:\n print('Yes')\n cur_rank += 1\n elif s == 'b' and pass_cond and world_cur_rank <= B:\n print('Yes')\n cur_rank += 1\n world_cur_rank += 1\n else:\n print('No')", "s", "S", "pass_cond = cur_rank <= A+B", "pass_cond", "cur_rank <= A+B", "cur_rank", "A+B", "A", "B", "if s == 'a' and pass_cond:\n print('Yes')\n cur_rank += 1\n elif s == 'b' and pass_cond and world_cur_rank <= B:\n print('Yes')\n cur_rank += 1\n world_cur_rank += 1\n else:\n print('No')", "s == 'a' and pass_cond", "s == 'a'", "s", "'a'", "pass_cond", "print('Yes')", "print", "'Yes'", "cur_rank += 1", "cur_rank", "1", "elif s == 'b' and pass_cond and world_cur_rank <= B:\n print('Yes')\n cur_rank += 1\n world_cur_rank += 1\n ", "s == 'b' and pass_cond and world_cur_rank <= B", "s == 'b' and pass_cond", "s == 'b'", "s", "'b'", "pass_cond", "world_cur_rank <= B", "world_cur_rank", "B", "print('Yes')", "print", "'Yes'", "cur_rank += 1", "cur_rank", "1", "world_cur_rank += 1", "world_cur_rank", "1", "print('No')", "print", "'No'", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "B = map(int, input().split())", "map(int, input().split())", "B", "cur_rank = 1", "1", "cur_rank", "pass_cond = cur_rank <= A+B", "cur_rank <= A+B", "pass_cond", "S = input()", "input()", "S", "A, B = map(int, input().split())", "map(int, input().split())", "A", "world_cur_rank += 1", "1", "world_cur_rank", "cur_rank += 1", "1", "cur_rank", "world_cur_rank = 1", "1", "world_cur_rank", "cur_rank += 1", "1", "cur_rank" ]
#!/usr/local/bin/python3 N, A, B = map(int, input().split()) S = input() cur_rank = 1 world_cur_rank = 1 for s in S: pass_cond = cur_rank <= A+B if s == 'a' and pass_cond: print('Yes') cur_rank += 1 elif s == 'b' and pass_cond and world_cur_rank <= B: print('Yes') cur_rank += 1 world_cur_rank += 1 else: print('No')
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 13, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 4, 3 ], [ 3, 12 ], [ 95, 14 ], [ 95, 16 ], [ 95, 17 ], [ 89, 19 ], [ 101, 23 ], [ 98, 25 ], [ 29, 28 ], [ 90, 28 ], [ 28, 32 ], [ 102, 37 ], [ 84, 37 ], [ 99, 38 ], [ 87, 38 ], [ 81, 40 ], [ 96, 41 ], [ 83, 46 ], [ 28, 53 ], [ 102, 59 ], [ 84, 59 ], [ 99, 60 ], [ 87, 60 ], [ 81, 62 ], [ 96, 63 ], [ 99, 65 ], [ 87, 65 ], [ 96, 66 ], [ 86, 71 ], [ 95, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 95, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ] ]
[ "N, A, B = [int(_) for _ in input().split()]\nS = input()\n\nca, cb = 0, 0\nfor s in S:\n if s == \"a\":\n if ca + cb < A + B:\n print(\"Yes\")\n ca += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ca + cb < A + B and cb < B:\n print(\"Yes\")\n cb += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "int(_) for _ in input().split()", "for _ in input().split()", "_", "input().split()", "().split", "()", "input", "split", "for _ in input().split()", "int(_)", "int", "_", "N, A, B = [int(_) for _ in input().split()]", "N", "[int(_) for _ in input().split()]", "A", "B", "S = input()", "S", "input()", "input", "ca, cb = 0, 0", "ca", "0", "cb", "0", "for s in S:\n if s == \"a\":\n if ca + cb < A + B:\n print(\"Yes\")\n ca += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ca + cb < A + B and cb < B:\n print(\"Yes\")\n cb += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s", "S", "if s == \"a\":\n if ca + cb < A + B:\n print(\"Yes\")\n ca += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ca + cb < A + B and cb < B:\n print(\"Yes\")\n cb += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "s == \"a\"", "s", "\"a\"", "if ca + cb < A + B:\n print(\"Yes\")\n ca += 1\n else:\n print(\"No\")\n ", "ca + cb < A + B", "ca + cb", "ca", "cb", "A + B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "ca += 1", "ca", "1", "print(\"No\")", "print", "\"No\"", "elif s == \"b\":\n if ca + cb < A + B and cb < B:\n print(\"Yes\")\n cb += 1\n else:\n print(\"No\")\n ", "s == \"b\"", "s", "\"b\"", "if ca + cb < A + B and cb < B:\n print(\"Yes\")\n cb += 1\n else:\n print(\"No\")\n ", "ca + cb < A + B and cb < B", "ca + cb < A + B", "ca + cb", "ca", "cb", "A + B", "A", "B", "cb < B", "cb", "B", "print(\"Yes\")", "print", "\"Yes\"", "cb += 1", "cb", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "A, B = [int(_) for _ in input().split()]", "[int(_) for _ in input().split()]", "A", "ca += 1", "1", "ca", "cb += 1", "1", "cb", "S = input()", "input()", "S", "N, A, B = [int(_) for _ in input().split()]", "[int(_) for _ in input().split()]", "N", "B = [int(_) for _ in input().split()]", "[int(_) for _ in input().split()]", "B", "cb = 0, 0", "0", "cb", "ca, cb = 0, 0", "0", "ca" ]
N, A, B = [int(_) for _ in input().split()] S = input() ca, cb = 0, 0 for s in S: if s == "a": if ca + cb < A + B: print("Yes") ca += 1 else: print("No") elif s == "b": if ca + cb < A + B and cb < B: print("Yes") cb += 1 else: print("No") else: print("No")
[ 7, 12, 13, 29, 2, 13, 2, 13, 13, 23, 13, 23, 13, 23, 13, 12, 13, 29, 2, 2, 13, 2, 13, 13, 2, 13, 13, 23, 13, 23, 13, 23, 13, 23, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 14, 2, 13, 17, 14, 4, 13, 13, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 4, 13, 13, 13, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 10, 5 ], [ 12, 7 ], [ 14, 8 ], [ 10, 10 ], [ 12, 12 ], [ 14, 14 ], [ 28, 20 ], [ 30, 22 ], [ 32, 23 ], [ 34, 25 ], [ 32, 26 ], [ 28, 28 ], [ 30, 30 ], [ 32, 32 ], [ 34, 34 ], [ 39, 38 ], [ 39, 47 ], [ 39, 48 ], [ 51, 50 ], [ 57, 56 ], [ 60, 59 ], [ 50, 66 ], [ 119, 73 ], [ 56, 74 ], [ 101, 74 ], [ 81, 74 ], [ 47, 75 ], [ 48, 76 ], [ 82, 81 ], [ 122, 92 ], [ 56, 93 ], [ 101, 93 ], [ 81, 93 ], [ 47, 94 ], [ 48, 95 ], [ 59, 96 ], [ 104, 96 ], [ 102, 101 ], [ 105, 104 ], [ 116, 113 ] ]
[ "def check_jp(passed, A, B):\n return passed < A + B\n\n\ndef check_foreign(passed, A, B, passed_b):\n return passed < A + B and passed_b < B\n\n\ndef resolve():\n N, A, B = map(int, input().split())\n S = list(input())\n\n passed = 0\n passed_b = 0\n for i, p in enumerate(S):\n if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")\n\nresolve()", "def check_jp(passed, A, B):\n return passed < A + B", "check_jp", "return passed < A + B", "passed < A + B", "passed", "A + B", "A", "B", "passed", "passed", "A", "A", "B", "B", "def check_foreign(passed, A, B, passed_b):\n return passed < A + B and passed_b < B", "check_foreign", "return passed < A + B and passed_b < B", "passed < A + B and passed_b < B", "passed < A + B", "passed", "A + B", "A", "B", "passed_b < B", "passed_b", "B", "passed", "passed", "A", "A", "B", "B", "passed_b", "passed_b", "def resolve():\n N, A, B = map(int, input().split())\n S = list(input())\n\n passed = 0\n passed_b = 0\n for i, p in enumerate(S):\n if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "resolve", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = list(input())", "S", "list(input())", "list", "input()", "input", "passed = 0", "passed", "0", "passed_b = 0", "passed_b", "0", "for i, p in enumerate(S):\n if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "p", "enumerate(S)", "enumerate", "S", "if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "p == \"a\"", "p", "\"a\"", "if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n ", "check_jp(passed, A, B)", "check_jp", "passed", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "print(\"No\")", "print", "\"No\"", "elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n ", "p == \"b\"", "p", "\"b\"", "if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n ", "check_foreign(passed, A, B, passed_b)", "check_foreign", "passed", "A", "B", "passed_b", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "passed_b += 1", "passed_b", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "resolve()", "resolve", "def resolve():\n N, A, B = map(int, input().split())\n S = list(input())\n\n passed = 0\n passed_b = 0\n for i, p in enumerate(S):\n if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "def resolve():\n N, A, B = map(int, input().split())\n S = list(input())\n\n passed = 0\n passed_b = 0\n for i, p in enumerate(S):\n if p == \"a\":\n if check_jp(passed, A, B):\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n elif p == \"b\":\n if check_foreign(passed, A, B, passed_b):\n print(\"Yes\")\n passed += 1\n passed_b += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "resolve", "def check_jp(passed, A, B):\n return passed < A + B", "def check_jp(passed, A, B):\n return passed < A + B", "check_jp", "def check_foreign(passed, A, B, passed_b):\n return passed < A + B and passed_b < B", "def check_foreign(passed, A, B, passed_b):\n return passed < A + B and passed_b < B", "check_foreign" ]
def check_jp(passed, A, B): return passed < A + B def check_foreign(passed, A, B, passed_b): return passed < A + B and passed_b < B def resolve(): N, A, B = map(int, input().split()) S = list(input()) passed = 0 passed_b = 0 for i, p in enumerate(S): if p == "a": if check_jp(passed, A, B): print("Yes") passed += 1 else: print("No") elif p == "b": if check_foreign(passed, A, B, passed_b): print("Yes") passed += 1 passed_b += 1 else: print("No") else: print("No") resolve()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 81, 2 ], [ 81, 11 ], [ 81, 12 ], [ 96, 14 ], [ 90, 18 ], [ 84, 21 ], [ 25, 24 ], [ 97, 24 ], [ 24, 28 ], [ 91, 32 ], [ 88, 32 ], [ 100, 32 ], [ 79, 34 ], [ 82, 35 ], [ 99, 40 ], [ 24, 47 ], [ 91, 52 ], [ 88, 52 ], [ 100, 52 ], [ 79, 54 ], [ 82, 55 ], [ 85, 57 ], [ 94, 57 ], [ 82, 58 ], [ 87, 63 ], [ 93, 66 ], [ 81, 76 ], [ 81, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n\ncount_all = 0\ncount_f = 0\nfor i in S:\n if i == 'a':\n if count_all < A + B:\n print('Yes')\n count_all += 1\n else:\n print('No')\n elif i == 'b':\n if count_all < A + B and count_f < B:\n print('Yes')\n count_all += 1\n count_f += 1\n else:\n print('No')\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "count_all = 0", "count_all", "0", "count_f = 0", "count_f", "0", "for i in S:\n if i == 'a':\n if count_all < A + B:\n print('Yes')\n count_all += 1\n else:\n print('No')\n elif i == 'b':\n if count_all < A + B and count_f < B:\n print('Yes')\n count_all += 1\n count_f += 1\n else:\n print('No')\n else:\n print('No')", "i", "S", "if i == 'a':\n if count_all < A + B:\n print('Yes')\n count_all += 1\n else:\n print('No')\n elif i == 'b':\n if count_all < A + B and count_f < B:\n print('Yes')\n count_all += 1\n count_f += 1\n else:\n print('No')\n else:\n print('No')", "i == 'a'", "i", "'a'", "if count_all < A + B:\n print('Yes')\n count_all += 1\n else:\n print('No')\n ", "count_all < A + B", "count_all", "A + B", "A", "B", "print('Yes')", "print", "'Yes'", "count_all += 1", "count_all", "1", "print('No')", "print", "'No'", "elif i == 'b':\n if count_all < A + B and count_f < B:\n print('Yes')\n count_all += 1\n count_f += 1\n else:\n print('No')\n ", "i == 'b'", "i", "'b'", "if count_all < A + B and count_f < B:\n print('Yes')\n count_all += 1\n count_f += 1\n else:\n print('No')\n ", "count_all < A + B and count_f < B", "count_all < A + B", "count_all", "A + B", "A", "B", "count_f < B", "count_f", "B", "print('Yes')", "print", "'Yes'", "count_all += 1", "count_all", "1", "count_f += 1", "count_f", "1", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "count_f = 0", "0", "count_f", "count_all += 1", "1", "count_all", "count_all = 0", "0", "count_all", "count_f += 1", "1", "count_f", "S = input()", "input()", "S", "count_all += 1", "1", "count_all" ]
N, A, B = map(int, input().split()) S = input() count_all = 0 count_f = 0 for i in S: if i == 'a': if count_all < A + B: print('Yes') count_all += 1 else: print('No') elif i == 'b': if count_all < A + B and count_f < B: print('Yes') count_all += 1 count_f += 1 else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 93, 2 ], [ 93, 11 ], [ 93, 12 ], [ 78, 14 ], [ 72, 18 ], [ 75, 21 ], [ 25, 24 ], [ 79, 24 ], [ 24, 29 ], [ 73, 32 ], [ 85, 32 ], [ 82, 32 ], [ 94, 34 ], [ 88, 35 ], [ 81, 37 ], [ 24, 46 ], [ 73, 49 ], [ 85, 49 ], [ 82, 49 ], [ 94, 51 ], [ 88, 52 ], [ 76, 54 ], [ 70, 54 ], [ 88, 55 ], [ 84, 57 ], [ 69, 60 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 93, 88 ], [ 93, 91 ], [ 93, 94 ] ]
[ "n,a,b = map(int,input().split())\ns = input()\nc_a = 0\nc_b = 0\n\nfor v in s:\n if v == 'a' and c_a < a+b:\n c_a += 1\n print('Yes')\n elif v == 'b' and c_a < a+b and c_b < b:\n c_a += 1\n c_b += 1\n print('Yes')\n else:\n print('No')", "n,a,b = map(int,input().split())", "n", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "c_a = 0", "c_a", "0", "c_b = 0", "c_b", "0", "for v in s:\n if v == 'a' and c_a < a+b:\n c_a += 1\n print('Yes')\n elif v == 'b' and c_a < a+b and c_b < b:\n c_a += 1\n c_b += 1\n print('Yes')\n else:\n print('No')", "v", "s", "if v == 'a' and c_a < a+b:\n c_a += 1\n print('Yes')\n elif v == 'b' and c_a < a+b and c_b < b:\n c_a += 1\n c_b += 1\n print('Yes')\n else:\n print('No')", "v == 'a' and c_a < a+b", "v == 'a'", "v", "'a'", "c_a < a+b", "c_a", "a+b", "a", "b", "c_a += 1", "c_a", "1", "print('Yes')", "print", "'Yes'", "elif v == 'b' and c_a < a+b and c_b < b:\n c_a += 1\n c_b += 1\n print('Yes')\n ", "v == 'b' and c_a < a+b and c_b < b", "v == 'b' and c_a < a+b", "v == 'b'", "v", "'b'", "c_a < a+b", "c_a", "a+b", "a", "b", "c_b < b", "c_b", "b", "c_a += 1", "c_a", "1", "c_b += 1", "c_b", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "c_b += 1", "1", "c_b", "c_a = 0", "0", "c_a", "c_b = 0", "0", "c_b", "s = input()", "input()", "s", "c_a += 1", "1", "c_a", "c_a += 1", "1", "c_a", "b = map(int,input().split())", "map(int,input().split())", "b", "n,a,b = map(int,input().split())", "map(int,input().split())", "n", "a,b = map(int,input().split())", "map(int,input().split())", "a" ]
n,a,b = map(int,input().split()) s = input() c_a = 0 c_b = 0 for v in s: if v == 'a' and c_a < a+b: c_a += 1 print('Yes') elif v == 'b' and c_a < a+b and c_b < b: c_a += 1 c_b += 1 print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 86, 2 ], [ 86, 11 ], [ 86, 12 ], [ 89, 14 ], [ 74, 18 ], [ 92, 20 ], [ 24, 23 ], [ 90, 23 ], [ 23, 28 ], [ 75, 31 ], [ 69, 31 ], [ 78, 31 ], [ 72, 33 ], [ 87, 34 ], [ 77, 39 ], [ 23, 45 ], [ 75, 48 ], [ 69, 48 ], [ 78, 48 ], [ 72, 50 ], [ 87, 51 ], [ 93, 53 ], [ 81, 53 ], [ 87, 54 ], [ 68, 59 ], [ 80, 62 ], [ 68, 69 ], [ 86, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 86, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\ncnt1, cnt2 = 0, 1\n\nfor Si in S:\n if Si=='a' and cnt1<A+B:\n print('Yes')\n cnt1 += 1\n elif Si=='b' and cnt1<A+B and cnt2<=B:\n print('Yes')\n cnt1 += 1\n cnt2 += 1\n else:\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "cnt1, cnt2 = 0, 1", "cnt1", "0", "cnt2", "1", "for Si in S:\n if Si=='a' and cnt1<A+B:\n print('Yes')\n cnt1 += 1\n elif Si=='b' and cnt1<A+B and cnt2<=B:\n print('Yes')\n cnt1 += 1\n cnt2 += 1\n else:\n print('No')", "Si", "S", "if Si=='a' and cnt1<A+B:\n print('Yes')\n cnt1 += 1\n elif Si=='b' and cnt1<A+B and cnt2<=B:\n print('Yes')\n cnt1 += 1\n cnt2 += 1\n else:\n print('No')", "Si=='a' and cnt1<A+B", "Si=='a'", "Si", "'a'", "cnt1<A+B", "cnt1", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "cnt1 += 1", "cnt1", "1", "elif Si=='b' and cnt1<A+B and cnt2<=B:\n print('Yes')\n cnt1 += 1\n cnt2 += 1\n ", "Si=='b' and cnt1<A+B and cnt2<=B", "Si=='b' and cnt1<A+B", "Si=='b'", "Si", "'b'", "cnt1<A+B", "cnt1", "A+B", "A", "B", "cnt2<=B", "cnt2", "B", "print('Yes')", "print", "'Yes'", "cnt1 += 1", "cnt1", "1", "cnt2 += 1", "cnt2", "1", "print('No')", "print", "'No'", "cnt1 += 1", "1", "cnt1", "A, B = map(int, input().split())", "map(int, input().split())", "A", "cnt1, cnt2 = 0, 1", "0", "cnt1", "cnt1 += 1", "1", "cnt1", "cnt2 += 1", "1", "cnt2", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "B = map(int, input().split())", "map(int, input().split())", "B", "S = input()", "input()", "S", "cnt2 = 0, 1", "1", "cnt2" ]
N, A, B = map(int, input().split()) S = input() cnt1, cnt2 = 0, 1 for Si in S: if Si=='a' and cnt1<A+B: print('Yes') cnt1 += 1 elif Si=='b' and cnt1<A+B and cnt2<=B: print('Yes') cnt1 += 1 cnt2 += 1 else: print('No')
[ 7, 15, 13, 15, 13, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 9, 8 ], [ 9, 17 ], [ 9, 18 ], [ 21, 20 ], [ 25, 24 ], [ 28, 27 ], [ 31, 30 ], [ 8, 33 ], [ 20, 38 ], [ 30, 39 ], [ 24, 42 ], [ 69, 42 ], [ 47, 42 ], [ 17, 44 ], [ 18, 45 ], [ 48, 47 ], [ 20, 57 ], [ 30, 58 ], [ 24, 61 ], [ 69, 61 ], [ 47, 61 ], [ 17, 63 ], [ 18, 64 ], [ 27, 66 ], [ 72, 66 ], [ 18, 67 ], [ 70, 69 ], [ 73, 72 ], [ 88, 85 ] ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# FileName: \tB\n# CreatedDate: 2020-06-25 13:44:41 +0900\n# LastModified: 2020-06-25 13:54:38 +0900\n#\n\n\nimport os\nimport sys\n# import numpy as np\n# import pandas as pd\n\n\ndef main():\n n, a, b = map(int, input().split())\n s = input()\n win = 0\n foreign = 0\n for i in range(n):\n if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n\n\nif __name__ == \"__main__\":\n main()", "import os", "os", "import sys", "sys", "def main():\n n, a, b = map(int, input().split())\n s = input()\n win = 0\n foreign = 0\n for i in range(n):\n if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "main", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "win = 0", "win", "0", "foreign = 0", "foreign", "0", "for i in range(n):\n if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "i", "range(n)", "range", "n", "if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "s[i] == 'a' and win < a+b", "s[i] == 'a'", "s[i]", "s", "i", "'a'", "win < a+b", "win", "a+b", "a", "b", "win += 1", "win", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n ", "s[i] == 'b' and win < a+b and foreign < b", "s[i] == 'b' and win < a+b", "s[i] == 'b'", "s[i]", "s", "i", "'b'", "win < a+b", "win", "a+b", "a", "b", "foreign < b", "foreign", "b", "win += 1", "win", "1", "foreign += 1", "foreign", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if __name__ == \"__main__\":\n main()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "main()", "main", "def main():\n n, a, b = map(int, input().split())\n s = input()\n win = 0\n foreign = 0\n for i in range(n):\n if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "def main():\n n, a, b = map(int, input().split())\n s = input()\n win = 0\n foreign = 0\n for i in range(n):\n if s[i] == 'a' and win < a+b:\n win += 1\n print(\"Yes\")\n\n elif s[i] == 'b' and win < a+b and foreign < b:\n win += 1\n foreign += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ", "main" ]
#!/usr/bin/env python # -*- coding: utf-8 -*- # # FileName: B # CreatedDate: 2020-06-25 13:44:41 +0900 # LastModified: 2020-06-25 13:54:38 +0900 # import os import sys # import numpy as np # import pandas as pd def main(): n, a, b = map(int, input().split()) s = input() win = 0 foreign = 0 for i in range(n): if s[i] == 'a' and win < a+b: win += 1 print("Yes") elif s[i] == 'b' and win < a+b and foreign < b: win += 1 foreign += 1 print("Yes") else: print("No") if __name__ == "__main__": main()
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 13, 17, 28, 13, 13, 0, 13, 17, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 94, 2 ], [ 94, 11 ], [ 94, 12 ], [ 76, 14 ], [ 97, 20 ], [ 103, 22 ], [ 26, 25 ], [ 77, 25 ], [ 73, 28 ], [ 25, 32 ], [ 98, 36 ], [ 89, 36 ], [ 83, 36 ], [ 86, 38 ], [ 95, 39 ], [ 106, 41 ], [ 82, 44 ], [ 25, 48 ], [ 98, 53 ], [ 89, 53 ], [ 83, 53 ], [ 86, 55 ], [ 95, 56 ], [ 104, 58 ], [ 101, 58 ], [ 95, 59 ], [ 91, 61 ], [ 88, 64 ], [ 100, 67 ], [ 92, 71 ], [ 107, 71 ], [ 74, 71 ], [ 73, 74 ], [ 76, 77 ], [ 94, 80 ], [ 82, 83 ], [ 94, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ] ]
[ "n, a, b = map(int, input().split())\nS = list(input())\n\ncount_all, count_b = 0, 0\nfor s in S:\n ans = \"No\"\n if s == \"a\":\n if count_all < a + b:\n ans = \"Yes\"\n count_all += 1\n elif s == \"b\":\n if count_all < a + b and count_b < b:\n ans = \"Yes\"\n count_all += 1\n count_b += 1\n print(ans)", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "S = list(input())", "S", "list(input())", "list", "input()", "input", "count_all, count_b = 0, 0", "count_all", "0", "count_b", "0", "for s in S:\n ans = \"No\"\n if s == \"a\":\n if count_all < a + b:\n ans = \"Yes\"\n count_all += 1\n elif s == \"b\":\n if count_all < a + b and count_b < b:\n ans = \"Yes\"\n count_all += 1\n count_b += 1\n print(ans)", "s", "S", "ans = \"No\"", "ans", "\"No\"", "if s == \"a\":\n if count_all < a + b:\n ans = \"Yes\"\n count_all += 1\n elif s == \"b\":\n if count_all < a + b and count_b < b:\n ans = \"Yes\"\n count_all += 1\n count_b += 1\n ", "s == \"a\"", "s", "\"a\"", "if count_all < a + b:\n ans = \"Yes\"\n count_all += 1\n ", "count_all < a + b", "count_all", "a + b", "a", "b", "ans = \"Yes\"", "ans", "\"Yes\"", "count_all += 1", "count_all", "1", "elif s == \"b\":\n if count_all < a + b and count_b < b:\n ans = \"Yes\"\n count_all += 1\n count_b += 1\n ", "s == \"b\"", "s", "\"b\"", "if count_all < a + b and count_b < b:\n ans = \"Yes\"\n count_all += 1\n count_b += 1\n ", "count_all < a + b and count_b < b", "count_all < a + b", "count_all", "a + b", "a", "b", "count_b < b", "count_b", "b", "ans = \"Yes\"", "ans", "\"Yes\"", "count_all += 1", "count_all", "1", "count_b += 1", "count_b", "1", "print(ans)", "print", "ans", "ans = \"No\"", "\"No\"", "ans", "S = list(input())", "list(input())", "S", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "count_all += 1", "1", "count_all", "a, b = map(int, input().split())", "map(int, input().split())", "a", "count_all += 1", "1", "count_all", "ans = \"Yes\"", "\"Yes\"", "ans", "b = map(int, input().split())", "map(int, input().split())", "b", "count_all, count_b = 0, 0", "0", "count_all", "count_b += 1", "1", "count_b", "count_b = 0, 0", "0", "count_b", "ans = \"Yes\"", "\"Yes\"", "ans" ]
n, a, b = map(int, input().split()) S = list(input()) count_all, count_b = 0, 0 for s in S: ans = "No" if s == "a": if count_all < a + b: ans = "Yes" count_all += 1 elif s == "b": if count_all < a + b and count_b < b: ans = "Yes" count_all += 1 count_b += 1 print(ans)
[ 7, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 0, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 39, 41, 28, 13, 4, 13, 4, 13, 13, 4, 17, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 4, 13, 13, 14, 2, 13, 17, 0, 18, 13, 13, 13, 0, 13, 17, 28, 13, 13, 4, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 18, 13, 13, 13, 4, 18, 13, 13, 17, 0, 13, 17, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 28, 13, 13, 4, 13, 13, 10, 13, 13, 10, 17, 13, 10, 13, 13, 10, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 39, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13 ]
[ [ 4, 3 ], [ 3, 12 ], [ 141, 14 ], [ 141, 16 ], [ 141, 17 ], [ 147, 19 ], [ 153, 23 ], [ 28, 27 ], [ 148, 32 ], [ 159, 36 ], [ 144, 39 ], [ 156, 42 ], [ 148, 49 ], [ 58, 55 ], [ 160, 56 ], [ 157, 58 ], [ 163, 58 ], [ 162, 60 ], [ 148, 67 ], [ 145, 74 ], [ 151, 74 ], [ 136, 74 ], [ 142, 76 ], [ 139, 77 ], [ 154, 80 ], [ 135, 84 ], [ 154, 88 ], [ 145, 98 ], [ 151, 98 ], [ 136, 98 ], [ 142, 100 ], [ 139, 101 ], [ 55, 103 ], [ 160, 104 ], [ 139, 106 ], [ 154, 109 ], [ 150, 113 ], [ 154, 117 ], [ 154, 122 ], [ 127, 126 ], [ 154, 126 ], [ 126, 130 ], [ 141, 133 ], [ 135, 136 ], [ 141, 139 ], [ 141, 142 ], [ 144, 145 ], [ 147, 148 ], [ 150, 151 ], [ 153, 154 ], [ 156, 157 ], [ 159, 160 ], [ 162, 163 ] ]
[ "n, a, b = [int(x) for x in input().split()]\ns = input()\n\nwinners = []\nforeign_winners = [0 for _ in range(len(s))]\nwinner_count = 0\n\nforeign_score = 1\nfor i, c in enumerate(s):\n if c == 'b':\n foreign_winners[i] = foreign_score\n foreign_score += 1\n\nfor i, c in enumerate(s):\n if c == 'a':\n if winner_count < a+b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n elif c == 'b':\n if winner_count < a+b and foreign_winners[i] <= b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n else:\n winners.append(\"No\")\n\nfor l in winners:\n print(l)", "int(x) for x in input().split()", "for x in input().split()", "x", "input().split()", "().split", "()", "input", "split", "for x in input().split()", "int(x)", "int", "x", "n, a, b = [int(x) for x in input().split()]", "n", "[int(x) for x in input().split()]", "a", "b", "s = input()", "s", "input()", "input", "winners = []", "winners", "[]", "0 for _ in range(len(s))", "for _ in range(len(s))", "_", "range(len(s))", "range", "len(s)", "len", "s", "for _ in range(len(s))", "0", "foreign_winners = [0 for _ in range(len(s))]", "foreign_winners", "[0 for _ in range(len(s))]", "winner_count = 0", "winner_count", "0", "foreign_score = 1", "foreign_score", "1", "for i, c in enumerate(s):\n if c == 'b':\n foreign_winners[i] = foreign_score\n foreign_score += 1", "i", "c", "enumerate(s)", "enumerate", "s", "if c == 'b':\n foreign_winners[i] = foreign_score\n foreign_score += 1", "c == 'b'", "c", "'b'", "foreign_winners[i] = foreign_score", "foreign_winners[i]", "foreign_winners", "i", "foreign_score", "foreign_score += 1", "foreign_score", "1", "for i, c in enumerate(s):\n if c == 'a':\n if winner_count < a+b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n elif c == 'b':\n if winner_count < a+b and foreign_winners[i] <= b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n else:\n winners.append(\"No\")", "i", "c", "enumerate(s)", "enumerate", "s", "if c == 'a':\n if winner_count < a+b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n elif c == 'b':\n if winner_count < a+b and foreign_winners[i] <= b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n else:\n winners.append(\"No\")", "c == 'a'", "c", "'a'", "if winner_count < a+b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n ", "winner_count < a+b", "winner_count", "a+b", "a", "b", "winners.append(\"Yes\")", "winners.append", "winners", "append", "\"Yes\"", "winner_count += 1", "winner_count", "1", "winners.append(\"No\")", "winners.append", "winners", "append", "\"No\"", "elif c == 'b':\n if winner_count < a+b and foreign_winners[i] <= b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n ", "c == 'b'", "c", "'b'", "if winner_count < a+b and foreign_winners[i] <= b:\n winners.append(\"Yes\")\n winner_count += 1\n else:\n winners.append(\"No\")\n ", "winner_count < a+b and foreign_winners[i] <= b", "winner_count < a+b", "winner_count", "a+b", "a", "b", "foreign_winners[i] <= b", "foreign_winners[i]", "foreign_winners", "i", "b", "winners.append(\"Yes\")", "winners.append", "winners", "append", "\"Yes\"", "winner_count += 1", "winner_count", "1", "winners.append(\"No\")", "winners.append", "winners", "append", "\"No\"", "winners.append(\"No\")", "winners.append", "winners", "append", "\"No\"", "for l in winners:\n print(l)", "l", "winners", "print(l)", "print", "l", "n, a, b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "n", "winner_count += 1", "1", "winner_count", "b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "b", "a, b = [int(x) for x in input().split()]", "[int(x) for x in input().split()]", "a", "winner_count = 0", "0", "winner_count", "s = input()", "input()", "s", "winner_count += 1", "1", "winner_count", "winners = []", "[]", "winners", "foreign_score = 1", "1", "foreign_score", "foreign_winners = [0 for _ in range(len(s))]", "[0 for _ in range(len(s))]", "foreign_winners", "foreign_score += 1", "1", "foreign_score" ]
n, a, b = [int(x) for x in input().split()] s = input() winners = [] foreign_winners = [0 for _ in range(len(s))] winner_count = 0 foreign_score = 1 for i, c in enumerate(s): if c == 'b': foreign_winners[i] = foreign_score foreign_score += 1 for i, c in enumerate(s): if c == 'a': if winner_count < a+b: winners.append("Yes") winner_count += 1 else: winners.append("No") elif c == 'b': if winner_count < a+b and foreign_winners[i] <= b: winners.append("Yes") winner_count += 1 else: winners.append("No") else: winners.append("No") for l in winners: print(l)
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 97, 2 ], [ 97, 11 ], [ 97, 12 ], [ 88, 14 ], [ 100, 20 ], [ 103, 23 ], [ 27, 26 ], [ 89, 26 ], [ 26, 30 ], [ 101, 35 ], [ 83, 35 ], [ 104, 36 ], [ 92, 36 ], [ 95, 38 ], [ 98, 39 ], [ 82, 44 ], [ 26, 51 ], [ 101, 57 ], [ 83, 57 ], [ 104, 58 ], [ 92, 58 ], [ 95, 60 ], [ 98, 61 ], [ 104, 63 ], [ 92, 63 ], [ 98, 64 ], [ 91, 69 ], [ 26, 76 ], [ 82, 83 ], [ 97, 86 ], [ 88, 89 ], [ 91, 92 ], [ 97, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "N, A, B = map(int, input().split())\nS = list(input())\n\na_pass = 0\nb_pass = 0\n\nfor s in S:\n if s == 'a':\n if (a_pass + b_pass) < (A + B):\n print('Yes')\n a_pass += 1\n else:\n print('No')\n elif s == 'b':\n if (a_pass + b_pass) < (A + B) and b_pass < B:\n print('Yes')\n b_pass += 1\n else:\n print('No')\n elif s == 'c':\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = list(input())", "S", "list(input())", "list", "input()", "input", "a_pass = 0", "a_pass", "0", "b_pass = 0", "b_pass", "0", "for s in S:\n if s == 'a':\n if (a_pass + b_pass) < (A + B):\n print('Yes')\n a_pass += 1\n else:\n print('No')\n elif s == 'b':\n if (a_pass + b_pass) < (A + B) and b_pass < B:\n print('Yes')\n b_pass += 1\n else:\n print('No')\n elif s == 'c':\n print('No')", "s", "S", "if s == 'a':\n if (a_pass + b_pass) < (A + B):\n print('Yes')\n a_pass += 1\n else:\n print('No')\n elif s == 'b':\n if (a_pass + b_pass) < (A + B) and b_pass < B:\n print('Yes')\n b_pass += 1\n else:\n print('No')\n elif s == 'c':\n print('No')", "s == 'a'", "s", "'a'", "if (a_pass + b_pass) < (A + B):\n print('Yes')\n a_pass += 1\n else:\n print('No')\n ", "(a_pass + b_pass) < (A + B)", "a_pass + b_pass", "a_pass", "b_pass", "A + B", "A", "B", "print('Yes')", "print", "'Yes'", "a_pass += 1", "a_pass", "1", "print('No')", "print", "'No'", "elif s == 'b':\n if (a_pass + b_pass) < (A + B) and b_pass < B:\n print('Yes')\n b_pass += 1\n else:\n print('No')\n ", "s == 'b'", "s", "'b'", "if (a_pass + b_pass) < (A + B) and b_pass < B:\n print('Yes')\n b_pass += 1\n else:\n print('No')\n ", "(a_pass + b_pass) < (A + B) and b_pass < B", "(a_pass + b_pass) < (A + B)", "a_pass + b_pass", "a_pass", "b_pass", "A + B", "A", "B", "b_pass < B", "b_pass", "B", "print('Yes')", "print", "'Yes'", "b_pass += 1", "b_pass", "1", "print('No')", "print", "'No'", "elif s == 'c':\n print('No')", "s == 'c'", "s", "'c'", "print('No')", "print", "'No'", "a_pass += 1", "1", "a_pass", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "S = list(input())", "list(input())", "S", "b_pass += 1", "1", "b_pass", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "a_pass = 0", "0", "a_pass", "b_pass = 0", "0", "b_pass" ]
N, A, B = map(int, input().split()) S = list(input()) a_pass = 0 b_pass = 0 for s in S: if s == 'a': if (a_pass + b_pass) < (A + B): print('Yes') a_pass += 1 else: print('No') elif s == 'b': if (a_pass + b_pass) < (A + B) and b_pass < B: print('Yes') b_pass += 1 else: print('No') elif s == 'c': print('No')
[ 7, 15, 13, 13, 13, 4, 18, 13, 13, 17, 0, 13, 18, 18, 13, 13, 13, 0, 13, 2, 2, 17, 17, 17, 0, 13, 18, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 0, 13, 39, 14, 2, 4, 13, 13, 17, 29, 39, 0, 13, 18, 13, 17, 0, 13, 17, 28, 13, 4, 13, 2, 4, 13, 13, 17, 14, 40, 13, 18, 13, 2, 13, 17, 4, 18, 13, 13, 39, 13, 13, 0, 13, 18, 13, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 18, 13, 13, 39, 13, 13, 29, 13, 23, 13, 12, 13, 29, 4, 18, 17, 13, 4, 13, 13, 13, 23, 13, 12, 13, 29, 4, 13, 4, 13, 13, 13, 23, 13, 12, 13, 0, 13, 4, 18, 13, 13, 13, 13, 14, 2, 40, 13, 4, 13, 13, 2, 18, 13, 13, 13, 29, 17, 29, 17, 23, 13, 23, 13, 12, 13, 0, 13, 17, 42, 13, 14, 2, 13, 17, 0, 13, 13, 0, 13, 13, 0, 13, 17, 29, 13, 23, 13, 23, 13, 17, 0, 13, 4, 13, 13, 13, 0, 13, 18, 4, 13, 39, 17, 41, 28, 13, 4, 13, 13, 4, 17, 0, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 2, 13, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 0, 18, 13, 13, 17, 28, 13, 4, 13, 13, 4, 13, 18, 13, 13, 10, 18, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 17, 13, 10, 18, 13, 10, 18, 13, 10, 13, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13, 10, 12, 13, 10, 17, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 12, 13 ]
[ [ 318, 11 ], [ 375, 18 ], [ 336, 25 ], [ 319, 40 ], [ 319, 51 ], [ 319, 59 ], [ 64, 63 ], [ 128, 69 ], [ 75, 74 ], [ 128, 76 ], [ 80, 79 ], [ 83, 82 ], [ 128, 88 ], [ 74, 92 ], [ 106, 92 ], [ 128, 94 ], [ 82, 96 ], [ 63, 100 ], [ 107, 106 ], [ 128, 108 ], [ 82, 110 ], [ 114, 113 ], [ 117, 116 ], [ 63, 120 ], [ 63, 126 ], [ 128, 128 ], [ 141, 139 ], [ 141, 141 ], [ 152, 150 ], [ 152, 152 ], [ 157, 156 ], [ 182, 161 ], [ 180, 162 ], [ 156, 166 ], [ 182, 169 ], [ 182, 172 ], [ 156, 173 ], [ 180, 174 ], [ 180, 180 ], [ 182, 182 ], [ 187, 186 ], [ 208, 192 ], [ 201, 192 ], [ 196, 195 ], [ 206, 196 ], [ 198, 196 ], [ 199, 198 ], [ 198, 199 ], [ 206, 199 ], [ 202, 201 ], [ 195, 204 ], [ 186, 204 ], [ 206, 206 ], [ 208, 208 ], [ 357, 211 ], [ 346, 213 ], [ 357, 214 ], [ 357, 215 ], [ 333, 217 ], [ 319, 220 ], [ 226, 225 ], [ 343, 228 ], [ 339, 232 ], [ 330, 235 ], [ 372, 238 ], [ 242, 241 ], [ 343, 244 ], [ 334, 248 ], [ 322, 248 ], [ 241, 249 ], [ 331, 253 ], [ 355, 253 ], [ 349, 253 ], [ 358, 255 ], [ 328, 256 ], [ 348, 258 ], [ 264, 261 ], [ 340, 262 ], [ 241, 263 ], [ 269, 266 ], [ 340, 267 ], [ 241, 268 ], [ 334, 273 ], [ 322, 273 ], [ 241, 274 ], [ 331, 279 ], [ 355, 279 ], [ 349, 279 ], [ 358, 281 ], [ 328, 282 ], [ 373, 284 ], [ 370, 284 ], [ 328, 285 ], [ 354, 287 ], [ 369, 290 ], [ 296, 293 ], [ 340, 294 ], [ 241, 295 ], [ 301, 298 ], [ 340, 299 ], [ 241, 300 ], [ 306, 303 ], [ 340, 304 ], [ 241, 305 ], [ 309, 308 ], [ 343, 311 ], [ 303, 314 ], [ 298, 314 ], [ 293, 314 ], [ 266, 314 ], [ 261, 314 ], [ 340, 315 ], [ 308, 316 ], [ 318, 319 ], [ 357, 328 ], [ 330, 331 ], [ 333, 334 ], [ 336, 337 ], [ 339, 340 ], [ 357, 343 ], [ 348, 349 ], [ 354, 355 ], [ 357, 358 ], [ 369, 370 ], [ 372, 373 ], [ 375, 376 ] ]
[ "import sys,collections as cl,bisect as bs\nsys.setrecursionlimit(100000)\ninput = sys.stdin.readline\nmod = 10**9+7\nMax = sys.maxsize\ndef l(): #intのlist\n return list(map(int,input().split()))\ndef m(): #複数文字\n return map(int,input().split())\ndef onem(): #Nとかの取得\n return int(input())\ndef s(x): #圧縮\n a = []\n if len(x) == 0:\n return []\n aa = x[0]\n su = 1\n for i in range(len(x)-1):\n if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n a.append([aa,su])\n return a\ndef jo(x): #listをスペースごとに分ける\n return \" \".join(map(str,x))\ndef max2(x): #他のときもどうように作成可能\n return max(map(max,x))\ndef In(x,a): #aがリスト(sorted)\n k = bs.bisect_left(a,x)\n if k != len(a) and a[k] == x:\n return True\n else:\n return False\n\ndef pow_k(x, n):\n ans = 1\n while n:\n if n % 2:\n ans *= x\n x *= x\n n >>= 1\n return ans\n\n\"\"\"\ndef nibu(x,n,r):\n ll = 0\n rr = r\n while True:\n mid = (ll+rr)//2\n\n if rr == mid:\n return ll\n if (ここに評価入れる):\n rr = mid\n else:\n ll = mid+1\n\"\"\"\n\nn,a,b = m()\n\ns = input()[:-1]\n\nans = [\"\" for i in range(n)]\nco = 0\ncob = 0\nfor i in range(n):\n if s[i] == \"a\":\n if co < a+b:\n co += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n\n elif s[i] == \"b\":\n if co < a+b and cob < b:\n co += 1\n cob += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n else:\n ans[i] = \"No\"\nfor i in range(n):\n print(ans[i])", "import sys,collections as cl,bisect as bs", "sys", "collections", "bisect", "sys.setrecursionlimit(100000)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "100000", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "mod = 10**9+7", "mod", "10**9+7", "10**9", "10", "9", "7", "Max = sys.maxsize", "Max", "sys.maxsize", "sys", "maxsize", "def l(): #intのlist\n return list(map(int,input().split()))", "l", "return list(map(int,input().split()))", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "def m(): #複数文字\n return map(int,input().split())", "m", "return map(int,input().split())", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "def onem(): #Nとかの取得\n return int(input())", "onem", "return int(input())", "int(input())", "int", "input()", "input", "def s(x): #圧縮\n a = []\n if len(x) == 0:\n return []\n aa = x[0]\n su = 1\n for i in range(len(x)-1):\n if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n a.append([aa,su])\n return a", "s", "a = []", "a", "[]", "if len(x) == 0:\n return []\n ", "len(x) == 0", "len(x)", "len", "x", "0", "return []", "[]", "aa = x[0]", "aa", "x[0]", "x", "0", "su = 1", "su", "1", "for i in range(len(x)-1):\n if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n ", "i", "range(len(x)-1)", "range", "len(x)-1", "len(x)", "len", "x", "1", "if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n ", "aa != x[i+1]", "aa", "x[i+1]", "x", "i+1", "i", "1", "a.append([aa,su])", "a.append", "a", "append", "[aa,su]", "aa", "su", "aa = x[i+1]", "aa", "x[i+1]", "x", "i+1", "i", "1", "su = 1", "su", "1", "su += 1", "su", "1", "a.append([aa,su])", "a.append", "a", "append", "[aa,su]", "aa", "su", "return a", "a", "x", "x", "def jo(x): #listをスペースごとに分ける\n return \" \".join(map(str,x))", "jo", "return \" \".join(map(str,x))", "\" \".join(map(str,x))", "\" \".join", "\" \"", "join", "map(str,x)", "map", "str", "x", "x", "x", "def max2(x): #他のときもどうように作成可能\n return max(map(max,x))", "max2", "return max(map(max,x))", "max(map(max,x))", "max", "map(max,x)", "map", "max", "x", "x", "x", "def In(x,a): #aがリスト(sorted)\n k = bs.bisect_left(a,x)\n if k != len(a) and a[k] == x:\n return True\n else:\n return False", "In", "k = bs.bisect_left(a,x)", "k", "bs.bisect_left(a,x)", "bs.bisect_left", "bs", "bisect_left", "a", "x", "if k != len(a) and a[k] == x:\n return True\n else:\n return False", "k != len(a) and a[k] == x", "k != len(a)", "k", "len(a)", "len", "a", "a[k] == x", "a[k]", "a", "k", "x", "return True", "True", "return False", "False", "x", "x", "a", "a", "def pow_k(x, n):\n ans = 1\n while n:\n if n % 2:\n ans *= x\n x *= x\n n >>= 1\n return ans", "pow_k", "ans = 1", "ans", "1", "while n:\n if n % 2:\n ans *= x\n x *= x\n n >>= 1\n ", "n", "if n % 2:\n ans *= x\n ", "n % 2", "n", "2", "ans *= x", "ans", "x", "x *= x", "x", "x", "n >>= 1", "n", "1", "return ans", "ans", "x", "x", "n", "n", "\"\"\"\ndef nibu(x,n,r):\n ll = 0\n rr = r\n while True:\n mid = (ll+rr)//2\n\n if rr == mid:\n return ll\n if (ここに評価入れる):\n rr = mid\n else:\n ll = mid+1\n\"\"\"", "n,a,b = m()", "n", "m()", "m", "a", "b", "s = input()[:-1]", "s", "input()[:-1]", "()", "input", ":-1", "-1", "\"\" for i in range(n)", "for i in range(n)", "i", "range(n)", "range", "n", "for i in range(n)", "\"\"", "ans = [\"\" for i in range(n)]", "ans", "[\"\" for i in range(n)]", "co = 0", "co", "0", "cob = 0", "cob", "0", "for i in range(n):\n if s[i] == \"a\":\n if co < a+b:\n co += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n\n elif s[i] == \"b\":\n if co < a+b and cob < b:\n co += 1\n cob += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n else:\n ans[i] = \"No\"", "i", "range(n)", "range", "n", "if s[i] == \"a\":\n if co < a+b:\n co += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n\n elif s[i] == \"b\":\n if co < a+b and cob < b:\n co += 1\n cob += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n else:\n ans[i] = \"No\"", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "if co < a+b:\n co += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n\n ", "co < a+b", "co", "a+b", "a", "b", "co += 1", "co", "1", "ans[i] = \"Yes\"", "ans[i]", "ans", "i", "\"Yes\"", "ans[i] = \"No\"", "ans[i]", "ans", "i", "\"No\"", "elif s[i] == \"b\":\n if co < a+b and cob < b:\n co += 1\n cob += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n ", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "if co < a+b and cob < b:\n co += 1\n cob += 1\n ans[i] = \"Yes\"\n else:\n ans[i] = \"No\"\n ", "co < a+b and cob < b", "co < a+b", "co", "a+b", "a", "b", "cob < b", "cob", "b", "co += 1", "co", "1", "cob += 1", "cob", "1", "ans[i] = \"Yes\"", "ans[i]", "ans", "i", "\"Yes\"", "ans[i] = \"No\"", "ans[i]", "ans", "i", "\"No\"", "ans[i] = \"No\"", "ans[i]", "ans", "i", "\"No\"", "for i in range(n):\n print(ans[i])", "i", "range(n)", "range", "n", "print(ans[i])", "print", "ans[i]", "ans", "i", "input = sys.stdin.readline", "sys.stdin.readline", "input", "def s(x): #圧縮\n a = []\n if len(x) == 0:\n return []\n aa = x[0]\n su = 1\n for i in range(len(x)-1):\n if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n a.append([aa,su])\n return a", "def s(x): #圧縮\n a = []\n if len(x) == 0:\n return []\n aa = x[0]\n su = 1\n for i in range(len(x)-1):\n if aa != x[i+1]:\n a.append([aa,su])\n aa = x[i+1]\n su = 1\n else:\n su += 1\n a.append([aa,su])\n return a", "s", "def onem(): #Nとかの取得\n return int(input())", "def onem(): #Nとかの取得\n return int(input())", "onem", "b = m()", "m()", "b", "co = 0", "0", "co", "s = input()[:-1]", "input()[:-1]", "s", "Max = sys.maxsize", "sys.maxsize", "Max", "ans = [\"\" for i in range(n)]", "[\"\" for i in range(n)]", "ans", "n,a,b = m()", "m()", "n", "def m(): #複数文字\n return map(int,input().split())", "def m(): #複数文字\n return map(int,input().split())", "m", "co += 1", "1", "co", "def In(x,a): #aがリスト(sorted)\n k = bs.bisect_left(a,x)\n if k != len(a) and a[k] == x:\n return True\n else:\n return False", "def In(x,a): #aがリスト(sorted)\n k = bs.bisect_left(a,x)\n if k != len(a) and a[k] == x:\n return True\n else:\n return False", "In", "co += 1", "1", "co", "a,b = m()", "m()", "a", "def max2(x): #他のときもどうように作成可能\n return max(map(max,x))", "def max2(x): #他のときもどうように作成可能\n return max(map(max,x))", "max2", "def l(): #intのlist\n return list(map(int,input().split()))", "def l(): #intのlist\n return list(map(int,input().split()))", "l", "def pow_k(x, n):\n ans = 1\n while n:\n if n % 2:\n ans *= x\n x *= x\n n >>= 1\n return ans", "def pow_k(x, n):\n ans = 1\n while n:\n if n % 2:\n ans *= x\n x *= x\n n >>= 1\n return ans", "pow_k", "cob += 1", "1", "cob", "cob = 0", "0", "cob", "mod = 10**9+7", "10**9+7", "mod", "def jo(x): #listをスペースごとに分ける\n return \" \".join(map(str,x))", "def jo(x): #listをスペースごとに分ける\n return \" \".join(map(str,x))", "jo" ]
import sys,collections as cl,bisect as bs sys.setrecursionlimit(100000) input = sys.stdin.readline mod = 10**9+7 Max = sys.maxsize def l(): #intのlist return list(map(int,input().split())) def m(): #複数文字 return map(int,input().split()) def onem(): #Nとかの取得 return int(input()) def s(x): #圧縮 a = [] if len(x) == 0: return [] aa = x[0] su = 1 for i in range(len(x)-1): if aa != x[i+1]: a.append([aa,su]) aa = x[i+1] su = 1 else: su += 1 a.append([aa,su]) return a def jo(x): #listをスペースごとに分ける return " ".join(map(str,x)) def max2(x): #他のときもどうように作成可能 return max(map(max,x)) def In(x,a): #aがリスト(sorted) k = bs.bisect_left(a,x) if k != len(a) and a[k] == x: return True else: return False def pow_k(x, n): ans = 1 while n: if n % 2: ans *= x x *= x n >>= 1 return ans """ def nibu(x,n,r): ll = 0 rr = r while True: mid = (ll+rr)//2 if rr == mid: return ll if (ここに評価入れる): rr = mid else: ll = mid+1 """ n,a,b = m() s = input()[:-1] ans = ["" for i in range(n)] co = 0 cob = 0 for i in range(n): if s[i] == "a": if co < a+b: co += 1 ans[i] = "Yes" else: ans[i] = "No" elif s[i] == "b": if co < a+b and cob < b: co += 1 cob += 1 ans[i] = "Yes" else: ans[i] = "No" else: ans[i] = "No" for i in range(n): print(ans[i])
[ 7, 12, 13, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 40, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 40, 13, 13, 40, 13, 2, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 5, 13 ], [ 5, 14 ], [ 17, 16 ], [ 21, 20 ], [ 24, 23 ], [ 27, 26 ], [ 4, 29 ], [ 16, 34 ], [ 26, 35 ], [ 20, 38 ], [ 68, 38 ], [ 43, 38 ], [ 13, 40 ], [ 14, 41 ], [ 44, 43 ], [ 16, 53 ], [ 26, 54 ], [ 23, 57 ], [ 65, 57 ], [ 14, 58 ], [ 20, 60 ], [ 68, 60 ], [ 43, 60 ], [ 13, 62 ], [ 14, 63 ], [ 66, 65 ], [ 69, 68 ], [ 80, 77 ] ]
[ "def resolve():\n N, A, B = map(int, input().split())\n S = input()\n count = 1\n sabetu = 1\n for i in range(N):\n if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")\nresolve()", "def resolve():\n N, A, B = map(int, input().split())\n S = input()\n count = 1\n sabetu = 1\n for i in range(N):\n if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")", "resolve", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "count = 1", "count", "1", "sabetu = 1", "sabetu", "1", "for i in range(N):\n if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")", "i", "range(N)", "range", "N", "if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")", "S[i] == \"a\" and count <= A+B", "S[i] == \"a\"", "S[i]", "S", "i", "\"a\"", "count <= A+B", "count", "A+B", "A", "B", "count += 1", "count", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n ", "S[i] == \"b\" and sabetu <= B and count <= A+B", "S[i] == \"b\" and sabetu <= B", "S[i] == \"b\"", "S[i]", "S", "i", "\"b\"", "sabetu <= B", "sabetu", "B", "count <= A+B", "count", "A+B", "A", "B", "sabetu += 1", "sabetu", "1", "count += 1", "count", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "resolve()", "resolve", "def resolve():\n N, A, B = map(int, input().split())\n S = input()\n count = 1\n sabetu = 1\n for i in range(N):\n if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")", "def resolve():\n N, A, B = map(int, input().split())\n S = input()\n count = 1\n sabetu = 1\n for i in range(N):\n if S[i] == \"a\" and count <= A+B:\n count += 1\n print(\"Yes\")\n elif S[i] == \"b\" and sabetu <= B and count <= A+B:\n sabetu += 1\n count += 1\n print(\"Yes\")\n else:\n print(\"No\")", "resolve" ]
def resolve(): N, A, B = map(int, input().split()) S = input() count = 1 sabetu = 1 for i in range(N): if S[i] == "a" and count <= A+B: count += 1 print("Yes") elif S[i] == "b" and sabetu <= B and count <= A+B: sabetu += 1 count += 1 print("Yes") else: print("No") resolve()
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 2, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 0, 13, 2, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 17, 10, 18, 13, 10, 4, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 122, 2 ], [ 104, 14 ], [ 107, 20 ], [ 123, 22 ], [ 113, 25 ], [ 123, 27 ], [ 101, 30 ], [ 123, 32 ], [ 116, 35 ], [ 110, 38 ], [ 42, 41 ], [ 105, 41 ], [ 41, 45 ], [ 117, 50 ], [ 126, 50 ], [ 111, 51 ], [ 120, 51 ], [ 114, 53 ], [ 102, 54 ], [ 125, 56 ], [ 117, 58 ], [ 126, 58 ], [ 41, 68 ], [ 117, 74 ], [ 126, 74 ], [ 111, 75 ], [ 120, 75 ], [ 114, 77 ], [ 102, 78 ], [ 111, 80 ], [ 120, 80 ], [ 102, 81 ], [ 119, 83 ], [ 111, 85 ], [ 120, 85 ], [ 41, 95 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "li = list(map(int,input().split()))\ns=list(input())\nN=li[0]\nA=li[1]\nB=li[2]\ndomPass=0\nforePass=0\nfor x in s:\n if(x=='a'):\n if((domPass+forePass)<(A+B)):\n domPass=domPass+1\n print('Yes')\n else:\n print('No')\n elif(x=='b'):\n if(((domPass+forePass)<(A+B))and(forePass<B)):\n forePass=forePass+1\n print('Yes')\n else :\n print('No')\n elif(x=='c'):\n print('No')", "li = list(map(int,input().split()))", "li", "list(map(int,input().split()))", "list", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "s=list(input())", "s", "list(input())", "list", "input()", "input", "N=li[0]", "N", "li[0]", "li", "0", "A=li[1]", "A", "li[1]", "li", "1", "B=li[2]", "B", "li[2]", "li", "2", "domPass=0", "domPass", "0", "forePass=0", "forePass", "0", "for x in s:\n if(x=='a'):\n if((domPass+forePass)<(A+B)):\n domPass=domPass+1\n print('Yes')\n else:\n print('No')\n elif(x=='b'):\n if(((domPass+forePass)<(A+B))and(forePass<B)):\n forePass=forePass+1\n print('Yes')\n else :\n print('No')\n elif(x=='c'):\n print('No')", "x", "s", "if(x=='a'):\n if((domPass+forePass)<(A+B)):\n domPass=domPass+1\n print('Yes')\n else:\n print('No')\n elif(x=='b'):\n if(((domPass+forePass)<(A+B))and(forePass<B)):\n forePass=forePass+1\n print('Yes')\n else :\n print('No')\n elif(x=='c'):\n print('No')", "x=='a'", "x", "'a'", "if((domPass+forePass)<(A+B)):\n domPass=domPass+1\n print('Yes')\n else:\n print('No')\n ", "(domPass+forePass)<(A+B)", "domPass+forePass", "domPass", "forePass", "A+B", "A", "B", "domPass=domPass+1", "domPass", "domPass+1", "domPass", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "elif(x=='b'):\n if(((domPass+forePass)<(A+B))and(forePass<B)):\n forePass=forePass+1\n print('Yes')\n else :\n print('No')\n ", "x=='b'", "x", "'b'", "if(((domPass+forePass)<(A+B))and(forePass<B)):\n forePass=forePass+1\n print('Yes')\n else :\n print('No')\n ", "((domPass+forePass)<(A+B))and(forePass<B)", "(domPass+forePass)<(A+B)", "domPass+forePass", "domPass", "forePass", "A+B", "A", "B", "forePass<B", "forePass", "B", "forePass=forePass+1", "forePass", "forePass+1", "forePass", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "elif(x=='c'):\n print('No')", "x=='c'", "x", "'c'", "print('No')", "print", "'No'", "B=li[2]", "li[2]", "B", "s=list(input())", "list(input())", "s", "N=li[0]", "li[0]", "N", "forePass=0", "0", "forePass", "A=li[1]", "li[1]", "A", "domPass=0", "0", "domPass", "forePass=forePass+1", "forePass+1", "forePass", "li = list(map(int,input().split()))", "list(map(int,input().split()))", "li", "domPass=domPass+1", "domPass+1", "domPass" ]
li = list(map(int,input().split())) s=list(input()) N=li[0] A=li[1] B=li[2] domPass=0 forePass=0 for x in s: if(x=='a'): if((domPass+forePass)<(A+B)): domPass=domPass+1 print('Yes') else: print('No') elif(x=='b'): if(((domPass+forePass)<(A+B))and(forePass<B)): forePass=forePass+1 print('Yes') else : print('No') elif(x=='c'): print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 99, 2 ], [ 99, 11 ], [ 99, 12 ], [ 81, 14 ], [ 93, 18 ], [ 78, 21 ], [ 25, 24 ], [ 76, 27 ], [ 82, 32 ], [ 24, 33 ], [ 94, 36 ], [ 88, 36 ], [ 85, 36 ], [ 100, 38 ], [ 97, 39 ], [ 84, 44 ], [ 82, 51 ], [ 24, 52 ], [ 94, 55 ], [ 88, 55 ], [ 85, 55 ], [ 100, 57 ], [ 97, 58 ], [ 79, 60 ], [ 91, 60 ], [ 97, 61 ], [ 87, 66 ], [ 90, 69 ], [ 99, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 99, 97 ], [ 99, 100 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\n\ncnt_t = 0\ncnt_f = 0\nfor i in range(n):\n if s[i] == \"a\" and cnt_t < a+b:\n print(\"Yes\")\n cnt_t += 1\n elif s[i] == \"b\" and cnt_t < a+b and cnt_f < b:\n print(\"Yes\")\n cnt_t += 1\n cnt_f += 1\n else:\n print(\"No\")", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "cnt_t = 0", "cnt_t", "0", "cnt_f = 0", "cnt_f", "0", "for i in range(n):\n if s[i] == \"a\" and cnt_t < a+b:\n print(\"Yes\")\n cnt_t += 1\n elif s[i] == \"b\" and cnt_t < a+b and cnt_f < b:\n print(\"Yes\")\n cnt_t += 1\n cnt_f += 1\n else:\n print(\"No\")", "i", "range(n)", "range", "n", "if s[i] == \"a\" and cnt_t < a+b:\n print(\"Yes\")\n cnt_t += 1\n elif s[i] == \"b\" and cnt_t < a+b and cnt_f < b:\n print(\"Yes\")\n cnt_t += 1\n cnt_f += 1\n else:\n print(\"No\")", "s[i] == \"a\" and cnt_t < a+b", "s[i] == \"a\"", "s[i]", "s", "i", "\"a\"", "cnt_t < a+b", "cnt_t", "a+b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "cnt_t += 1", "cnt_t", "1", "elif s[i] == \"b\" and cnt_t < a+b and cnt_f < b:\n print(\"Yes\")\n cnt_t += 1\n cnt_f += 1\n ", "s[i] == \"b\" and cnt_t < a+b and cnt_f < b", "s[i] == \"b\" and cnt_t < a+b", "s[i] == \"b\"", "s[i]", "s", "i", "\"b\"", "cnt_t < a+b", "cnt_t", "a+b", "a", "b", "cnt_f < b", "cnt_f", "b", "print(\"Yes\")", "print", "\"Yes\"", "cnt_t += 1", "cnt_t", "1", "cnt_f += 1", "cnt_f", "1", "print(\"No\")", "print", "\"No\"", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "cnt_f = 0", "0", "cnt_f", "s = input()", "input()", "s", "cnt_t += 1", "1", "cnt_t", "cnt_t += 1", "1", "cnt_t", "cnt_f += 1", "1", "cnt_f", "cnt_t = 0", "0", "cnt_t", "b = map(int, input().split())", "map(int, input().split())", "b", "a, b = map(int, input().split())", "map(int, input().split())", "a" ]
n, a, b = map(int, input().split()) s = input() cnt_t = 0 cnt_f = 0 for i in range(n): if s[i] == "a" and cnt_t < a+b: print("Yes") cnt_t += 1 elif s[i] == "b" and cnt_t < a+b and cnt_f < b: print("Yes") cnt_t += 1 cnt_f += 1 else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 97, 2 ], [ 97, 11 ], [ 97, 12 ], [ 91, 14 ], [ 76, 18 ], [ 88, 21 ], [ 25, 24 ], [ 92, 24 ], [ 24, 28 ], [ 24, 35 ], [ 77, 40 ], [ 83, 40 ], [ 89, 41 ], [ 95, 41 ], [ 98, 43 ], [ 80, 44 ], [ 82, 49 ], [ 77, 58 ], [ 83, 58 ], [ 89, 59 ], [ 95, 59 ], [ 98, 61 ], [ 80, 62 ], [ 89, 64 ], [ 95, 64 ], [ 80, 65 ], [ 94, 70 ], [ 76, 77 ], [ 97, 80 ], [ 82, 83 ], [ 97, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "N,A,B=map(int,input().split())\nS=input()\n\nnowA=0\nnowB=0\n\nfor s in S:\n if s=='c':\n print('No')\n elif s=='a':\n if nowA+nowB<A+B:\n print('Yes')\n nowA+=1\n else:\n print('No')\n else:\n if nowA+nowB<A+B and nowB<B:\n print('Yes')\n nowB+=1\n else:\n print('No')", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input()", "S", "input()", "input", "nowA=0", "nowA", "0", "nowB=0", "nowB", "0", "for s in S:\n if s=='c':\n print('No')\n elif s=='a':\n if nowA+nowB<A+B:\n print('Yes')\n nowA+=1\n else:\n print('No')\n else:\n if nowA+nowB<A+B and nowB<B:\n print('Yes')\n nowB+=1\n else:\n print('No')", "s", "S", "if s=='c':\n print('No')\n elif s=='a':\n if nowA+nowB<A+B:\n print('Yes')\n nowA+=1\n else:\n print('No')\n else:\n if nowA+nowB<A+B and nowB<B:\n print('Yes')\n nowB+=1\n else:\n print('No')", "s=='c'", "s", "'c'", "print('No')", "print", "'No'", "elif s=='a':\n if nowA+nowB<A+B:\n print('Yes')\n nowA+=1\n else:\n print('No')\n ", "s=='a'", "s", "'a'", "if nowA+nowB<A+B:\n print('Yes')\n nowA+=1\n else:\n print('No')\n ", "nowA+nowB<A+B", "nowA+nowB", "nowA", "nowB", "A+B", "A", "B", "print('Yes')", "print", "'Yes'", "nowA+=1", "nowA", "1", "print('No')", "print", "'No'", "if nowA+nowB<A+B and nowB<B:\n print('Yes')\n nowB+=1\n else:\n print('No')", "nowA+nowB<A+B and nowB<B", "nowA+nowB<A+B", "nowA+nowB", "nowA", "nowB", "A+B", "A", "B", "nowB<B", "nowB", "B", "print('Yes')", "print", "'Yes'", "nowB+=1", "nowB", "1", "print('No')", "print", "'No'", "nowA=0", "0", "nowA", "B=map(int,input().split())", "map(int,input().split())", "B", "nowA+=1", "1", "nowA", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "nowB=0", "0", "nowB", "S=input()", "input()", "S", "nowB+=1", "1", "nowB", "A,B=map(int,input().split())", "map(int,input().split())", "A" ]
N,A,B=map(int,input().split()) S=input() nowA=0 nowB=0 for s in S: if s=='c': print('No') elif s=='a': if nowA+nowB<A+B: print('Yes') nowA+=1 else: print('No') else: if nowA+nowB<A+B and nowB<B: print('Yes') nowB+=1 else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 9, 14, 2, 2, 2, 18, 13, 13, 17, 2, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 0, 13, 17, 9, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 100, 2 ], [ 100, 11 ], [ 100, 12 ], [ 103, 14 ], [ 88, 18 ], [ 91, 21 ], [ 25, 24 ], [ 104, 29 ], [ 104, 34 ], [ 24, 35 ], [ 89, 38 ], [ 86, 38 ], [ 95, 38 ], [ 80, 40 ], [ 83, 41 ], [ 94, 46 ], [ 104, 54 ], [ 24, 55 ], [ 95, 58 ], [ 89, 58 ], [ 86, 58 ], [ 80, 60 ], [ 83, 61 ], [ 92, 63 ], [ 98, 63 ], [ 83, 64 ], [ 85, 69 ], [ 97, 72 ], [ 100, 80 ], [ 100, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\nall = 0\nforeign = 0\n\nfor i in range(len(S)):\n if S[i] == 'a' and all < A + B:\n print('Yes')\n all += 1\n continue\n if S[i] == 'b' and all < A + B and foreign < B:\n print('Yes')\n all += 1\n foreign += 1\n continue\n print('No')", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "all = 0", "all", "0", "foreign = 0", "foreign", "0", "for i in range(len(S)):\n if S[i] == 'a' and all < A + B:\n print('Yes')\n all += 1\n continue\n if S[i] == 'b' and all < A + B and foreign < B:\n print('Yes')\n all += 1\n foreign += 1\n continue\n print('No')", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i] == 'a' and all < A + B:\n print('Yes')\n all += 1\n continue\n ", "S[i] == 'a' and all < A + B", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "all < A + B", "all", "A + B", "A", "B", "print('Yes')", "print", "'Yes'", "all += 1", "all", "1", "continue", "if S[i] == 'b' and all < A + B and foreign < B:\n print('Yes')\n all += 1\n foreign += 1\n continue\n ", "S[i] == 'b' and all < A + B and foreign < B", "S[i] == 'b' and all < A + B", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "all < A + B", "all", "A + B", "A", "B", "foreign < B", "foreign", "B", "print('Yes')", "print", "'Yes'", "all += 1", "all", "1", "foreign += 1", "foreign", "1", "continue", "print('No')", "print", "'No'", "A, B = map(int, input().split())", "map(int, input().split())", "A", "B = map(int, input().split())", "map(int, input().split())", "B", "all += 1", "1", "all", "all = 0", "0", "all", "foreign = 0", "0", "foreign", "all += 1", "1", "all", "foreign += 1", "1", "foreign", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "S = input()", "input()", "S" ]
N, A, B = map(int, input().split()) S = input() all = 0 foreign = 0 for i in range(len(S)): if S[i] == 'a' and all < A + B: print('Yes') all += 1 continue if S[i] == 'b' and all < A + B and foreign < B: print('Yes') all += 1 foreign += 1 continue print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 40, 13, 13, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 99, 2 ], [ 99, 11 ], [ 99, 12 ], [ 78, 14 ], [ 90, 18 ], [ 93, 21 ], [ 25, 24 ], [ 79, 24 ], [ 24, 28 ], [ 81, 31 ], [ 82, 36 ], [ 94, 36 ], [ 100, 37 ], [ 91, 39 ], [ 76, 39 ], [ 88, 39 ], [ 97, 41 ], [ 100, 42 ], [ 87, 44 ], [ 24, 54 ], [ 91, 58 ], [ 76, 58 ], [ 88, 58 ], [ 97, 60 ], [ 100, 61 ], [ 75, 63 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 99, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 99, 97 ], [ 99, 100 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\ncnt = 0\nb_cnt = 0\nfor c in s:\n if c == 'b':\n b_cnt += 1\n if b_cnt <= b and cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n elif c == 'a':\n if cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "cnt = 0", "cnt", "0", "b_cnt = 0", "b_cnt", "0", "for c in s:\n if c == 'b':\n b_cnt += 1\n if b_cnt <= b and cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n elif c == 'a':\n if cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "c", "s", "if c == 'b':\n b_cnt += 1\n if b_cnt <= b and cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n elif c == 'a':\n if cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "c == 'b'", "c", "'b'", "b_cnt += 1", "b_cnt", "1", "if b_cnt <= b and cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n ", "b_cnt <= b and cnt < a+b", "b_cnt <= b", "b_cnt", "b", "cnt < a+b", "cnt", "a+b", "a", "b", "cnt += 1", "cnt", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "elif c == 'a':\n if cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n ", "c == 'a'", "c", "'a'", "if cnt < a+b:\n cnt += 1\n print('Yes')\n else:\n print('No')\n ", "cnt < a+b", "cnt", "a+b", "a", "b", "cnt += 1", "cnt", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "cnt += 1", "1", "cnt", "s = input()", "input()", "s", "b_cnt += 1", "1", "b_cnt", "n, a, b = map(int, input().split())", "map(int, input().split())", "n", "cnt += 1", "1", "cnt", "cnt = 0", "0", "cnt", "b_cnt = 0", "0", "b_cnt", "a, b = map(int, input().split())", "map(int, input().split())", "a", "b = map(int, input().split())", "map(int, input().split())", "b" ]
n, a, b = map(int, input().split()) s = input() cnt = 0 b_cnt = 0 for c in s: if c == 'b': b_cnt += 1 if b_cnt <= b and cnt < a+b: cnt += 1 print('Yes') else: print('No') elif c == 'a': if cnt < a+b: cnt += 1 print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 2, 13, 2, 13, 13, 40, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 93, 2 ], [ 93, 11 ], [ 93, 12 ], [ 69, 14 ], [ 75, 18 ], [ 87, 21 ], [ 25, 24 ], [ 70, 24 ], [ 24, 28 ], [ 76, 32 ], [ 91, 32 ], [ 73, 32 ], [ 82, 34 ], [ 85, 35 ], [ 72, 40 ], [ 24, 44 ], [ 78, 47 ], [ 76, 52 ], [ 91, 52 ], [ 73, 52 ], [ 82, 54 ], [ 85, 55 ], [ 79, 57 ], [ 88, 57 ], [ 85, 58 ], [ 90, 63 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 93, 82 ], [ 93, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "n, a, b = map(int, input().split())\ns = input()\n\npassed = 0\nforeign = 0\nfor c in s:\n if c == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n elif c == \"b\":\n foreign += 1\n if passed < a + b and foreign <= b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n else:\n print(\"No\")", "n, a, b = map(int, input().split())", "n", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "a", "b", "s = input()", "s", "input()", "input", "passed = 0", "passed", "0", "foreign = 0", "foreign", "0", "for c in s:\n if c == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n elif c == \"b\":\n foreign += 1\n if passed < a + b and foreign <= b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n else:\n print(\"No\")", "c", "s", "if c == \"a\":\n if passed < a + b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n elif c == \"b\":\n foreign += 1\n if passed < a + b and foreign <= b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n else:\n print(\"No\")", "c == \"a\"", "c", "\"a\"", "if passed < a + b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n ", "passed < a + b", "passed", "a + b", "a", "b", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "elif c == \"b\":\n foreign += 1\n if passed < a + b and foreign <= b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n ", "c == \"b\"", "c", "\"b\"", "foreign += 1", "foreign", "1", "if passed < a + b and foreign <= b:\n print(\"Yes\")\n passed += 1\n else: print(\"No\")\n ", "passed < a + b and foreign <= b", "passed < a + b", "passed", "a + b", "a", "b", "foreign <= b", "foreign", "b", "print(\"Yes\")", "print", "\"Yes\"", "passed += 1", "passed", "1", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "passed += 1", "1", "passed", "passed = 0", "0", "passed", "foreign += 1", "1", "foreign", "a, b = map(int, input().split())", "map(int, input().split())", "a", "b = map(int, input().split())", "map(int, input().split())", "b", "foreign = 0", "0", "foreign", "passed += 1", "1", "passed", "n, a, b = map(int, input().split())", "map(int, input().split())", "n" ]
n, a, b = map(int, input().split()) s = input() passed = 0 foreign = 0 for c in s: if c == "a": if passed < a + b: print("Yes") passed += 1 else: print("No") elif c == "b": foreign += 1 if passed < a + b and foreign <= b: print("Yes") passed += 1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 14, 40, 13, 13, 9, 0, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 2, 13, 13, 3, 41, 28, 13, 13, 4, 8, 40, 13, 17, 17, 13, 0, 13, 13, 28, 13, 4, 13, 13, 4, 13, 18, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 13, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 113, 2 ], [ 113, 11 ], [ 113, 12 ], [ 116, 14 ], [ 119, 20 ], [ 98, 23 ], [ 27, 26 ], [ 114, 29 ], [ 56, 32 ], [ 37, 32 ], [ 117, 33 ], [ 26, 34 ], [ 40, 37 ], [ 117, 38 ], [ 26, 39 ], [ 122, 42 ], [ 56, 46 ], [ 37, 46 ], [ 117, 47 ], [ 26, 48 ], [ 99, 52 ], [ 102, 52 ], [ 105, 53 ], [ 59, 56 ], [ 117, 57 ], [ 26, 58 ], [ 125, 61 ], [ 101, 64 ], [ 126, 68 ], [ 123, 68 ], [ 120, 68 ], [ 108, 70 ], [ 105, 71 ], [ 76, 75 ], [ 117, 75 ], [ 75, 80 ], [ 75, 83 ], [ 110, 85 ], [ 89, 88 ], [ 114, 91 ], [ 111, 95 ], [ 88, 96 ], [ 98, 99 ], [ 101, 102 ], [ 113, 105 ], [ 113, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ] ]
[ "N, A, B = map(int, input().split())\nS = list(input())\ncnt = 0\nb_cnt = 0\n\nfor i in range(N):\n if S[i] == 'a':\n S[i] = 'Yes'\n cnt += 1\n elif S[i] == 'b':\n if b_cnt >= B:\n continue\n S[i] = 'Yes'\n cnt += 1\n b_cnt += 1\n\n if cnt == A + B:\n break\n\nans = ['No' if j != 'Yes' else j for j in S]\n\nfor k in range(N):\n print(ans[k])", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = list(input())", "S", "list(input())", "list", "input()", "input", "cnt = 0", "cnt", "0", "b_cnt = 0", "b_cnt", "0", "for i in range(N):\n if S[i] == 'a':\n S[i] = 'Yes'\n cnt += 1\n elif S[i] == 'b':\n if b_cnt >= B:\n continue\n S[i] = 'Yes'\n cnt += 1\n b_cnt += 1\n\n if cnt == A + B:\n break", "i", "range(N)", "range", "N", "if S[i] == 'a':\n S[i] = 'Yes'\n cnt += 1\n elif S[i] == 'b':\n if b_cnt >= B:\n continue\n S[i] = 'Yes'\n cnt += 1\n b_cnt += 1\n\n ", "S[i] == 'a'", "S[i]", "S", "i", "'a'", "S[i] = 'Yes'", "S[i]", "S", "i", "'Yes'", "cnt += 1", "cnt", "1", "elif S[i] == 'b':\n if b_cnt >= B:\n continue\n S[i] = 'Yes'\n cnt += 1\n b_cnt += 1\n\n ", "S[i] == 'b'", "S[i]", "S", "i", "'b'", "if b_cnt >= B:\n continue\n ", "b_cnt >= B", "b_cnt", "B", "continue", "S[i] = 'Yes'", "S[i]", "S", "i", "'Yes'", "cnt += 1", "cnt", "1", "b_cnt += 1", "b_cnt", "1", "if cnt == A + B:\n break", "cnt == A + B", "cnt", "A + B", "A", "B", "break", "'No' if j != 'Yes' else j for j in S", "for j in S", "j", "S", "for j in S", "'No' if j != 'Yes' else j", "j != 'Yes'", "j", "'Yes'", "'No'", "j", "ans = ['No' if j != 'Yes' else j for j in S]", "ans", "['No' if j != 'Yes' else j for j in S]", "for k in range(N):\n print(ans[k])", "k", "range(N)", "range", "N", "print(ans[k])", "print", "ans[k]", "ans", "k", "b_cnt = 0", "0", "b_cnt", "b_cnt += 1", "1", "b_cnt", "B = map(int, input().split())", "map(int, input().split())", "B", "A, B = map(int, input().split())", "map(int, input().split())", "A", "ans = ['No' if j != 'Yes' else j for j in S]", "['No' if j != 'Yes' else j for j in S]", "ans", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "S = list(input())", "list(input())", "S", "cnt = 0", "0", "cnt", "cnt += 1", "1", "cnt", "cnt += 1", "1", "cnt" ]
N, A, B = map(int, input().split()) S = list(input()) cnt = 0 b_cnt = 0 for i in range(N): if S[i] == 'a': S[i] = 'Yes' cnt += 1 elif S[i] == 'b': if b_cnt >= B: continue S[i] = 'Yes' cnt += 1 b_cnt += 1 if cnt == A + B: break ans = ['No' if j != 'Yes' else j for j in S] for k in range(N): print(ans[k])
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 2, 13, 13, 2, 13, 13, 4, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 97, 2 ], [ 97, 11 ], [ 97, 12 ], [ 88, 14 ], [ 82, 18 ], [ 100, 21 ], [ 25, 24 ], [ 98, 27 ], [ 89, 31 ], [ 24, 32 ], [ 83, 37 ], [ 95, 37 ], [ 101, 38 ], [ 104, 38 ], [ 92, 40 ], [ 86, 41 ], [ 94, 46 ], [ 89, 54 ], [ 24, 55 ], [ 83, 61 ], [ 95, 61 ], [ 101, 62 ], [ 104, 62 ], [ 92, 64 ], [ 86, 65 ], [ 101, 67 ], [ 104, 67 ], [ 86, 68 ], [ 103, 73 ], [ 82, 83 ], [ 97, 86 ], [ 88, 89 ], [ 97, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "N, A, B = map(int, input().split())\nS = input()\n\na_cnt = 0\nb_cnt = 0\n\nfor i in range(N):\n if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n print(\"Yes\")\n a_cnt += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "N, A, B = map(int, input().split())", "N", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S = input()", "S", "input()", "input", "a_cnt = 0", "a_cnt", "0", "b_cnt = 0", "b_cnt", "0", "for i in range(N):\n if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n print(\"Yes\")\n a_cnt += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "i", "range(N)", "range", "N", "if S[i] == \"a\":\n if a_cnt + b_cnt < A + B:\n print(\"Yes\")\n a_cnt += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n else:\n print(\"No\")", "S[i] == \"a\"", "S[i]", "S", "i", "\"a\"", "if a_cnt + b_cnt < A + B:\n print(\"Yes\")\n a_cnt += 1\n else:\n print(\"No\")\n ", "a_cnt + b_cnt < A + B", "a_cnt + b_cnt", "a_cnt", "b_cnt", "A + B", "A", "B", "print(\"Yes\")", "print", "\"Yes\"", "a_cnt += 1", "a_cnt", "1", "print(\"No\")", "print", "\"No\"", "elif S[i] == \"b\":\n if a_cnt + b_cnt < A + B and b_cnt < B:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n ", "S[i] == \"b\"", "S[i]", "S", "i", "\"b\"", "if a_cnt + b_cnt < A + B and b_cnt < B:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n ", "a_cnt + b_cnt < A + B and b_cnt < B", "a_cnt + b_cnt < A + B", "a_cnt + b_cnt", "a_cnt", "b_cnt", "A + B", "A", "B", "b_cnt < B", "b_cnt", "B", "print(\"Yes\")", "print", "\"Yes\"", "b_cnt += 1", "b_cnt", "1", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "a_cnt = 0", "0", "a_cnt", "B = map(int, input().split())", "map(int, input().split())", "B", "S = input()", "input()", "S", "A, B = map(int, input().split())", "map(int, input().split())", "A", "a_cnt += 1", "1", "a_cnt", "N, A, B = map(int, input().split())", "map(int, input().split())", "N", "b_cnt = 0", "0", "b_cnt", "b_cnt += 1", "1", "b_cnt" ]
N, A, B = map(int, input().split()) S = input() a_cnt = 0 b_cnt = 0 for i in range(N): if S[i] == "a": if a_cnt + b_cnt < A + B: print("Yes") a_cnt += 1 else: print("No") elif S[i] == "b": if a_cnt + b_cnt < A + B and b_cnt < B: print("Yes") b_cnt += 1 else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 13, 4, 18, 4, 13, 13, 13, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 2, 13, 13, 0, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 2, 13, 13, 40, 13, 13, 0, 13, 17, 0, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 90, 2 ], [ 90, 11 ], [ 90, 12 ], [ 81, 14 ], [ 69, 18 ], [ 75, 21 ], [ 25, 24 ], [ 82, 24 ], [ 24, 29 ], [ 70, 32 ], [ 73, 32 ], [ 94, 32 ], [ 85, 34 ], [ 79, 35 ], [ 93, 37 ], [ 24, 46 ], [ 70, 49 ], [ 73, 49 ], [ 94, 49 ], [ 85, 51 ], [ 79, 52 ], [ 76, 54 ], [ 88, 54 ], [ 79, 55 ], [ 72, 57 ], [ 87, 60 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 90, 79 ], [ 81, 82 ], [ 90, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "N,A,B=map(int,input().split())\nS=input()\ncount=0\nout=1\nfor s in S:\n if s==\"a\" and count<A+B:\n count+=1\n print(\"Yes\")\n elif s==\"b\" and count<A+B and out<=B:\n count+=1\n out+=1\n print(\"Yes\")\n else:\n print(\"No\")", "N,A,B=map(int,input().split())", "N", "map(int,input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "A", "B", "S=input()", "S", "input()", "input", "count=0", "count", "0", "out=1", "out", "1", "for s in S:\n if s==\"a\" and count<A+B:\n count+=1\n print(\"Yes\")\n elif s==\"b\" and count<A+B and out<=B:\n count+=1\n out+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s", "S", "if s==\"a\" and count<A+B:\n count+=1\n print(\"Yes\")\n elif s==\"b\" and count<A+B and out<=B:\n count+=1\n out+=1\n print(\"Yes\")\n else:\n print(\"No\")", "s==\"a\" and count<A+B", "s==\"a\"", "s", "\"a\"", "count<A+B", "count", "A+B", "A", "B", "count+=1", "count", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif s==\"b\" and count<A+B and out<=B:\n count+=1\n out+=1\n print(\"Yes\")\n ", "s==\"b\" and count<A+B and out<=B", "s==\"b\" and count<A+B", "s==\"b\"", "s", "\"b\"", "count<A+B", "count", "A+B", "A", "B", "out<=B", "out", "B", "count+=1", "count", "1", "out+=1", "out", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "count=0", "0", "count", "count+=1", "1", "count", "out=1", "1", "out", "B=map(int,input().split())", "map(int,input().split())", "B", "S=input()", "input()", "S", "A,B=map(int,input().split())", "map(int,input().split())", "A", "out+=1", "1", "out", "N,A,B=map(int,input().split())", "map(int,input().split())", "N", "count+=1", "1", "count" ]
N,A,B=map(int,input().split()) S=input() count=0 out=1 for s in S: if s=="a" and count<A+B: count+=1 print("Yes") elif s=="b" and count<A+B and out<=B: count+=1 out+=1 print("Yes") else: print("No")
[ 7, 15, 13, 0, 13, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 4, 13, 13, 0, 13, 39, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 4, 18, 13, 13, 13, 14, 2, 2, 13, 17, 2, 17, 4, 13, 13, 4, 18, 13, 13, 0, 13, 17, 4, 13, 2, 13, 2, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 65, 4 ], [ 71, 15 ], [ 66, 18 ], [ 74, 20 ], [ 62, 23 ], [ 27, 26 ], [ 66, 26 ], [ 26, 30 ], [ 75, 34 ], [ 26, 36 ], [ 26, 40 ], [ 75, 46 ], [ 75, 49 ], [ 68, 52 ], [ 72, 57 ], [ 69, 60 ], [ 63, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ] ]
[ "import sys\n\nX = sys.stdin.readline().strip()\nlx = len(X)\n\nstack = []\npop_n = 0\nfor c in X:\n if c == \"S\":\n stack.append(c)\n elif c == \"T\" and 0 < len(stack):\n stack.pop()\n pop_n += 1\n\nprint(lx - 2 * pop_n)", "import sys", "sys", "X = sys.stdin.readline().strip()", "X", "sys.stdin.readline().strip()", "sys.stdin.readline().strip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "strip", "lx = len(X)", "lx", "len(X)", "len", "X", "stack = []", "stack", "[]", "pop_n = 0", "pop_n", "0", "for c in X:\n if c == \"S\":\n stack.append(c)\n elif c == \"T\" and 0 < len(stack):\n stack.pop()\n pop_n += 1", "c", "X", "if c == \"S\":\n stack.append(c)\n elif c == \"T\" and 0 < len(stack):\n stack.pop()\n pop_n += 1", "c == \"S\"", "c", "\"S\"", "stack.append(c)", "stack.append", "stack", "append", "c", "elif c == \"T\" and 0 < len(stack):\n stack.pop()\n pop_n += 1", "c == \"T\" and 0 < len(stack)", "c == \"T\"", "c", "\"T\"", "0 < len(stack)", "0", "len(stack)", "len", "stack", "stack.pop()", "stack.pop", "stack", "pop", "pop_n += 1", "pop_n", "1", "print(lx - 2 * pop_n)", "print", "lx - 2 * pop_n", "lx", "2 * pop_n", "2", "pop_n", "pop_n = 0", "0", "pop_n", "X = sys.stdin.readline().strip()", "sys.stdin.readline().strip()", "X", "pop_n += 1", "1", "pop_n", "lx = len(X)", "len(X)", "lx", "stack = []", "[]", "stack" ]
import sys X = sys.stdin.readline().strip() lx = len(X) stack = [] pop_n = 0 for c in X: if c == "S": stack.append(c) elif c == "T" and 0 < len(stack): stack.pop() pop_n += 1 print(lx - 2 * pop_n)
[ 7, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 13, 17, 42, 40, 4, 13, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 24, 18, 13, 39, 17, 3, 4, 13, 4, 13, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 60, 12 ], [ 63, 16 ], [ 20, 19 ], [ 61, 19 ], [ 64, 23 ], [ 19, 25 ], [ 19, 28 ], [ 64, 34 ], [ 64, 40 ], [ 64, 45 ], [ 64, 50 ], [ 64, 58 ], [ 60, 61 ], [ 63, 64 ] ]
[ "# -*- coding: cp932 -*-\n\nimport sys\nimport os\nimport re\nimport datetime\nimport bisect\n\n### main ###\n\nX = input()\n\nrestS = []\nfor c in X:\n #print(\"c = {}\".format(c))\n restS.append(c)\n if c == 'T':\n while(len(restS) >= 2):\n #print(\"restS = {}, last 2 string = {} \".format(restS, restS[-2:]))\n #if(\"\".join(restS[-2:]) == 'ST'):\n if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ?\n #print(\"hit restS[-2] = {}, restS[-1] = {}\".format(restS[-2], restS[-1]))\n #restS = restS[:-2] # TLE\n del restS[-2:]\n #print(\"new restS = {}\".format(restS))\n else:\n #print(\"no hit restS = {}\".format(restS))\n break # out of while\n\nprint(len(restS))", "import sys", "sys", "import os", "os", "import re", "re", "import datetime", "datetime", "import bisect", "bisect", "X = input()", "X", "input()", "input", "restS = []", "restS", "[]", "for c in X:\n #print(\"c = {}\".format(c))\n restS.append(c)\n if c == 'T':\n while(len(restS) >= 2):\n #print(\"restS = {}, last 2 string = {} \".format(restS, restS[-2:]))\n #if(\"\".join(restS[-2:]) == 'ST'):\n if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ?\n #print(\"hit restS[-2] = {}, restS[-1] = {}\".format(restS[-2], restS[-1]))\n #restS = restS[:-2] # TLE\n del restS[-2:]\n #print(\"new restS = {}\".format(restS))\n else:\n #print(\"no hit restS = {}\".format(restS))\n break # out of while", "c", "X", "restS.append(c)", "restS.append", "restS", "append", "c", "if c == 'T':\n while(len(restS) >= 2):\n #print(\"restS = {}, last 2 string = {} \".format(restS, restS[-2:]))\n #if(\"\".join(restS[-2:]) == 'ST'):\n if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ?\n #print(\"hit restS[-2] = {}, restS[-1] = {}\".format(restS[-2], restS[-1]))\n #restS = restS[:-2] # TLE\n del restS[-2:]\n #print(\"new restS = {}\".format(restS))\n else:\n #print(\"no hit restS = {}\".format(restS))\n break # out of while", "c == 'T'", "c", "'T'", "while(len(restS) >= 2):\n #print(\"restS = {}, last 2 string = {} \".format(restS, restS[-2:]))\n #if(\"\".join(restS[-2:]) == 'ST'):\n if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ?\n #print(\"hit restS[-2] = {}, restS[-1] = {}\".format(restS[-2], restS[-1]))\n #restS = restS[:-2] # TLE\n del restS[-2:]\n #print(\"new restS = {}\".format(restS))\n else:\n #print(\"no hit restS = {}\".format(restS))\n break # out of while", "len(restS) >= 2", "len(restS)", "len", "restS", "2", "if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ?\n #print(\"hit restS[-2] = {}, restS[-1] = {}\".format(restS[-2], restS[-1]))\n #restS = restS[:-2] # TLE\n del restS[-2:]\n #print(\"new restS = {}\".format(restS))\n else:\n #print(\"no hit restS = {}\".format(restS))\n break # out of while", "restS[-2] == 'S' and restS[-1] == 'T'", "restS[-2] == 'S'", "restS[-2]", "restS", "-2", "'S'", "restS[-1] == 'T'", "restS[-1]", "restS", "-1", "'T'", "del restS[-2:]", "restS[-2:]", "restS", "-2:", "-2", "break", "print(len(restS))", "print", "len(restS)", "len", "restS", "X = input()", "input()", "X", "restS = []", "[]", "restS" ]
# -*- coding: cp932 -*- import sys import os import re import datetime import bisect ### main ### X = input() restS = [] for c in X: #print("c = {}".format(c)) restS.append(c) if c == 'T': while(len(restS) >= 2): #print("restS = {}, last 2 string = {} ".format(restS, restS[-2:])) #if("".join(restS[-2:]) == 'ST'): if(restS[-2] == 'S' and restS[-1] == 'T'): # Higher Speed than join ? #print("hit restS[-2] = {}, restS[-1] = {}".format(restS[-2], restS[-1])) #restS = restS[:-2] # TLE del restS[-2:] #print("new restS = {}".format(restS)) else: #print("no hit restS = {}".format(restS)) break # out of while print(len(restS))
[ 7, 15, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 18, 4, 18, 4, 18, 4, 13, 13, 13, 39, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 2, 13, 17, 40, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 4, 13, 2, 4, 13, 13, 2, 17, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 93, 4 ], [ 105, 13 ], [ 99, 22 ], [ 108, 38 ], [ 94, 45 ], [ 111, 51 ], [ 102, 54 ], [ 58, 57 ], [ 109, 57 ], [ 57, 62 ], [ 103, 65 ], [ 97, 65 ], [ 91, 65 ], [ 90, 68 ], [ 114, 71 ], [ 57, 75 ], [ 96, 78 ], [ 109, 85 ], [ 115, 88 ], [ 112, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ] ]
[ "import sys\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(10 ** 7)\n\nx = read().rstrip().decode()[::-1]\np = 0\nm = 0\nfor xx in x:\n if xx == 'S' and m != 0:\n m -= 1\n p += 1\n if xx == 'T':\n m += 1\nprint(len(x) - 2 * p)", "import sys", "sys", "read = sys.stdin.buffer.read", "read", "sys.stdin.buffer.read", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "read", "readline = sys.stdin.buffer.readline", "readline", "sys.stdin.buffer.readline", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "readline", "readlines = sys.stdin.buffer.readlines", "readlines", "sys.stdin.buffer.readlines", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "readlines", "sys.setrecursionlimit(10 ** 7)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 7", "10", "7", "x = read().rstrip().decode()[::-1]", "x", "read().rstrip().decode()[::-1]", "().rstrip().decode()", "().rstrip().decode", "().rstrip()", "().rstrip", "()", "read", "rstrip", "decode", "::-1", "-1", "p = 0", "p", "0", "m = 0", "m", "0", "for xx in x:\n if xx == 'S' and m != 0:\n m -= 1\n p += 1\n if xx == 'T':\n m += 1", "xx", "x", "if xx == 'S' and m != 0:\n m -= 1\n p += 1\n ", "xx == 'S' and m != 0", "xx == 'S'", "xx", "'S'", "m != 0", "m", "0", "m -= 1", "m", "1", "p += 1", "p", "1", "if xx == 'T':\n m += 1", "xx == 'T'", "xx", "'T'", "m += 1", "m", "1", "print(len(x) - 2 * p)", "print", "len(x) - 2 * p", "len(x)", "len", "x", "2 * p", "2", "p", "m -= 1", "1", "m", "read = sys.stdin.buffer.read", "sys.stdin.buffer.read", "read", "m += 1", "1", "m", "readlines = sys.stdin.buffer.readlines", "sys.stdin.buffer.readlines", "readlines", "m = 0", "0", "m", "readline = sys.stdin.buffer.readline", "sys.stdin.buffer.readline", "readline", "x = read().rstrip().decode()[::-1]", "read().rstrip().decode()[::-1]", "x", "p = 0", "0", "p", "p += 1", "1", "p" ]
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) x = read().rstrip().decode()[::-1] p = 0 m = 0 for xx in x: if xx == 'S' and m != 0: m -= 1 p += 1 if xx == 'T': m += 1 print(len(x) - 2 * p)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 13, 0, 13, 17, 0, 13, 17, 4, 13, 2, 4, 13, 13, 2, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 52, 2 ], [ 58, 6 ], [ 46, 9 ], [ 13, 12 ], [ 53, 12 ], [ 12, 16 ], [ 43, 19 ], [ 12, 24 ], [ 47, 26 ], [ 50, 26 ], [ 44, 26 ], [ 55, 28 ], [ 49, 31 ], [ 53, 38 ], [ 56, 40 ], [ 59, 40 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ] ]
[ "x = input()\n\npair_cnt = 0\ns_cnt = 0\nfor i in x:\n if i == \"S\":\n s_cnt += 1\n elif i == \"T\" and s_cnt:\n pair_cnt += 1\n s_cnt -= 1\n\nprint(len(x) - pair_cnt * 2)", "x = input()", "x", "input()", "input", "pair_cnt = 0", "pair_cnt", "0", "s_cnt = 0", "s_cnt", "0", "for i in x:\n if i == \"S\":\n s_cnt += 1\n elif i == \"T\" and s_cnt:\n pair_cnt += 1\n s_cnt -= 1", "i", "x", "if i == \"S\":\n s_cnt += 1\n elif i == \"T\" and s_cnt:\n pair_cnt += 1\n s_cnt -= 1", "i == \"S\"", "i", "\"S\"", "s_cnt += 1", "s_cnt", "1", "elif i == \"T\" and s_cnt:\n pair_cnt += 1\n s_cnt -= 1", "i == \"T\" and s_cnt", "i == \"T\"", "i", "\"T\"", "s_cnt", "pair_cnt += 1", "pair_cnt", "1", "s_cnt -= 1", "s_cnt", "1", "print(len(x) - pair_cnt * 2)", "print", "len(x) - pair_cnt * 2", "len(x)", "len", "x", "pair_cnt * 2", "pair_cnt", "2", "s_cnt += 1", "1", "s_cnt", "s_cnt = 0", "0", "s_cnt", "s_cnt -= 1", "1", "s_cnt", "x = input()", "input()", "x", "pair_cnt += 1", "1", "pair_cnt", "pair_cnt = 0", "0", "pair_cnt" ]
x = input() pair_cnt = 0 s_cnt = 0 for i in x: if i == "S": s_cnt += 1 elif i == "T" and s_cnt: pair_cnt += 1 s_cnt -= 1 print(len(x) - pair_cnt * 2)
[ 7, 12, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 39, 28, 13, 13, 14, 2, 4, 13, 13, 17, 4, 18, 13, 13, 13, 14, 2, 2, 18, 13, 17, 17, 2, 13, 17, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 12, 11 ], [ 15, 14 ], [ 4, 14 ], [ 11, 20 ], [ 11, 24 ], [ 14, 26 ], [ 11, 31 ], [ 14, 35 ], [ 11, 39 ], [ 11, 43 ], [ 14, 45 ], [ 11, 50 ], [ 59, 56 ] ]
[ "def main():\n N = input().strip()\n stack = []\n for s in N:\n if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))\n\n\nif __name__ == \"__main__\":\n main()", "def main():\n N = input().strip()\n stack = []\n for s in N:\n if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "main", "N = input().strip()", "N", "input().strip()", "().strip", "()", "input", "strip", "stack = []", "stack", "[]", "for s in N:\n if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n ", "s", "N", "if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n ", "len(stack)==0", "len(stack)", "len", "stack", "0", "stack.append(s)", "stack.append", "stack", "append", "s", "elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n ", "stack[-1]==\"S\" and s==\"T\"", "stack[-1]==\"S\"", "stack[-1]", "stack", "-1", "\"S\"", "s==\"T\"", "s", "\"T\"", "stack.pop()", "stack.pop", "stack", "pop", "stack.append(s)", "stack.append", "stack", "append", "s", "print(len(stack))", "print", "len(stack)", "len", "stack", "if __name__ == \"__main__\":\n main()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "main()", "main", "def main():\n N = input().strip()\n stack = []\n for s in N:\n if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "def main():\n N = input().strip()\n stack = []\n for s in N:\n if len(stack)==0:\n stack.append(s)\n elif stack[-1]==\"S\" and s==\"T\":\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "main" ]
def main(): N = input().strip() stack = [] for s in N: if len(stack)==0: stack.append(s) elif stack[-1]=="S" and s=="T": stack.pop() else: stack.append(s) print(len(stack)) if __name__ == "__main__": main()
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 2, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 67, 4 ], [ 58, 11 ], [ 68, 15 ], [ 61, 18 ], [ 70, 21 ], [ 25, 24 ], [ 59, 29 ], [ 59, 33 ], [ 24, 34 ], [ 64, 37 ], [ 62, 41 ], [ 56, 41 ], [ 65, 41 ], [ 73, 44 ], [ 55, 47 ], [ 74, 52 ], [ 71, 52 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ] ]
[ "import sys\nreadline = sys.stdin.readline\n\nX = readline().rstrip()\n\ncnt = 0\nans = 0\n# Sが出たら1増やし、Tが出たら1減らす\n# 0のときにTが出たらansを+1する。ans * 2が答え\nfor i in range(len(X)):\n if X[i] == \"S\":\n cnt += 1\n else:\n if cnt == 0:\n ans += 1\n else:\n cnt -= 1\n \nprint(ans * 2)", "import sys", "sys", "readline = sys.stdin.readline", "readline", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "X = readline().rstrip()", "X", "readline().rstrip()", "().rstrip", "()", "readline", "rstrip", "cnt = 0", "cnt", "0", "ans = 0", "ans", "0", "for i in range(len(X)):\n if X[i] == \"S\":\n cnt += 1\n else:\n if cnt == 0:\n ans += 1\n else:\n cnt -= 1\n ", "i", "range(len(X))", "range", "len(X)", "len", "X", "if X[i] == \"S\":\n cnt += 1\n else:\n if cnt == 0:\n ans += 1\n else:\n cnt -= 1\n ", "X[i] == \"S\"", "X[i]", "X", "i", "\"S\"", "cnt += 1", "cnt", "1", "if cnt == 0:\n ans += 1\n else:\n cnt -= 1\n ", "cnt == 0", "cnt", "0", "ans += 1", "ans", "1", "cnt -= 1", "cnt", "1", "print(ans * 2)", "print", "ans * 2", "ans", "2", "cnt -= 1", "1", "cnt", "X = readline().rstrip()", "readline().rstrip()", "X", "cnt = 0", "0", "cnt", "cnt += 1", "1", "cnt", "readline = sys.stdin.readline", "sys.stdin.readline", "readline", "ans = 0", "0", "ans", "ans += 1", "1", "ans" ]
import sys readline = sys.stdin.readline X = readline().rstrip() cnt = 0 ans = 0 # Sが出たら1増やし、Tが出たら1減らす # 0のときにTが出たらansを+1する。ans * 2が答え for i in range(len(X)): if X[i] == "S": cnt += 1 else: if cnt == 0: ans += 1 else: cnt -= 1 print(ans * 2)
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 2, 13, 17, 2, 4, 13, 13, 17, 4, 18, 13, 13, 13, 14, 2, 2, 13, 17, 2, 18, 13, 17, 17, 4, 18, 13, 13, 13, 4, 18, 13, 13, 29, 4, 13, 13, 14, 2, 13, 17, 4, 13, 4, 13, 10, 12, 13, 10, 18, 13 ]
[ [ 76, 4 ], [ 14, 13 ], [ 77, 17 ], [ 21, 20 ], [ 25, 24 ], [ 13, 24 ], [ 24, 29 ], [ 20, 34 ], [ 20, 38 ], [ 24, 40 ], [ 24, 44 ], [ 20, 48 ], [ 20, 53 ], [ 24, 55 ], [ 20, 58 ], [ 20, 63 ], [ 74, 71 ], [ 76, 77 ] ]
[ "import sys\ninput = sys.stdin.readline\n# sys.setrecursionlimit(100000)\n\n\ndef main():\n X = input().strip()\n stack = list()\n for s in X:\n if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n return len(stack)\n\n\nif __name__ == \"__main__\":\n print(main())", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "def main():\n X = input().strip()\n stack = list()\n for s in X:\n if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n return len(stack)", "main", "X = input().strip()", "X", "input().strip()", "().strip", "()", "input", "strip", "stack = list()", "stack", "list()", "list", "for s in X:\n if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n ", "s", "X", "if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n ", "s == \"S\" or len(stack) < 1", "s == \"S\"", "s", "\"S\"", "len(stack) < 1", "len(stack)", "len", "stack", "1", "stack.append(s)", "stack.append", "stack", "append", "s", "elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n ", "s == \"T\" and stack[-1] == \"T\"", "s == \"T\"", "s", "\"T\"", "stack[-1] == \"T\"", "stack[-1]", "stack", "-1", "\"T\"", "stack.append(s)", "stack.append", "stack", "append", "s", "stack.pop()", "stack.pop", "stack", "pop", "return len(stack)", "len(stack)", "len", "stack", "if __name__ == \"__main__\":\n print(main())", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "print(main())", "print", "main()", "main", "def main():\n X = input().strip()\n stack = list()\n for s in X:\n if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n return len(stack)", "def main():\n X = input().strip()\n stack = list()\n for s in X:\n if s == \"S\" or len(stack) < 1:\n stack.append(s)\n elif s == \"T\" and stack[-1] == \"T\":\n stack.append(s)\n else:\n stack.pop()\n return len(stack)", "main", "input = sys.stdin.readline", "sys.stdin.readline", "input" ]
import sys input = sys.stdin.readline # sys.setrecursionlimit(100000) def main(): X = input().strip() stack = list() for s in X: if s == "S" or len(stack) < 1: stack.append(s) elif s == "T" and stack[-1] == "T": stack.append(s) else: stack.pop() return len(stack) if __name__ == "__main__": print(main())
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 2, 13, 17, 12, 13, 0, 13, 17, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 29, 2, 13, 13, 4, 13, 4, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 60, 2 ], [ 63, 8 ], [ 61, 11 ], [ 66, 13 ], [ 64, 15 ], [ 21, 20 ], [ 23, 22 ], [ 26, 25 ], [ 64, 28 ], [ 61, 32 ], [ 25, 33 ], [ 37, 36 ], [ 22, 40 ], [ 43, 40 ], [ 36, 40 ], [ 44, 43 ], [ 47, 46 ], [ 46, 50 ], [ 20, 50 ], [ 43, 51 ], [ 36, 51 ], [ 22, 51 ], [ 58, 55 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ] ]
[ "X = list(input())\nN = len(X)\nNHALF = N // 2\n\ndef solve():\n nt, ns = 0, 0\n for i in range(N):\n if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n return nt + ns\n\n\nprint(solve())", "X = list(input())", "X", "list(input())", "list", "input()", "input", "N = len(X)", "N", "len(X)", "len", "X", "NHALF = N // 2", "NHALF", "N // 2", "N", "2", "def solve():\n nt, ns = 0, 0\n for i in range(N):\n if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n return nt + ns", "solve", "nt, ns = 0, 0", "nt", "0", "ns", "0", "for i in range(N):\n if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n ", "i", "range(N)", "range", "N", "if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n ", "X[i] == 'S'", "X[i]", "X", "i", "'S'", "ns += 1", "ns", "1", "elif ns > 0:\n ns -= 1\n ", "ns > 0", "ns", "0", "ns -= 1", "ns", "1", "nt += 1", "nt", "1", "return nt + ns", "nt + ns", "nt", "ns", "print(solve())", "print", "solve()", "solve", "def solve():\n nt, ns = 0, 0\n for i in range(N):\n if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n return nt + ns", "def solve():\n nt, ns = 0, 0\n for i in range(N):\n if X[i] == 'S':\n ns += 1\n elif ns > 0:\n ns -= 1\n else:\n nt += 1\n return nt + ns", "solve", "X = list(input())", "list(input())", "X", "N = len(X)", "len(X)", "N", "NHALF = N // 2", "N // 2", "NHALF" ]
X = list(input()) N = len(X) NHALF = N // 2 def solve(): nt, ns = 0, 0 for i in range(N): if X[i] == 'S': ns += 1 elif ns > 0: ns -= 1 else: nt += 1 return nt + ns print(solve())
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 13, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 50, 2 ], [ 56, 6 ], [ 53, 9 ], [ 13, 12 ], [ 51, 12 ], [ 12, 16 ], [ 47, 19 ], [ 57, 23 ], [ 42, 23 ], [ 48, 23 ], [ 41, 26 ], [ 38, 29 ], [ 44, 32 ], [ 42, 33 ], [ 48, 33 ], [ 57, 33 ], [ 45, 36 ], [ 39, 36 ], [ 54, 36 ], [ 38, 39 ], [ 41, 42 ], [ 42, 44 ], [ 48, 44 ], [ 57, 44 ], [ 44, 45 ], [ 47, 48 ], [ 50, 51 ], [ 53, 54 ], [ 56, 57 ] ]
[ "S = input()\n\nnum_s = 0\n\nans = 0\nfor c in S:\n if c == \"S\":\n num_s += 1\n else:\n if num_s > 0:\n num_s -= 1\n else:\n ans += 1\n\nans += num_s\n\nprint(ans)", "S = input()", "S", "input()", "input", "num_s = 0", "num_s", "0", "ans = 0", "ans", "0", "for c in S:\n if c == \"S\":\n num_s += 1\n else:\n if num_s > 0:\n num_s -= 1\n else:\n ans += 1", "c", "S", "if c == \"S\":\n num_s += 1\n else:\n if num_s > 0:\n num_s -= 1\n else:\n ans += 1", "c == \"S\"", "c", "\"S\"", "num_s += 1", "num_s", "1", "if num_s > 0:\n num_s -= 1\n else:\n ans += 1", "num_s > 0", "num_s", "0", "num_s -= 1", "num_s", "1", "ans += 1", "ans", "1", "ans += num_s", "ans", "num_s", "print(ans)", "print", "ans", "ans += 1", "1", "ans", "num_s -= 1", "1", "num_s", "ans += num_s", "num_s", "ans", "num_s += 1", "1", "num_s", "S = input()", "input()", "S", "ans = 0", "0", "ans", "num_s = 0", "0", "num_s" ]
S = input() num_s = 0 ans = 0 for c in S: if c == "S": num_s += 1 else: if num_s > 0: num_s -= 1 else: ans += 1 ans += num_s print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 61, 2 ], [ 55, 6 ], [ 62, 9 ], [ 70, 11 ], [ 15, 14 ], [ 62, 19 ], [ 62, 23 ], [ 14, 24 ], [ 73, 27 ], [ 62, 32 ], [ 14, 33 ], [ 71, 37 ], [ 77, 37 ], [ 65, 37 ], [ 59, 37 ], [ 74, 37 ], [ 58, 40 ], [ 67, 43 ], [ 64, 46 ], [ 76, 49 ], [ 68, 53 ], [ 56, 53 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ] ]
[ "s = input()\nans = len(s)\ntemp1 = 0 #Sが連続\nfor i in range(len(s)):\n if s[i] == \"S\":\n temp1+=1\n elif s[i] == \"T\":\n if temp1 > 0:\n temp1-=1\n ans-=2\n else:\n temp1=0\n else:\n temp1=0\nprint(ans)", "s = input()", "s", "input()", "input", "ans = len(s)", "ans", "len(s)", "len", "s", "temp1 = 0", "temp1", "0", "for i in range(len(s)):\n if s[i] == \"S\":\n temp1+=1\n elif s[i] == \"T\":\n if temp1 > 0:\n temp1-=1\n ans-=2\n else:\n temp1=0\n else:\n temp1=0", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == \"S\":\n temp1+=1\n elif s[i] == \"T\":\n if temp1 > 0:\n temp1-=1\n ans-=2\n else:\n temp1=0\n else:\n temp1=0", "s[i] == \"S\"", "s[i]", "s", "i", "\"S\"", "temp1+=1", "temp1", "1", "elif s[i] == \"T\":\n if temp1 > 0:\n temp1-=1\n ans-=2\n else:\n temp1=0\n ", "s[i] == \"T\"", "s[i]", "s", "i", "\"T\"", "if temp1 > 0:\n temp1-=1\n ans-=2\n else:\n temp1=0\n ", "temp1 > 0", "temp1", "0", "temp1-=1", "temp1", "1", "ans-=2", "ans", "2", "temp1=0", "temp1", "0", "temp1=0", "temp1", "0", "print(ans)", "print", "ans", "ans = len(s)", "len(s)", "ans", "temp1-=1", "1", "temp1", "s = input()", "input()", "s", "temp1=0", "0", "temp1", "ans-=2", "2", "ans", "temp1 = 0", "0", "temp1", "temp1+=1", "1", "temp1", "temp1=0", "0", "temp1" ]
s = input() ans = len(s) temp1 = 0 #Sが連続 for i in range(len(s)): if s[i] == "S": temp1+=1 elif s[i] == "T": if temp1 > 0: temp1-=1 ans-=2 else: temp1=0 else: temp1=0 print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 4, 13, 13, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 46, 2 ], [ 52, 6 ], [ 43, 9 ], [ 47, 12 ], [ 15, 14 ], [ 47, 14 ], [ 14, 18 ], [ 55, 21 ], [ 53, 25 ], [ 59, 25 ], [ 50, 25 ], [ 56, 25 ], [ 49, 28 ], [ 40, 31 ], [ 58, 34 ], [ 41, 38 ], [ 44, 38 ], [ 40, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ] ]
[ "x = input()\n\nstock = 0\nrest = len(x)\n\nfor a in x:\n if a == \"S\":\n stock += 1\n else:\n if stock > 0:\n stock -= 1\n rest -= 2\n else:\n stock = 0\n\nprint(rest)", "x = input()", "x", "input()", "input", "stock = 0", "stock", "0", "rest = len(x)", "rest", "len(x)", "len", "x", "for a in x:\n if a == \"S\":\n stock += 1\n else:\n if stock > 0:\n stock -= 1\n rest -= 2\n else:\n stock = 0", "a", "x", "if a == \"S\":\n stock += 1\n else:\n if stock > 0:\n stock -= 1\n rest -= 2\n else:\n stock = 0", "a == \"S\"", "a", "\"S\"", "stock += 1", "stock", "1", "if stock > 0:\n stock -= 1\n rest -= 2\n else:\n stock = 0", "stock > 0", "stock", "0", "stock -= 1", "stock", "1", "rest -= 2", "rest", "2", "stock = 0", "stock", "0", "print(rest)", "print", "rest", "rest -= 2", "2", "rest", "rest = len(x)", "len(x)", "rest", "x = input()", "input()", "x", "stock -= 1", "1", "stock", "stock = 0", "0", "stock", "stock += 1", "1", "stock", "stock = 0", "0", "stock" ]
x = input() stock = 0 rest = len(x) for a in x: if a == "S": stock += 1 else: if stock > 0: stock -= 1 rest -= 2 else: stock = 0 print(rest)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 2, 13, 2, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 60, 2 ], [ 66, 6 ], [ 61, 9 ], [ 63, 11 ], [ 54, 14 ], [ 18, 17 ], [ 67, 20 ], [ 61, 24 ], [ 17, 25 ], [ 69, 28 ], [ 70, 33 ], [ 55, 33 ], [ 73, 33 ], [ 61, 37 ], [ 17, 38 ], [ 57, 41 ], [ 72, 44 ], [ 67, 49 ], [ 58, 52 ], [ 64, 52 ], [ 54, 55 ], [ 57, 58 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ] ]
[ "t=input()\nn=len(t)\nans=0\ns=0\nfor i in range(n):\n if t[i]==\"S\":\n s+=1\n if s>0 and t[i]==\"T\":\n ans+=1\n s-=1\nprint(n-2*ans)", "t=input()", "t", "input()", "input", "n=len(t)", "n", "len(t)", "len", "t", "ans=0", "ans", "0", "s=0", "s", "0", "for i in range(n):\n if t[i]==\"S\":\n s+=1\n if s>0 and t[i]==\"T\":\n ans+=1\n s-=1", "i", "range(n)", "range", "n", "if t[i]==\"S\":\n s+=1\n ", "t[i]==\"S\"", "t[i]", "t", "i", "\"S\"", "s+=1", "s", "1", "if s>0 and t[i]==\"T\":\n ans+=1\n s-=1", "s>0 and t[i]==\"T\"", "s>0", "s", "0", "t[i]==\"T\"", "t[i]", "t", "i", "\"T\"", "ans+=1", "ans", "1", "s-=1", "s", "1", "print(n-2*ans)", "print", "n-2*ans", "n", "2*ans", "2", "ans", "s=0", "0", "s", "ans+=1", "1", "ans", "t=input()", "input()", "t", "ans=0", "0", "ans", "n=len(t)", "len(t)", "n", "s+=1", "1", "s", "s-=1", "1", "s" ]
t=input() n=len(t) ans=0 s=0 for i in range(n): if t[i]=="S": s+=1 if s>0 and t[i]=="T": ans+=1 s-=1 print(n-2*ans)
[ 7, 15, 13, 12, 13, 15, 12, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 2, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 10, 9 ], [ 54, 11 ], [ 14, 13 ], [ 17, 16 ], [ 20, 19 ], [ 9, 19 ], [ 19, 23 ], [ 27, 26 ], [ 16, 30 ], [ 33, 30 ], [ 26, 30 ], [ 34, 33 ], [ 37, 36 ], [ 36, 41 ], [ 13, 41 ], [ 33, 42 ], [ 26, 42 ], [ 16, 42 ], [ 51, 48 ] ]
[ "import sys\ndef input(): return sys.stdin.readline().rstrip()\nfrom collections import Counter\ndef main():\n X=input()\n cunt=0\n cunt_s=0\n for x in X:\n if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n print(cunt+cunt_s)\n\nif __name__=='__main__':\n main()", "import sys", "sys", "def input(): return sys.stdin.readline().rstrip()", "input", "from collections import Counter", "def main():\n X=input()\n cunt=0\n cunt_s=0\n for x in X:\n if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n print(cunt+cunt_s)", "main", "X=input()", "X", "input()", "input", "cunt=0", "cunt", "0", "cunt_s=0", "cunt_s", "0", "for x in X:\n if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n ", "x", "X", "if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n ", "x=='S'", "x", "'S'", "cunt_s+=1", "cunt_s", "1", "elif cunt_s>0:\n cunt_s-=1\n ", "cunt_s>0", "cunt_s", "0", "cunt_s-=1", "cunt_s", "1", "cunt+=1", "cunt", "1", "print(cunt+cunt_s)", "print", "cunt+cunt_s", "cunt", "cunt_s", "if __name__=='__main__':\n main()", "__name__=='__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n X=input()\n cunt=0\n cunt_s=0\n for x in X:\n if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n print(cunt+cunt_s)", "def main():\n X=input()\n cunt=0\n cunt_s=0\n for x in X:\n if x=='S':\n cunt_s+=1\n elif cunt_s>0:\n cunt_s-=1\n else:\n cunt+=1\n print(cunt+cunt_s)", "main", "def input(): return sys.stdin.readline().rstrip()", "def input(): return sys.stdin.readline().rstrip()", "input" ]
import sys def input(): return sys.stdin.readline().rstrip() from collections import Counter def main(): X=input() cunt=0 cunt_s=0 for x in X: if x=='S': cunt_s+=1 elif cunt_s>0: cunt_s-=1 else: cunt+=1 print(cunt+cunt_s) if __name__=='__main__': main()
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 39, 28, 13, 13, 14, 40, 13, 4, 18, 13, 13, 13, 9, 14, 2, 2, 13, 17, 2, 18, 13, 17, 17, 4, 18, 13, 13, 4, 18, 13, 13, 13, 4, 13, 4, 13, 13, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 9, 8 ], [ 12, 11 ], [ 4, 11 ], [ 8, 15 ], [ 8, 18 ], [ 11, 20 ], [ 11, 25 ], [ 8, 29 ], [ 8, 34 ], [ 8, 38 ], [ 11, 40 ], [ 8, 45 ], [ 50, 47 ] ]
[ "def resolve():\n X = input()\n stack = []\n for s in X:\n if not stack:\n stack.append(s)\n continue\n if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))\n\nresolve()", "def resolve():\n X = input()\n stack = []\n for s in X:\n if not stack:\n stack.append(s)\n continue\n if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "resolve", "X = input()", "X", "input()", "input", "stack = []", "stack", "[]", "for s in X:\n if not stack:\n stack.append(s)\n continue\n if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n ", "s", "X", "if not stack:\n stack.append(s)\n continue\n ", "not stack", "stack", "stack.append(s)", "stack.append", "stack", "append", "s", "continue", "if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n ", "s == 'T' and stack[-1] == 'S'", "s == 'T'", "s", "'T'", "stack[-1] == 'S'", "stack[-1]", "stack", "-1", "'S'", "stack.pop()", "stack.pop", "stack", "pop", "stack.append(s)", "stack.append", "stack", "append", "s", "print(len(stack))", "print", "len(stack)", "len", "stack", "resolve()", "resolve", "def resolve():\n X = input()\n stack = []\n for s in X:\n if not stack:\n stack.append(s)\n continue\n if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "def resolve():\n X = input()\n stack = []\n for s in X:\n if not stack:\n stack.append(s)\n continue\n if s == 'T' and stack[-1] == 'S':\n stack.pop()\n else:\n stack.append(s)\n print(len(stack))", "resolve" ]
def resolve(): X = input() stack = [] for s in X: if not stack: stack.append(s) continue if s == 'T' and stack[-1] == 'S': stack.pop() else: stack.append(s) print(len(stack)) resolve()