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,
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,
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,
14,
2,
18,
13,
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
] | [
[
111,
2
],
[
111,
11
],
[
111,
12
],
[
108,
14
],
[
102,
18
],
[
96,
21
],
[
25,
24
],
[
109,
29
],
[
109,
33
],
[
24,
34
],
[
103,
39
],
[
106,
39
],
[
97,
40
],
[
100,
40
],
[
91,
42
],
[
94,
43
],
[
105,
45
],
[
109,
56
],
[
24,
57
],
[
103,
63
],
[
106,
63
],
[
97,
64
],
[
100,
64
],
[
91,
66
],
[
94,
67
],
[
97,
69
],
[
100,
69
],
[
94,
70
],
[
99,
72
],
[
109,
83
],
[
24,
84
],
[
111,
91
],
[
111,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
],
[
108,
109
],
[
111,
112
]
] | [
"N,A,B = map(int,input().split())\nS = input()\n\ncountA = 0\ncountB = 0\n\nfor i in range(len(S)):\n if S[i] == 'a':\n if countA+countB < A+B:\n countA += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif S[i] == 'b':\n if countA+countB < A+B and countB < B:\n countB += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif 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",
"countA = 0",
"countA",
"0",
"countB = 0",
"countB",
"0",
"for i in range(len(S)):\n if S[i] == 'a':\n if countA+countB < A+B:\n countA += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif S[i] == 'b':\n if countA+countB < A+B and countB < B:\n countB += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif S[i] == 'c':\n print(\"No\")",
"i",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if S[i] == 'a':\n if countA+countB < A+B:\n countA += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif S[i] == 'b':\n if countA+countB < A+B and countB < B:\n countB += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif S[i] == 'c':\n print(\"No\")",
"S[i] == 'a'",
"S[i]",
"S",
"i",
"'a'",
"if countA+countB < A+B:\n countA += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"countA+countB < A+B",
"countA+countB",
"countA",
"countB",
"A+B",
"A",
"B",
"countA += 1",
"countA",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == 'b':\n if countA+countB < A+B and countB < B:\n countB += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"S[i] == 'b'",
"S[i]",
"S",
"i",
"'b'",
"if countA+countB < A+B and countB < B:\n countB += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"countA+countB < A+B and countB < B",
"countA+countB < A+B",
"countA+countB",
"countA",
"countB",
"A+B",
"A",
"B",
"countB < B",
"countB",
"B",
"countB += 1",
"countB",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == 'c':\n print(\"No\")",
"S[i] == 'c'",
"S[i]",
"S",
"i",
"'c'",
"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",
"countB = 0",
"0",
"countB",
"countB += 1",
"1",
"countB",
"countA = 0",
"0",
"countA",
"countA += 1",
"1",
"countA",
"S = input()",
"input()",
"S",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N"
] | N,A,B = map(int,input().split())
S = input()
countA = 0
countB = 0
for i in range(len(S)):
if S[i] == 'a':
if countA+countB < A+B:
countA += 1
print("Yes")
else:
print("No")
elif S[i] == 'b':
if countA+countB < A+B and countB < B:
countB += 1
print("Yes")
else:
print("No")
elif S[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,
17,
0,
13,
17,
28,
13,
13,
4,
13,
13,
14,
2,
2,
13,
17,
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,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
101,
2
],
[
101,
11
],
[
101,
12
],
[
98,
14
],
[
86,
20
],
[
92,
23
],
[
99,
30
],
[
87,
37
],
[
96,
37
],
[
81,
37
],
[
90,
39
],
[
102,
40
],
[
80,
45
],
[
83,
52
],
[
87,
57
],
[
96,
57
],
[
81,
57
],
[
90,
59
],
[
102,
60
],
[
84,
62
],
[
93,
62
],
[
102,
63
],
[
95,
68
],
[
101,
78
],
[
80,
81
],
[
83,
84
],
[
86,
87
],
[
101,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
]
] | [
"N, A, B = map(int, input().split())\nS = list(input())\n\npassed = 0\nforeign = 0\n\nfor i, s in enumerate(S):\n if s == \"a\" and passed < A + B:\n print(\"Yes\")\n passed += 1\n elif s == \"b\":\n foreign += 1\n if passed < A + B and foreign <= B:\n print(\"Yes\")\n passed += 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",
"passed = 0",
"passed",
"0",
"foreign = 0",
"foreign",
"0",
"for i, s in enumerate(S):\n if s == \"a\" and passed < A + B:\n print(\"Yes\")\n passed += 1\n elif s == \"b\":\n foreign += 1\n if passed < A + B and foreign <= B:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"s",
"enumerate(S)",
"enumerate",
"S",
"if s == \"a\" and passed < A + B:\n print(\"Yes\")\n passed += 1\n elif s == \"b\":\n foreign += 1\n if passed < A + B and foreign <= B:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"s == \"a\" and passed < A + B",
"s == \"a\"",
"s",
"\"a\"",
"passed < A + B",
"passed",
"A + B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"passed += 1",
"passed",
"1",
"elif s == \"b\":\n foreign += 1\n if passed < A + B and foreign <= B:\n print(\"Yes\")\n passed += 1\n else:\n print(\"No\")\n ",
"s == \"b\"",
"s",
"\"b\"",
"foreign += 1",
"foreign",
"1",
"if passed < A + B and foreign <= B:\n print(\"Yes\")\n passed += 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",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"passed += 1",
"1",
"passed",
"foreign += 1",
"1",
"foreign",
"passed = 0",
"0",
"passed",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"foreign = 0",
"0",
"foreign",
"passed += 1",
"1",
"passed",
"S = list(input())",
"list(input())",
"S",
"B = map(int, input().split())",
"map(int, input().split())",
"B"
] | N, A, B = map(int, input().split())
S = list(input())
passed = 0
foreign = 0
for i, s in enumerate(S):
if s == "a" and passed < A + B:
print("Yes")
passed += 1
elif s == "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,
0,
13,
2,
13,
13,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
17,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
85,
2
],
[
85,
11
],
[
85,
12
],
[
70,
14
],
[
67,
18
],
[
83,
20
],
[
86,
21
],
[
24,
23
],
[
71,
23
],
[
23,
28
],
[
68,
31
],
[
65,
31
],
[
80,
31
],
[
79,
34
],
[
23,
43
],
[
86,
46
],
[
77,
46
],
[
68,
49
],
[
65,
49
],
[
80,
49
],
[
76,
52
],
[
64,
55
],
[
64,
65
],
[
67,
68
],
[
70,
71
],
[
85,
74
],
[
76,
77
],
[
79,
80
],
[
85,
83
],
[
85,
86
]
] | [
"n, a, b = map(int, input().split())\ns = input()\nc = a+b\n\nfor x in s:\n if x == 'a' and c > 0:\n c -= 1\n print('Yes')\n elif x == 'b' and b > 0 and c > 0:\n b -= 1\n c -= 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+b",
"c",
"a+b",
"a",
"b",
"for x in s:\n if x == 'a' and c > 0:\n c -= 1\n print('Yes')\n elif x == 'b' and b > 0 and c > 0:\n b -= 1\n c -= 1\n print('Yes')\n else:\n print('No')",
"x",
"s",
"if x == 'a' and c > 0:\n c -= 1\n print('Yes')\n elif x == 'b' and b > 0 and c > 0:\n b -= 1\n c -= 1\n print('Yes')\n else:\n print('No')",
"x == 'a' and c > 0",
"x == 'a'",
"x",
"'a'",
"c > 0",
"c",
"0",
"c -= 1",
"c",
"1",
"print('Yes')",
"print",
"'Yes'",
"elif x == 'b' and b > 0 and c > 0:\n b -= 1\n c -= 1\n print('Yes')\n ",
"x == 'b' and b > 0 and c > 0",
"x == 'b' and b > 0",
"x == 'b'",
"x",
"'b'",
"b > 0",
"b",
"0",
"c > 0",
"c",
"0",
"b -= 1",
"b",
"1",
"c -= 1",
"c",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"c -= 1",
"1",
"c",
"c = a+b",
"a+b",
"c",
"s = input()",
"input()",
"s",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"b -= 1",
"1",
"b",
"c -= 1",
"1",
"c",
"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()
c = a+b
for x in s:
if x == 'a' and c > 0:
c -= 1
print('Yes')
elif x == 'b' and b > 0 and c > 0:
b -= 1
c -= 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,
28,
13,
4,
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,
0,
13,
17,
14,
2,
2,
13,
13,
40,
13,
13,
0,
13,
17,
4,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
111,
2
],
[
111,
11
],
[
111,
12
],
[
93,
14
],
[
102,
18
],
[
96,
21
],
[
109,
23
],
[
112,
24
],
[
105,
26
],
[
30,
29
],
[
94,
34
],
[
94,
38
],
[
29,
39
],
[
103,
43
],
[
100,
43
],
[
88,
43
],
[
97,
44
],
[
87,
46
],
[
94,
57
],
[
29,
58
],
[
90,
61
],
[
103,
66
],
[
100,
66
],
[
88,
66
],
[
97,
67
],
[
91,
69
],
[
106,
69
],
[
112,
70
],
[
99,
72
],
[
111,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
],
[
111,
109
],
[
111,
112
]
] | [
"N,A,B = map(int,input().split())\nS = input()\npas = 0\nnum = A + B\nkaigai = 0\nfor i in range(len(S)):\n if S[i] == \"a\":\n if pas < num:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n kaigai += 1\n if pas < num and kaigai <= B:\n pas += 1\n print(\"Yes\")\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",
"S = input()",
"S",
"input()",
"input",
"pas = 0",
"pas",
"0",
"num = A + B",
"num",
"A + B",
"A",
"B",
"kaigai = 0",
"kaigai",
"0",
"for i in range(len(S)):\n if S[i] == \"a\":\n if pas < num:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n kaigai += 1\n if pas < num and kaigai <= B:\n pas += 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 pas < num:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n kaigai += 1\n if pas < num and kaigai <= B:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"if pas < num:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"pas < num",
"pas",
"num",
"pas += 1",
"pas",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == \"b\":\n kaigai += 1\n if pas < num and kaigai <= B:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"kaigai += 1",
"kaigai",
"1",
"if pas < num and kaigai <= B:\n pas += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"pas < num and kaigai <= B",
"pas < num",
"pas",
"num",
"kaigai <= B",
"kaigai",
"B",
"pas += 1",
"pas",
"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",
"pas += 1",
"1",
"pas",
"kaigai += 1",
"1",
"kaigai",
"S = input()",
"input()",
"S",
"num = A + B",
"A + B",
"num",
"pas += 1",
"1",
"pas",
"pas = 0",
"0",
"pas",
"kaigai = 0",
"0",
"kaigai",
"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()
pas = 0
num = A + B
kaigai = 0
for i in range(len(S)):
if S[i] == "a":
if pas < num:
pas += 1
print("Yes")
else:
print("No")
elif S[i] == "b":
kaigai += 1
if pas < num and kaigai <= B:
pas += 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,
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,
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
] | [
[
91,
2
],
[
91,
11
],
[
91,
12
],
[
97,
14
],
[
100,
18
],
[
79,
20
],
[
24,
23
],
[
98,
23
],
[
23,
27
],
[
23,
34
],
[
101,
39
],
[
89,
39
],
[
80,
40
],
[
95,
40
],
[
92,
42
],
[
86,
43
],
[
88,
48
],
[
23,
55
],
[
89,
61
],
[
101,
61
],
[
80,
62
],
[
95,
62
],
[
92,
64
],
[
86,
65
],
[
80,
67
],
[
95,
67
],
[
86,
68
],
[
94,
73
],
[
79,
80
],
[
91,
83
],
[
91,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
]
] | [
"N, A, B = map(int, input().split())\nS = input()\n\nX, Y = 0, 0\nfor s in S:\n if s == 'c':\n print('No')\n\n if s == 'a':\n if X + Y < A + B:\n print('Yes')\n X += 1\n else:\n print('No')\n\n if s == 'b':\n if X + Y < A + B and Y < B:\n print('Yes')\n Y += 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",
"X, Y = 0, 0",
"X",
"0",
"Y",
"0",
"for s in S:\n if s == 'c':\n print('No')\n\n if s == 'a':\n if X + Y < A + B:\n print('Yes')\n X += 1\n else:\n print('No')\n\n if s == 'b':\n if X + Y < A + B and Y < B:\n print('Yes')\n Y += 1\n else:\n print('No')",
"s",
"S",
"if s == 'c':\n print('No')\n\n ",
"s == 'c'",
"s",
"'c'",
"print('No')",
"print",
"'No'",
"if s == 'a':\n if X + Y < A + B:\n print('Yes')\n X += 1\n else:\n print('No')\n\n ",
"s == 'a'",
"s",
"'a'",
"if X + Y < A + B:\n print('Yes')\n X += 1\n else:\n print('No')\n\n ",
"X + Y < A + B",
"X + Y",
"X",
"Y",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"X += 1",
"X",
"1",
"print('No')",
"print",
"'No'",
"if s == 'b':\n if X + Y < A + B and Y < B:\n print('Yes')\n Y += 1\n else:\n print('No')",
"s == 'b'",
"s",
"'b'",
"if X + Y < A + B and Y < B:\n print('Yes')\n Y += 1\n else:\n print('No')",
"X + Y < A + B and Y < B",
"X + Y < A + B",
"X + Y",
"X",
"Y",
"A + B",
"A",
"B",
"Y < B",
"Y",
"B",
"print('Yes')",
"print",
"'Yes'",
"Y += 1",
"Y",
"1",
"print('No')",
"print",
"'No'",
"Y = 0, 0",
"0",
"Y",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"X += 1",
"1",
"X",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"Y += 1",
"1",
"Y",
"S = input()",
"input()",
"S",
"X, Y = 0, 0",
"0",
"X"
] | N, A, B = map(int, input().split())
S = input()
X, Y = 0, 0
for s in S:
if s == 'c':
print('No')
if s == 'a':
if X + Y < A + B:
print('Yes')
X += 1
else:
print('No')
if s == 'b':
if X + Y < A + B and Y < B:
print('Yes')
Y += 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,
2,
13,
2,
13,
13,
0,
13,
17,
4,
13,
17,
9,
14,
2,
13,
17,
14,
2,
2,
13,
2,
13,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
9,
4,
13,
17,
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
] | [
[
95,
2
],
[
95,
11
],
[
95,
12
],
[
92,
14
],
[
86,
18
],
[
86,
21
],
[
25,
24
],
[
93,
24
],
[
24,
28
],
[
72,
32
],
[
90,
32
],
[
84,
32
],
[
78,
34
],
[
96,
35
],
[
83,
37
],
[
24,
45
],
[
72,
50
],
[
90,
50
],
[
84,
50
],
[
78,
52
],
[
96,
53
],
[
87,
55
],
[
81,
55
],
[
96,
56
],
[
89,
58
],
[
80,
61
],
[
86,
72
],
[
95,
75
],
[
95,
78
],
[
80,
81
],
[
83,
84
],
[
86,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
]
] | [
"N,A,B = map(int,input().split())\nS = input()\n\nok = foreign = 0\nfor c in S:\n if c=='a':\n if ok < A+B:\n ok += 1\n print('Yes')\n continue\n elif c=='b':\n if ok < A+B and foreign < B:\n ok += 1\n foreign += 1\n print('Yes')\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",
"ok = foreign = 0",
"ok",
"0",
"= foreign = 0",
"foreign",
"0",
"for c in S:\n if c=='a':\n if ok < A+B:\n ok += 1\n print('Yes')\n continue\n elif c=='b':\n if ok < A+B and foreign < B:\n ok += 1\n foreign += 1\n print('Yes')\n continue\n print('No')",
"c",
"S",
"if c=='a':\n if ok < A+B:\n ok += 1\n print('Yes')\n continue\n elif c=='b':\n if ok < A+B and foreign < B:\n ok += 1\n foreign += 1\n print('Yes')\n continue\n ",
"c=='a'",
"c",
"'a'",
"if ok < A+B:\n ok += 1\n print('Yes')\n continue\n ",
"ok < A+B",
"ok",
"A+B",
"A",
"B",
"ok += 1",
"ok",
"1",
"print('Yes')",
"print",
"'Yes'",
"continue",
"elif c=='b':\n if ok < A+B and foreign < B:\n ok += 1\n foreign += 1\n print('Yes')\n continue\n ",
"c=='b'",
"c",
"'b'",
"if ok < A+B and foreign < B:\n ok += 1\n foreign += 1\n print('Yes')\n continue\n ",
"ok < A+B and foreign < B",
"ok < A+B",
"ok",
"A+B",
"A",
"B",
"foreign < B",
"foreign",
"B",
"ok += 1",
"ok",
"1",
"foreign += 1",
"foreign",
"1",
"print('Yes')",
"print",
"'Yes'",
"continue",
"print('No')",
"print",
"'No'",
"ok = foreign = 0",
"0",
"ok",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"foreign += 1",
"1",
"foreign",
"ok += 1",
"1",
"ok",
"foreign = 0",
"0",
"foreign",
"ok += 1",
"1",
"ok",
"S = input()",
"input()",
"S",
"B = map(int,input().split())",
"map(int,input().split())",
"B"
] | N,A,B = map(int,input().split())
S = input()
ok = foreign = 0
for c in S:
if c=='a':
if ok < A+B:
ok += 1
print('Yes')
continue
elif c=='b':
if ok < A+B and foreign < B:
ok += 1
foreign += 1
print('Yes')
continue
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,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
2,
13,
17,
40,
13,
13,
4,
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,
4,
13,
10,
2,
13,
10,
17,
13
] | [
[
99,
2
],
[
99,
11
],
[
99,
12
],
[
93,
14
],
[
102,
20
],
[
88,
22
],
[
91,
23
],
[
105,
25
],
[
29,
28
],
[
100,
31
],
[
94,
35
],
[
28,
36
],
[
103,
40
],
[
97,
40
],
[
82,
40
],
[
81,
46
],
[
94,
54
],
[
28,
55
],
[
84,
58
],
[
103,
63
],
[
97,
63
],
[
82,
63
],
[
85,
66
],
[
106,
66
],
[
91,
67
],
[
96,
72
],
[
81,
82
],
[
84,
85
],
[
99,
88
],
[
99,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"n,a,b = map(int,input().split())\ns = list(input())\nfinalists = a + b\nrank_b = 0\n\nfor i in range(n):\n\tif s[i] == \"a\":\n\t\tif finalists > 0:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telif s[i] == \"b\":\n\t\trank_b += 1\n\t\tif finalists > 0 and rank_b <= b:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telse:\n\t\tprint(\"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",
"finalists = a + b",
"finalists",
"a + b",
"a",
"b",
"rank_b = 0",
"rank_b",
"0",
"for i in range(n):\n\tif s[i] == \"a\":\n\t\tif finalists > 0:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telif s[i] == \"b\":\n\t\trank_b += 1\n\t\tif finalists > 0 and rank_b <= b:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telse:\n\t\tprint(\"No\")",
"i",
"range(n)",
"range",
"n",
"if s[i] == \"a\":\n\t\tif finalists > 0:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telif s[i] == \"b\":\n\t\trank_b += 1\n\t\tif finalists > 0 and rank_b <= b:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\telse:\n\t\tprint(\"No\")",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"if finalists > 0:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\t",
"finalists > 0",
"finalists",
"0",
"print(\"Yes\")",
"print",
"\"Yes\"",
"finalists -= 1",
"finalists",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif s[i] == \"b\":\n\t\trank_b += 1\n\t\tif finalists > 0 and rank_b <= b:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\t",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"rank_b += 1",
"rank_b",
"1",
"if finalists > 0 and rank_b <= b:\n\t\t\tprint(\"Yes\") \n\t\t\tfinalists -= 1\n\t\telse:\n\t\t\tprint(\"No\")\n\t",
"finalists > 0 and rank_b <= b",
"finalists > 0",
"finalists",
"0",
"rank_b <= b",
"rank_b",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"finalists -= 1",
"finalists",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"finalists -= 1",
"1",
"finalists",
"rank_b += 1",
"1",
"rank_b",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"s = list(input())",
"list(input())",
"s",
"finalists -= 1",
"1",
"finalists",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n",
"finalists = a + b",
"a + b",
"finalists",
"rank_b = 0",
"0",
"rank_b"
] | n,a,b = map(int,input().split())
s = list(input())
finalists = a + b
rank_b = 0
for i in range(n):
if s[i] == "a":
if finalists > 0:
print("Yes")
finalists -= 1
else:
print("No")
elif s[i] == "b":
rank_b += 1
if finalists > 0 and rank_b <= b:
print("Yes")
finalists -= 1
else:
print("No")
else:
print("No") |
[
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,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
9,
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,
0,
13,
17,
10,
4,
13,
10,
17,
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
] | [
[
115,
2
],
[
115,
11
],
[
115,
12
],
[
106,
14
],
[
103,
21
],
[
118,
24
],
[
28,
27
],
[
116,
30
],
[
107,
34
],
[
27,
35
],
[
107,
44
],
[
27,
45
],
[
104,
49
],
[
113,
49
],
[
98,
49
],
[
95,
51
],
[
101,
52
],
[
97,
57
],
[
107,
65
],
[
27,
66
],
[
104,
71
],
[
113,
71
],
[
98,
71
],
[
95,
73
],
[
101,
74
],
[
119,
76
],
[
110,
76
],
[
122,
76
],
[
101,
77
],
[
112,
82
],
[
121,
85
],
[
109,
91
],
[
115,
95
],
[
97,
98
],
[
115,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
],
[
112,
113
],
[
115,
116
],
[
118,
119
],
[
121,
122
]
] | [
"N,A,B = map(int,input().split())\nS = input().strip()\ncnt = 0\ncnt2 = 0\nfor i in range(N):\n if S[i]==\"c\":\n print(\"No\")\n continue\n if S[i]==\"a\":\n if cnt<A+B:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n elif S[i]==\"b\":\n if cnt<A+B and cnt2<B:\n print(\"Yes\")\n cnt += 1\n cnt2 += 1\n else:\n print(\"No\")\n cnt2 += 1",
"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",
"cnt = 0",
"cnt",
"0",
"cnt2 = 0",
"cnt2",
"0",
"for i in range(N):\n if S[i]==\"c\":\n print(\"No\")\n continue\n if S[i]==\"a\":\n if cnt<A+B:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n elif S[i]==\"b\":\n if cnt<A+B and cnt2<B:\n print(\"Yes\")\n cnt += 1\n cnt2 += 1\n else:\n print(\"No\")\n cnt2 += 1",
"i",
"range(N)",
"range",
"N",
"if S[i]==\"c\":\n print(\"No\")\n continue\n ",
"S[i]==\"c\"",
"S[i]",
"S",
"i",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"continue",
"if S[i]==\"a\":\n if cnt<A+B:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n elif S[i]==\"b\":\n if cnt<A+B and cnt2<B:\n print(\"Yes\")\n cnt += 1\n cnt2 += 1\n else:\n print(\"No\")\n cnt2 += 1",
"S[i]==\"a\"",
"S[i]",
"S",
"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 S[i]==\"b\":\n if cnt<A+B and cnt2<B:\n print(\"Yes\")\n cnt += 1\n cnt2 += 1\n else:\n print(\"No\")\n cnt2 += 1",
"S[i]==\"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"if cnt<A+B and cnt2<B:\n print(\"Yes\")\n cnt += 1\n cnt2 += 1\n else:\n print(\"No\")\n cnt2 += 1",
"cnt<A+B and cnt2<B",
"cnt<A+B",
"cnt",
"A+B",
"A",
"B",
"cnt2<B",
"cnt2",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"cnt2 += 1",
"cnt2",
"1",
"print(\"No\")",
"print",
"\"No\"",
"cnt2 += 1",
"cnt2",
"1",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"cnt += 1",
"1",
"cnt",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"cnt = 0",
"0",
"cnt",
"S = input().strip()",
"input().strip()",
"S",
"cnt2 += 1",
"1",
"cnt2",
"cnt += 1",
"1",
"cnt",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N",
"cnt2 = 0",
"0",
"cnt2",
"cnt2 += 1",
"1",
"cnt2"
] | N,A,B = map(int,input().split())
S = input().strip()
cnt = 0
cnt2 = 0
for i in range(N):
if S[i]=="c":
print("No")
continue
if S[i]=="a":
if cnt<A+B:
print("Yes")
cnt += 1
else:
print("No")
elif S[i]=="b":
if cnt<A+B and cnt2<B:
print("Yes")
cnt += 1
cnt2 += 1
else:
print("No")
cnt2 += 1 |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
0,
13,
39,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
13,
2,
13,
13,
0,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
2,
13,
17,
13,
0,
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,
39,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
132,
2
],
[
132,
11
],
[
132,
12
],
[
123,
14
],
[
111,
18
],
[
135,
21
],
[
117,
24
],
[
28,
27
],
[
109,
30
],
[
124,
34
],
[
27,
35
],
[
112,
39
],
[
124,
45
],
[
27,
46
],
[
136,
50
],
[
130,
50
],
[
121,
50
],
[
115,
52
],
[
133,
53
],
[
120,
55
],
[
112,
59
],
[
112,
64
],
[
124,
70
],
[
27,
71
],
[
136,
76
],
[
130,
76
],
[
121,
76
],
[
115,
78
],
[
133,
79
],
[
118,
82
],
[
127,
82
],
[
133,
84
],
[
129,
86
],
[
126,
89
],
[
112,
93
],
[
112,
98
],
[
103,
102
],
[
112,
102
],
[
102,
106
],
[
132,
109
],
[
111,
112
],
[
132,
115
],
[
117,
118
],
[
120,
121
],
[
123,
124
],
[
126,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
]
] | [
"n, a, b = map(int, input().split())\ns = input()\nans = []\nx = 0\ny = 0\nfor i in range(n):\n if s[i] == 'c':\n ans.append('No')\n elif s[i] == 'a':\n if x < a + b:\n x += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif s[i] == 'b':\n if x < a + b and y + 1 <= b:\n x += 1\n y += 1\n ans.append('Yes')\n else:\n ans.append('No')\n\nfor e in ans:\n print(e) ",
"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 = []",
"ans",
"[]",
"x = 0",
"x",
"0",
"y = 0",
"y",
"0",
"for i in range(n):\n if s[i] == 'c':\n ans.append('No')\n elif s[i] == 'a':\n if x < a + b:\n x += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif s[i] == 'b':\n if x < a + b and y + 1 <= b:\n x += 1\n y += 1\n ans.append('Yes')\n else:\n ans.append('No')",
"i",
"range(n)",
"range",
"n",
"if s[i] == 'c':\n ans.append('No')\n elif s[i] == 'a':\n if x < a + b:\n x += 1\n ans.append('Yes')\n else:\n ans.append('No')\n elif s[i] == 'b':\n if x < a + b and y + 1 <= b:\n x += 1\n y += 1\n ans.append('Yes')\n else:\n ans.append('No')",
"s[i] == 'c'",
"s[i]",
"s",
"i",
"'c'",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"elif s[i] == 'a':\n if x < a + b:\n x += 1\n ans.append('Yes')\n else:\n ans.append('No')\n ",
"s[i] == 'a'",
"s[i]",
"s",
"i",
"'a'",
"if x < a + b:\n x += 1\n ans.append('Yes')\n else:\n ans.append('No')\n ",
"x < a + b",
"x",
"a + b",
"a",
"b",
"x += 1",
"x",
"1",
"ans.append('Yes')",
"ans.append",
"ans",
"append",
"'Yes'",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"elif s[i] == 'b':\n if x < a + b and y + 1 <= b:\n x += 1\n y += 1\n ans.append('Yes')\n else:\n ans.append('No')",
"s[i] == 'b'",
"s[i]",
"s",
"i",
"'b'",
"if x < a + b and y + 1 <= b:\n x += 1\n y += 1\n ans.append('Yes')\n else:\n ans.append('No')",
"x < a + b and y + 1 <= b",
"x < a + b",
"x",
"a + b",
"a",
"b",
"y + 1 <= b",
"y + 1",
"y",
"1",
"b",
"x += 1",
"x",
"1",
"y += 1",
"y",
"1",
"ans.append('Yes')",
"ans.append",
"ans",
"append",
"'Yes'",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"for e in ans:\n print(e) ",
"e",
"ans",
"print(e)",
"print",
"e",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"ans = []",
"[]",
"ans",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"y = 0",
"0",
"y",
"x += 1",
"1",
"x",
"s = input()",
"input()",
"s",
"y += 1",
"1",
"y",
"x += 1",
"1",
"x",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"x = 0",
"0",
"x"
] | n, a, b = map(int, input().split())
s = input()
ans = []
x = 0
y = 0
for i in range(n):
if s[i] == 'c':
ans.append('No')
elif s[i] == 'a':
if x < a + b:
x += 1
ans.append('Yes')
else:
ans.append('No')
elif s[i] == 'b':
if x < a + b and y + 1 <= b:
x += 1
y += 1
ans.append('Yes')
else:
ans.append('No')
for e in ans:
print(e) |
[
7,
12,
13,
0,
13,
4,
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,
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,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
15
],
[
5,
16
],
[
19,
18
],
[
23,
22
],
[
25,
24
],
[
28,
27
],
[
18,
27
],
[
27,
31
],
[
22,
36
],
[
45,
36
],
[
24,
37
],
[
70,
37
],
[
15,
39
],
[
16,
40
],
[
46,
45
],
[
27,
52
],
[
22,
58
],
[
45,
58
],
[
24,
59
],
[
70,
59
],
[
15,
61
],
[
16,
62
],
[
24,
64
],
[
70,
64
],
[
16,
65
],
[
71,
70
],
[
86,
83
]
] | [
"def main():\n n, A, B = list(map(int, input().split()))\n S = input()\n a, b = 0, 0\n 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')\n\nif __name__ == '__main__':\n main()",
"def main():\n n, A, B = list(map(int, input().split()))\n S = input()\n a, b = 0, 0\n 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')",
"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",
"a, b = 0, 0",
"a",
"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'",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def main():\n n, A, B = list(map(int, input().split()))\n S = input()\n a, b = 0, 0\n 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')",
"def main():\n n, A, B = list(map(int, input().split()))\n S = input()\n a, b = 0, 0\n 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')",
"main"
] | def main():
n, A, B = list(map(int, input().split()))
S = input()
a, b = 0, 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')
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,
2,
18,
13,
13,
17,
2,
2,
13,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
14,
2,
2,
2,
18,
13,
13,
17,
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
97,
2
],
[
97,
11
],
[
97,
12
],
[
88,
14
],
[
76,
18
],
[
91,
21
],
[
25,
24
],
[
86,
27
],
[
89,
32
],
[
24,
33
],
[
80,
37
],
[
98,
38
],
[
77,
40
],
[
83,
40
],
[
92,
41
],
[
95,
41
],
[
82,
46
],
[
89,
53
],
[
24,
54
],
[
80,
58
],
[
98,
59
],
[
77,
61
],
[
83,
61
],
[
92,
62
],
[
95,
62
],
[
98,
64
],
[
92,
65
],
[
95,
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()\nkokunai = 0\nkaigai = 0\n\nfor i in range(n):\n if s[i] == \"a\" and a + b > kokunai + kaigai:\n print(\"Yes\")\n kokunai += 1\n elif s[i] == \"b\" and a + b > kokunai + kaigai and b > kaigai:\n print(\"Yes\")\n kaigai += 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",
"kokunai = 0",
"kokunai",
"0",
"kaigai = 0",
"kaigai",
"0",
"for i in range(n):\n if s[i] == \"a\" and a + b > kokunai + kaigai:\n print(\"Yes\")\n kokunai += 1\n elif s[i] == \"b\" and a + b > kokunai + kaigai and b > kaigai:\n print(\"Yes\")\n kaigai += 1\n else:\n print(\"No\")",
"i",
"range(n)",
"range",
"n",
"if s[i] == \"a\" and a + b > kokunai + kaigai:\n print(\"Yes\")\n kokunai += 1\n elif s[i] == \"b\" and a + b > kokunai + kaigai and b > kaigai:\n print(\"Yes\")\n kaigai += 1\n else:\n print(\"No\")",
"s[i] == \"a\" and a + b > kokunai + kaigai",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"a + b > kokunai + kaigai",
"a + b",
"a",
"b",
"kokunai + kaigai",
"kokunai",
"kaigai",
"print(\"Yes\")",
"print",
"\"Yes\"",
"kokunai += 1",
"kokunai",
"1",
"elif s[i] == \"b\" and a + b > kokunai + kaigai and b > kaigai:\n print(\"Yes\")\n kaigai += 1\n ",
"s[i] == \"b\" and a + b > kokunai + kaigai and b > kaigai",
"s[i] == \"b\" and a + b > kokunai + kaigai",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"a + b > kokunai + kaigai",
"a + b",
"a",
"b",
"kokunai + kaigai",
"kokunai",
"kaigai",
"b > kaigai",
"b",
"kaigai",
"print(\"Yes\")",
"print",
"\"Yes\"",
"kaigai += 1",
"kaigai",
"1",
"print(\"No\")",
"print",
"\"No\"",
"kokunai = 0",
"0",
"kokunai",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"kokunai += 1",
"1",
"kokunai",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n",
"s = input()",
"input()",
"s",
"kaigai = 0",
"0",
"kaigai",
"kaigai += 1",
"1",
"kaigai",
"b = map(int,input().split())",
"map(int,input().split())",
"b"
] | n,a,b = map(int,input().split())
s = input()
kokunai = 0
kaigai = 0
for i in range(n):
if s[i] == "a" and a + b > kokunai + kaigai:
print("Yes")
kokunai += 1
elif s[i] == "b" and a + b > kokunai + kaigai and b > kaigai:
print("Yes")
kaigai += 1
else:
print("No") |
[
7,
12,
13,
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,
17,
0,
18,
13,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
18,
13,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
13,
17,
0,
18,
13,
13,
17,
0,
13,
17,
29,
13,
23,
13,
23,
13,
23,
13,
23,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
17,
13,
13,
0,
13,
4,
13,
4,
13,
4,
18,
17,
13,
4,
13,
13,
13,
13,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
6,
5
],
[
80,
10
],
[
15,
14
],
[
18,
17
],
[
80,
22
],
[
80,
26
],
[
17,
27
],
[
76,
31
],
[
39,
31
],
[
37,
34
],
[
14,
35
],
[
17,
36
],
[
40,
39
],
[
78,
43
],
[
69,
43
],
[
51,
43
],
[
49,
46
],
[
14,
47
],
[
17,
48
],
[
52,
51
],
[
80,
56
],
[
17,
57
],
[
78,
61
],
[
69,
61
],
[
51,
61
],
[
67,
64
],
[
14,
65
],
[
17,
66
],
[
70,
69
],
[
14,
72
],
[
74,
74
],
[
76,
76
],
[
78,
78
],
[
80,
80
],
[
123,
82
],
[
123,
92
],
[
123,
93
],
[
117,
95
],
[
112,
105
],
[
121,
106
],
[
115,
107
],
[
124,
108
],
[
118,
109
],
[
123,
115
],
[
117,
118
],
[
123,
121
],
[
123,
124
]
] | [
"def solve1(n, a, b, s):\n ans = [\"No\" for i in range(len(s))]\n\n #print(\"| i|s[i]| a| b|ans[i]|\")\n #print(\"----------------------------------\")\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n return ans\n\n\nn, a, b = map(int, input().split(\" \"))\ns = input()\n\nprint(\"\\n\".join(solve1(n, a, b, s)))",
"def solve1(n, a, b, s):\n ans = [\"No\" for i in range(len(s))]\n\n #print(\"| i|s[i]| a| b|ans[i]|\")\n #print(\"----------------------------------\")\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n return ans",
"solve1",
"\"No\" 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))",
"\"No\"",
"ans = [\"No\" for i in range(len(s))]",
"ans",
"[\"No\" for i in range(len(s))]",
"for i in range(len(s)):\n if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n ",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
"s",
"if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n ",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n ",
"a > 0",
"a",
"0",
"ans[i] = \"Yes\"",
"ans[i]",
"ans",
"i",
"\"Yes\"",
"a -= 1",
"a",
"1",
"elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n ",
"b > 0",
"b",
"0",
"ans[i] = \"Yes\"",
"ans[i]",
"ans",
"i",
"\"Yes\"",
"b -= 1",
"b",
"1",
"elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n ",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n ",
"b > 0",
"b",
"0",
"ans[i] = \"Yes\"",
"ans[i]",
"ans",
"i",
"\"Yes\"",
"b -= 1",
"b",
"1",
"return ans",
"ans",
"n",
"n",
"a",
"a",
"b",
"b",
"s",
"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",
"print(\"\\n\".join(solve1(n, a, b, s)))",
"print",
"\"\\n\".join(solve1(n, a, b, s))",
"\"\\n\".join",
"\"\\n\"",
"join",
"solve1(n, a, b, s)",
"solve1",
"n",
"a",
"b",
"s",
"def solve1(n, a, b, s):\n ans = [\"No\" for i in range(len(s))]\n\n #print(\"| i|s[i]| a| b|ans[i]|\")\n #print(\"----------------------------------\")\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n return ans",
"def solve1(n, a, b, s):\n ans = [\"No\" for i in range(len(s))]\n\n #print(\"| i|s[i]| a| b|ans[i]|\")\n #print(\"----------------------------------\")\n\n for i in range(len(s)):\n if s[i] == \"a\":\n if a > 0:\n ans[i] = \"Yes\"\n a -= 1\n elif b > 0:\n ans[i] = \"Yes\"\n b -= 1\n elif s[i] == \"b\":\n if b > 0:\n ans[i] = \"Yes\"\n b -= 1\n\n #print(f\"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|\")\n\n return ans",
"solve1",
"a, b = map(int, input().split(\" \"))",
"map(int, input().split(\" \"))",
"a",
"s = input()",
"input()",
"s",
"n, a, b = map(int, input().split(\" \"))",
"map(int, input().split(\" \"))",
"n",
"b = map(int, input().split(\" \"))",
"map(int, input().split(\" \"))",
"b"
] | def solve1(n, a, b, s):
ans = ["No" for i in range(len(s))]
#print("| i|s[i]| a| b|ans[i]|")
#print("----------------------------------")
for i in range(len(s)):
if s[i] == "a":
if a > 0:
ans[i] = "Yes"
a -= 1
elif b > 0:
ans[i] = "Yes"
b -= 1
elif s[i] == "b":
if b > 0:
ans[i] = "Yes"
b -= 1
#print(f"|{i:6d}|{s[i]:4s}|{a:6d}|{b:6d}|{ans[i]:6s}|")
return ans
n, a, b = map(int, input().split(" "))
s = input()
print("\n".join(solve1(n, a, b, s)))
|
[
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,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
40,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
40,
13,
2,
13,
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,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
98,
2
],
[
98,
11
],
[
98,
12
],
[
77,
14
],
[
92,
18
],
[
83,
20
],
[
24,
23
],
[
78,
23
],
[
23,
27
],
[
23,
34
],
[
93,
38
],
[
90,
38
],
[
96,
38
],
[
87,
40
],
[
75,
41
],
[
95,
46
],
[
93,
54
],
[
90,
54
],
[
96,
54
],
[
87,
56
],
[
75,
57
],
[
84,
59
],
[
81,
59
],
[
75,
60
],
[
89,
65
],
[
80,
68
],
[
98,
75
],
[
77,
78
],
[
80,
81
],
[
83,
84
],
[
98,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
]
] | [
"N,A,B = map(int,input().split())\nS = input()\n\nt1,t2 = 0,0\nfor ch in S:\n if ch == \"c\":\n print(\"No\")\n elif ch == \"a\":\n if t1 >= A+B:\n print(\"No\")\n else:\n t1 += 1\n print(\"Yes\")\n else:\n if t1 >= A+B or t2 >= B:\n print(\"No\")\n else:\n t1 += 1\n t2 += 1\n print(\"Yes\")",
"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",
"t1,t2 = 0,0",
"t1",
"0",
"t2",
"0",
"for ch in S:\n if ch == \"c\":\n print(\"No\")\n elif ch == \"a\":\n if t1 >= A+B:\n print(\"No\")\n else:\n t1 += 1\n print(\"Yes\")\n else:\n if t1 >= A+B or t2 >= B:\n print(\"No\")\n else:\n t1 += 1\n t2 += 1\n print(\"Yes\")",
"ch",
"S",
"if ch == \"c\":\n print(\"No\")\n elif ch == \"a\":\n if t1 >= A+B:\n print(\"No\")\n else:\n t1 += 1\n print(\"Yes\")\n else:\n if t1 >= A+B or t2 >= B:\n print(\"No\")\n else:\n t1 += 1\n t2 += 1\n print(\"Yes\")",
"ch == \"c\"",
"ch",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif ch == \"a\":\n if t1 >= A+B:\n print(\"No\")\n else:\n t1 += 1\n print(\"Yes\")\n ",
"ch == \"a\"",
"ch",
"\"a\"",
"if t1 >= A+B:\n print(\"No\")\n else:\n t1 += 1\n print(\"Yes\")\n ",
"t1 >= A+B",
"t1",
"A+B",
"A",
"B",
"print(\"No\")",
"print",
"\"No\"",
"t1 += 1",
"t1",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"if t1 >= A+B or t2 >= B:\n print(\"No\")\n else:\n t1 += 1\n t2 += 1\n print(\"Yes\")",
"t1 >= A+B or t2 >= B",
"t1 >= A+B",
"t1",
"A+B",
"A",
"B",
"t2 >= B",
"t2",
"B",
"print(\"No\")",
"print",
"\"No\"",
"t1 += 1",
"t1",
"1",
"t2 += 1",
"t2",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"S = input()",
"input()",
"S",
"t2 += 1",
"1",
"t2",
"t2 = 0,0",
"0",
"t2",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"t1 += 1",
"1",
"t1",
"t1,t2 = 0,0",
"0",
"t1",
"t1 += 1",
"1",
"t1",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N"
] | N,A,B = map(int,input().split())
S = input()
t1,t2 = 0,0
for ch in S:
if ch == "c":
print("No")
elif ch == "a":
if t1 >= A+B:
print("No")
else:
t1 += 1
print("Yes")
else:
if t1 >= A+B or t2 >= B:
print("No")
else:
t1 += 1
t2 += 1
print("Yes") |
[
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,
2,
18,
13,
13,
17,
2,
13,
13,
4,
13,
17,
0,
13,
17,
14,
2,
2,
2,
18,
13,
13,
17,
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,
2,
13,
10,
17,
13,
10,
4,
13
] | [
[
105,
2
],
[
105,
13
],
[
105,
14
],
[
87,
16
],
[
99,
20
],
[
94,
22
],
[
106,
23
],
[
78,
25
],
[
102,
28
],
[
32,
31
],
[
97,
34
],
[
88,
39
],
[
31,
40
],
[
79,
43
],
[
91,
43
],
[
82,
43
],
[
100,
44
],
[
81,
49
],
[
88,
56
],
[
31,
57
],
[
79,
60
],
[
91,
60
],
[
82,
60
],
[
100,
61
],
[
103,
63
],
[
85,
63
],
[
106,
64
],
[
90,
69
],
[
84,
72
],
[
78,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
105,
94
],
[
105,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"\nN, A, B = list(map(int,input().split()))\nS = input()\nAB = A+B\n\npass_student = 0\nB_pass_student = 0\nfor i in range(N):\n if S[i] == \"a\" and pass_student < AB:\n print(\"Yes\")\n pass_student +=1\n elif S[i] ==\"b\" and pass_student < AB and B_pass_student < B:\n print(\"Yes\")\n pass_student += 1\n B_pass_student += 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",
"AB = A+B",
"AB",
"A+B",
"A",
"B",
"pass_student = 0",
"pass_student",
"0",
"B_pass_student = 0",
"B_pass_student",
"0",
"for i in range(N):\n if S[i] == \"a\" and pass_student < AB:\n print(\"Yes\")\n pass_student +=1\n elif S[i] ==\"b\" and pass_student < AB and B_pass_student < B:\n print(\"Yes\")\n pass_student += 1\n B_pass_student += 1\n else:\n print(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\" and pass_student < AB:\n print(\"Yes\")\n pass_student +=1\n elif S[i] ==\"b\" and pass_student < AB and B_pass_student < B:\n print(\"Yes\")\n pass_student += 1\n B_pass_student += 1\n else:\n print(\"No\")",
"S[i] == \"a\" and pass_student < AB",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"pass_student < AB",
"pass_student",
"AB",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_student +=1",
"pass_student",
"1",
"elif S[i] ==\"b\" and pass_student < AB and B_pass_student < B:\n print(\"Yes\")\n pass_student += 1\n B_pass_student += 1\n ",
"S[i] ==\"b\" and pass_student < AB and B_pass_student < B",
"S[i] ==\"b\" and pass_student < AB",
"S[i] ==\"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"pass_student < AB",
"pass_student",
"AB",
"B_pass_student < B",
"B_pass_student",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_student += 1",
"pass_student",
"1",
"B_pass_student += 1",
"B_pass_student",
"1",
"print(\"No\")",
"print",
"\"No\"",
"pass_student = 0",
"0",
"pass_student",
"pass_student +=1",
"1",
"pass_student",
"B_pass_student += 1",
"1",
"B_pass_student",
"S = input()",
"input()",
"S",
"pass_student += 1",
"1",
"pass_student",
"A, B = list(map(int,input().split()))",
"list(map(int,input().split()))",
"A",
"N, A, B = list(map(int,input().split()))",
"list(map(int,input().split()))",
"N",
"AB = A+B",
"A+B",
"AB",
"B_pass_student = 0",
"0",
"B_pass_student",
"B = list(map(int,input().split()))",
"list(map(int,input().split()))",
"B"
] |
N, A, B = list(map(int,input().split()))
S = input()
AB = A+B
pass_student = 0
B_pass_student = 0
for i in range(N):
if S[i] == "a" and pass_student < AB:
print("Yes")
pass_student +=1
elif S[i] =="b" and pass_student < AB and B_pass_student < B:
print("Yes")
pass_student += 1
B_pass_student += 1
else:
print("No") |
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
18,
18,
13,
13,
13,
0,
13,
13,
0,
13,
13,
12,
13,
4,
13,
31,
13,
32,
13,
4,
18,
13,
13,
23,
16,
12,
13,
23,
13,
17,
23,
12,
13,
12,
13,
12,
13,
17,
0,
13,
39,
28,
13,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
29,
4,
13,
4,
13,
13,
4,
13,
31,
13,
23,
13,
12,
13,
17,
0,
13,
39,
28,
13,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
29,
13,
23,
13,
12,
13,
17,
0,
13,
39,
28,
13,
4,
13,
13,
4,
18,
13,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
29,
13,
23,
13,
0,
13,
2,
2,
17,
17,
17,
0,
13,
2,
17,
17,
15,
15,
15,
15,
15,
15,
12,
13,
0,
13,
4,
13,
13,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
0,
13,
4,
13,
13,
13,
0,
13,
18,
4,
13,
39,
17,
0,
13,
4,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
2,
13,
13,
4,
13,
17,
4,
18,
13,
13,
13,
14,
2,
2,
2,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
2,
13,
13,
2,
18,
13,
17,
13,
4,
13,
17,
4,
18,
13,
13,
13,
4,
13,
17,
10,
4,
13,
10,
12,
13,
10,
12,
13,
10,
12,
13,
10,
2,
13,
10,
13,
13,
10,
13,
13,
10,
18,
13,
10,
12,
13,
10,
2,
13,
10,
4,
13,
10,
12,
13,
10,
12,
13,
10,
18,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13
] | [
[
296,
11
],
[
272,
18
],
[
275,
21
],
[
41,
40
],
[
52,
51
],
[
55,
54
],
[
83,
57
],
[
51,
60
],
[
297,
70
],
[
51,
81
],
[
83,
83
],
[
89,
88
],
[
92,
91
],
[
112,
94
],
[
88,
97
],
[
297,
107
],
[
88,
110
],
[
112,
112
],
[
118,
117
],
[
121,
120
],
[
141,
123
],
[
117,
126
],
[
297,
136
],
[
117,
139
],
[
141,
141
],
[
284,
143
],
[
269,
150
],
[
164,
163
],
[
175,
166
],
[
177,
167
],
[
175,
171
],
[
163,
172
],
[
177,
173
],
[
175,
175
],
[
177,
177
],
[
305,
179
],
[
267,
181
],
[
305,
182
],
[
305,
183
],
[
278,
185
],
[
297,
188
],
[
257,
192
],
[
198,
197
],
[
279,
197
],
[
197,
202
],
[
258,
207
],
[
258,
210
],
[
288,
213
],
[
306,
214
],
[
258,
220
],
[
197,
222
],
[
197,
227
],
[
258,
232
],
[
258,
235
],
[
288,
238
],
[
306,
239
],
[
258,
242
],
[
306,
244
],
[
258,
250
],
[
197,
252
],
[
257,
258
],
[
269,
270
],
[
272,
273
],
[
275,
276
],
[
278,
279
],
[
284,
285
],
[
305,
288
],
[
296,
297
],
[
305,
303
],
[
305,
306
]
] | [
"import sys\nsys.setrecursionlimit(1 << 25)\nread = sys.stdin.readline\nra = range\nenu = enumerate\n\n\ndef exit(*argv, **kwarg):\n print(*argv, **kwarg)\n sys.exit()\n\n\ndef mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))\n# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと\n\n\ndef a_int(): return int(read())\n\n\ndef ints(): return list(map(int, read().split()))\n\n\ndef read_col(H):\n '''H is number of rows\n A列、B列が与えられるようなとき\n ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return tuple(map(list, zip(*ret)))\n\n\ndef read_tuple(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(tuple(map(int, read().split())))\n return ret\n\n\ndef read_matrix(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return ret\n # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため\n\n\nMOD = 10**9 + 7\nINF = 2**31 # 2147483648 > 10**9\n# default import\nfrom collections import defaultdict, Counter, deque\nfrom operator import itemgetter, xor, add\nfrom itertools import product, permutations, combinations\nfrom bisect import bisect_left, bisect_right # , insort_left, insort_right\nfrom functools import reduce\nfrom math import gcd\n\n\ndef lcm(a, b):\n # 最小公倍数\n g = gcd(a, b)\n return a // g * b\n\n\n# https://atcoder.jp/contests/code-festival-2016-qualb/tasks/codefestival_2016_qualB_b\nN, A, B = ints()\nS = read()[:-1]\ncnt = Counter('')\nfor s in S:\n if s == 'a' and cnt['a'] + cnt['b'] < A + B:\n print('Yes')\n cnt.update(s)\n elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:\n print('Yes')\n cnt.update(s)\n else:\n print('No')\n # print(cnt)",
"import sys",
"sys",
"sys.setrecursionlimit(1 << 25)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"1 << 25",
"1",
"25",
"read = sys.stdin.readline",
"read",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"ra = range",
"ra",
"range",
"enu = enumerate",
"enu",
"enumerate",
"def exit(*argv, **kwarg):\n print(*argv, **kwarg)\n sys.exit()",
"exit",
"print(*argv, **kwarg)",
"print",
"*argv",
"argv",
"**kwarg",
"kwarg",
"sys.exit()",
"sys.exit",
"sys",
"exit",
"*argv",
"**kwarg",
"def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))\n# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと",
"mina",
"sub=1",
"sub",
"1",
"*argv",
"def a_int(): return int(read())",
"a_int",
"def ints(): return list(map(int, read().split()))",
"ints",
"def read_col(H):\n '''H is number of rows\n A列、B列が与えられるようなとき\n ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return tuple(map(list, zip(*ret)))",
"read_col",
"'''H is number of rows\n A列、B列が与えられるようなとき\n ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''",
"ret = []",
"ret",
"[]",
"for _ in range(H):\n ret.append(list(map(int, read().split())))\n ",
"_",
"range(H)",
"range",
"H",
"ret.append(list(map(int, read().split())))",
"ret.append",
"ret",
"append",
"list(map(int, read().split()))",
"list",
"map(int, read().split())",
"map",
"int",
"read().split()",
"().split",
"()",
"read",
"split",
"return tuple(map(list, zip(*ret)))",
"tuple(map(list, zip(*ret)))",
"tuple",
"map(list, zip(*ret))",
"map",
"list",
"zip(*ret)",
"zip",
"*ret",
"ret",
"H",
"H",
"def read_tuple(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(tuple(map(int, read().split())))\n return ret",
"read_tuple",
"'''H is number of rows'''",
"ret = []",
"ret",
"[]",
"for _ in range(H):\n ret.append(tuple(map(int, read().split())))\n ",
"_",
"range(H)",
"range",
"H",
"ret.append(tuple(map(int, read().split())))",
"ret.append",
"ret",
"append",
"tuple(map(int, read().split()))",
"tuple",
"map(int, read().split())",
"map",
"int",
"read().split()",
"().split",
"()",
"read",
"split",
"return ret",
"ret",
"H",
"H",
"def read_matrix(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return ret\n # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため",
"read_matrix",
"'''H is number of rows'''",
"ret = []",
"ret",
"[]",
"for _ in range(H):\n ret.append(list(map(int, read().split())))\n ",
"_",
"range(H)",
"range",
"H",
"ret.append(list(map(int, read().split())))",
"ret.append",
"ret",
"append",
"list(map(int, read().split()))",
"list",
"map(int, read().split())",
"map",
"int",
"read().split()",
"().split",
"()",
"read",
"split",
"return ret",
"ret",
"H",
"H",
"MOD = 10**9 + 7",
"MOD",
"10**9 + 7",
"10**9",
"10",
"9",
"7",
"INF = 2**31",
"INF",
"2**31",
"2",
"31",
"from collections import defaultdict, Counter, deque",
"from operator import itemgetter, xor, add",
"from itertools import product, permutations, combinations",
"from bisect import bisect_left, bisect_right",
"from functools import reduce",
"from math import gcd",
"def lcm(a, b):\n # 最小公倍数\n g = gcd(a, b)\n return a // g * b\n\n\n# https://atcoder.jp/contests/code-festival-2016-qualb/tasks/codefestival_2016_qualB_b",
"lcm",
"g = gcd(a, b)",
"g",
"gcd(a, b)",
"gcd",
"a",
"b",
"return a // g * b",
"a // g * b",
"a // g",
"a",
"g",
"b",
"a",
"a",
"b",
"b",
"N, A, B = ints()",
"N",
"ints()",
"ints",
"A",
"B",
"S = read()[:-1]",
"S",
"read()[:-1]",
"()",
"read",
":-1",
"-1",
"cnt = Counter('')",
"cnt",
"Counter('')",
"Counter",
"''",
"for s in S:\n if s == 'a' and cnt['a'] + cnt['b'] < A + B:\n print('Yes')\n cnt.update(s)\n elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:\n print('Yes')\n cnt.update(s)\n else:\n print('No')\n # print(cnt)",
"s",
"S",
"if s == 'a' and cnt['a'] + cnt['b'] < A + B:\n print('Yes')\n cnt.update(s)\n elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:\n print('Yes')\n cnt.update(s)\n else:\n print('No')\n # print(cnt)",
"s == 'a' and cnt['a'] + cnt['b'] < A + B",
"s == 'a'",
"s",
"'a'",
"cnt['a'] + cnt['b'] < A + B",
"cnt['a'] + cnt['b']",
"cnt['a']",
"cnt",
"'a'",
"cnt['b']",
"cnt",
"'b'",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"cnt.update(s)",
"cnt.update",
"cnt",
"update",
"s",
"elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:\n print('Yes')\n cnt.update(s)\n ",
"s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B",
"s == 'b' and cnt['a'] + cnt['b'] < A + B",
"s == 'b'",
"s",
"'b'",
"cnt['a'] + cnt['b'] < A + B",
"cnt['a'] + cnt['b']",
"cnt['a']",
"cnt",
"'a'",
"cnt['b']",
"cnt",
"'b'",
"A + B",
"A",
"B",
"cnt['b'] < B",
"cnt['b']",
"cnt",
"'b'",
"B",
"print('Yes')",
"print",
"'Yes'",
"cnt.update(s)",
"cnt.update",
"cnt",
"update",
"s",
"print('No')",
"print",
"'No'",
"cnt = Counter('')",
"Counter('')",
"cnt",
"def read_matrix(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return ret\n # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため",
"def read_matrix(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return ret\n # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため",
"read_matrix",
"def exit(*argv, **kwarg):\n print(*argv, **kwarg)\n sys.exit()",
"def exit(*argv, **kwarg):\n print(*argv, **kwarg)\n sys.exit()",
"exit",
"def ints(): return list(map(int, read().split()))",
"def ints(): return list(map(int, read().split()))",
"ints",
"INF = 2**31",
"2**31",
"INF",
"ra = range",
"range",
"ra",
"enu = enumerate",
"enumerate",
"enu",
"S = read()[:-1]",
"read()[:-1]",
"S",
"def read_tuple(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(tuple(map(int, read().split())))\n return ret",
"def read_tuple(H):\n '''H is number of rows'''\n ret = []\n for _ in range(H):\n ret.append(tuple(map(int, read().split())))\n return ret",
"read_tuple",
"MOD = 10**9 + 7",
"10**9 + 7",
"MOD",
"A, B = ints()",
"ints()",
"A",
"def lcm(a, b):\n # 最小公倍数\n g = gcd(a, b)\n return a // g * b\n\n\n# https://atcoder.jp/contests/code-festival-2016-qualb/tasks/codefestival_2016_qualB_b",
"def lcm(a, b):\n # 最小公倍数\n g = gcd(a, b)\n return a // g * b\n\n\n# https://atcoder.jp/contests/code-festival-2016-qualb/tasks/codefestival_2016_qualB_b",
"lcm",
"def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))\n# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと",
"def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))\n# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと",
"mina",
"read = sys.stdin.readline",
"sys.stdin.readline",
"read",
"def a_int(): return int(read())",
"def a_int(): return int(read())",
"a_int",
"N, A, B = ints()",
"ints()",
"N",
"B = ints()",
"ints()",
"B",
"def read_col(H):\n '''H is number of rows\n A列、B列が与えられるようなとき\n ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return tuple(map(list, zip(*ret)))",
"def read_col(H):\n '''H is number of rows\n A列、B列が与えられるようなとき\n ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''\n ret = []\n for _ in range(H):\n ret.append(list(map(int, read().split())))\n return tuple(map(list, zip(*ret)))",
"read_col"
] | import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate
def exit(*argv, **kwarg):
print(*argv, **kwarg)
sys.exit()
def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと
def a_int(): return int(read())
def ints(): return list(map(int, read().split()))
def read_col(H):
'''H is number of rows
A列、B列が与えられるようなとき
ex1)A,B=read_col(H) ex2) A,=read_col(H) #一列の場合'''
ret = []
for _ in range(H):
ret.append(list(map(int, read().split())))
return tuple(map(list, zip(*ret)))
def read_tuple(H):
'''H is number of rows'''
ret = []
for _ in range(H):
ret.append(tuple(map(int, read().split())))
return ret
def read_matrix(H):
'''H is number of rows'''
ret = []
for _ in range(H):
ret.append(list(map(int, read().split())))
return ret
# return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため
MOD = 10**9 + 7
INF = 2**31 # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right # , insort_left, insort_right
from functools import reduce
from math import gcd
def lcm(a, b):
# 最小公倍数
g = gcd(a, b)
return a // g * b
# https://atcoder.jp/contests/code-festival-2016-qualb/tasks/codefestival_2016_qualB_b
N, A, B = ints()
S = read()[:-1]
cnt = Counter('')
for s in S:
if s == 'a' and cnt['a'] + cnt['b'] < A + B:
print('Yes')
cnt.update(s)
elif s == 'b' and cnt['a'] + cnt['b'] < A + B and cnt['b'] < B:
print('Yes')
cnt.update(s)
else:
print('No')
# print(cnt)
|
[
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,
4,
13,
13,
4,
13,
4,
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,
14,
2,
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,
10,
17,
13
] | [
[
102,
2
],
[
102,
11
],
[
102,
12
],
[
87,
14
],
[
96,
18
],
[
105,
21
],
[
88,
28
],
[
88,
33
],
[
97,
40
],
[
109,
40
],
[
112,
40
],
[
94,
42
],
[
103,
43
],
[
111,
48
],
[
112,
60
],
[
97,
60
],
[
109,
60
],
[
94,
62
],
[
103,
63
],
[
106,
65
],
[
100,
65
],
[
103,
66
],
[
108,
71
],
[
99,
74
],
[
87,
88
],
[
102,
91
],
[
102,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
],
[
108,
109
],
[
111,
112
]
] | [
"N, A, B = map(int,input().split())\nS = input()\n\ntemp_num_people = 0\ntemp_overseas = 0\nfor s,i in zip(S,range(len(S))):\n if s == 'a':\n if temp_num_people < A+B:\n print('Yes')\n temp_num_people+=1\n else:\n print('No')\n\n if s == 'b':\n if (temp_num_people < A+B) and (temp_overseas < B):\n print('Yes')\n temp_num_people+=1\n temp_overseas+=1\n else:\n print('No')\n\n if 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 = input()",
"S",
"input()",
"input",
"temp_num_people = 0",
"temp_num_people",
"0",
"temp_overseas = 0",
"temp_overseas",
"0",
"for s,i in zip(S,range(len(S))):\n if s == 'a':\n if temp_num_people < A+B:\n print('Yes')\n temp_num_people+=1\n else:\n print('No')\n\n if s == 'b':\n if (temp_num_people < A+B) and (temp_overseas < B):\n print('Yes')\n temp_num_people+=1\n temp_overseas+=1\n else:\n print('No')\n\n if s == 'c':\n print('No')",
"s",
"i",
"zip(S,range(len(S)))",
"zip",
"S",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if s == 'a':\n if temp_num_people < A+B:\n print('Yes')\n temp_num_people+=1\n else:\n print('No')\n\n ",
"s == 'a'",
"s",
"'a'",
"if temp_num_people < A+B:\n print('Yes')\n temp_num_people+=1\n else:\n print('No')\n\n ",
"temp_num_people < A+B",
"temp_num_people",
"A+B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"temp_num_people+=1",
"temp_num_people",
"1",
"print('No')",
"print",
"'No'",
"if s == 'b':\n if (temp_num_people < A+B) and (temp_overseas < B):\n print('Yes')\n temp_num_people+=1\n temp_overseas+=1\n else:\n print('No')\n\n ",
"s == 'b'",
"s",
"'b'",
"if (temp_num_people < A+B) and (temp_overseas < B):\n print('Yes')\n temp_num_people+=1\n temp_overseas+=1\n else:\n print('No')\n\n ",
"(temp_num_people < A+B) and (temp_overseas < B)",
"temp_num_people < A+B",
"temp_num_people",
"A+B",
"A",
"B",
"temp_overseas < B",
"temp_overseas",
"B",
"print('Yes')",
"print",
"'Yes'",
"temp_num_people+=1",
"temp_num_people",
"1",
"temp_overseas+=1",
"temp_overseas",
"1",
"print('No')",
"print",
"'No'",
"if s == 'c':\n print('No')",
"s == 'c'",
"s",
"'c'",
"print('No')",
"print",
"'No'",
"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",
"temp_num_people = 0",
"0",
"temp_num_people",
"temp_overseas+=1",
"1",
"temp_overseas",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"temp_overseas = 0",
"0",
"temp_overseas",
"temp_num_people+=1",
"1",
"temp_num_people",
"temp_num_people+=1",
"1",
"temp_num_people"
] | N, A, B = map(int,input().split())
S = input()
temp_num_people = 0
temp_overseas = 0
for s,i in zip(S,range(len(S))):
if s == 'a':
if temp_num_people < A+B:
print('Yes')
temp_num_people+=1
else:
print('No')
if s == 'b':
if (temp_num_people < A+B) and (temp_overseas < B):
print('Yes')
temp_num_people+=1
temp_overseas+=1
else:
print('No')
if s == 'c':
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,
40,
13,
2,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
0,
13,
17,
0,
13,
17,
14,
40,
13,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
89,
2
],
[
89,
11
],
[
89,
12
],
[
95,
14
],
[
101,
20
],
[
92,
23
],
[
27,
26
],
[
87,
29
],
[
96,
33
],
[
26,
34
],
[
102,
41
],
[
84,
41
],
[
99,
41
],
[
78,
43
],
[
90,
44
],
[
96,
48
],
[
26,
49
],
[
98,
55
],
[
80,
58
],
[
81,
62
],
[
93,
62
],
[
90,
63
],
[
83,
68
],
[
89,
78
],
[
80,
81
],
[
83,
84
],
[
89,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
]
] | [
"n, a, b = map(int, input().split())\ns = str(input())\npass_cnt = 1\nkaigai = 0\nfor i in range(n):\n if(s[i] == \"c\"):\n # print(\"No\", \" それ以外\")\n print(\"No\")\n elif(pass_cnt <= (a+b)):\n if(s[i] == \"a\"):\n # print(\"Yes\", \" a pass_cnt= \", pass_cnt)\n print(\"Yes\")\n pass_cnt += 1\n else:\n kaigai += 1\n if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_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 = str(input())",
"s",
"str(input())",
"str",
"input()",
"input",
"pass_cnt = 1",
"pass_cnt",
"1",
"kaigai = 0",
"kaigai",
"0",
"for i in range(n):\n if(s[i] == \"c\"):\n # print(\"No\", \" それ以外\")\n print(\"No\")\n elif(pass_cnt <= (a+b)):\n if(s[i] == \"a\"):\n # print(\"Yes\", \" a pass_cnt= \", pass_cnt)\n print(\"Yes\")\n pass_cnt += 1\n else:\n kaigai += 1\n if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_cnt += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(n)",
"range",
"n",
"if(s[i] == \"c\"):\n # print(\"No\", \" それ以外\")\n print(\"No\")\n elif(pass_cnt <= (a+b)):\n if(s[i] == \"a\"):\n # print(\"Yes\", \" a pass_cnt= \", pass_cnt)\n print(\"Yes\")\n pass_cnt += 1\n else:\n kaigai += 1\n if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_cnt += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"s[i] == \"c\"",
"s[i]",
"s",
"i",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif(pass_cnt <= (a+b)):\n if(s[i] == \"a\"):\n # print(\"Yes\", \" a pass_cnt= \", pass_cnt)\n print(\"Yes\")\n pass_cnt += 1\n else:\n kaigai += 1\n if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_cnt += 1\n else:\n print(\"No\")\n ",
"pass_cnt <= (a+b)",
"pass_cnt",
"a+b",
"a",
"b",
"if(s[i] == \"a\"):\n # print(\"Yes\", \" a pass_cnt= \", pass_cnt)\n print(\"Yes\")\n pass_cnt += 1\n else:\n kaigai += 1\n if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_cnt += 1\n else:\n print(\"No\")\n ",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_cnt += 1",
"pass_cnt",
"1",
"kaigai += 1",
"kaigai",
"1",
"if(kaigai <= b):\n # print(\"Yes\", \" b kaigai= \", kaigai)\n print(\"Yes\")\n pass_cnt += 1\n else:\n print(\"No\")\n ",
"kaigai <= b",
"kaigai",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_cnt += 1",
"pass_cnt",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"kaigai += 1",
"1",
"kaigai",
"pass_cnt += 1",
"1",
"pass_cnt",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"kaigai = 0",
"0",
"kaigai",
"s = str(input())",
"str(input())",
"s",
"pass_cnt += 1",
"1",
"pass_cnt",
"pass_cnt = 1",
"1",
"pass_cnt"
] | n, a, b = map(int, input().split())
s = str(input())
pass_cnt = 1
kaigai = 0
for i in range(n):
if(s[i] == "c"):
# print("No", " それ以外")
print("No")
elif(pass_cnt <= (a+b)):
if(s[i] == "a"):
# print("Yes", " a pass_cnt= ", pass_cnt)
print("Yes")
pass_cnt += 1
else:
kaigai += 1
if(kaigai <= b):
# print("Yes", " b kaigai= ", kaigai)
print("Yes")
pass_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,
13,
17,
28,
13,
13,
14,
2,
13,
17,
4,
13,
17,
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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
97,
2
],
[
97,
11
],
[
97,
12
],
[
79,
14
],
[
88,
18
],
[
82,
20
],
[
24,
23
],
[
80,
23
],
[
23,
27
],
[
23,
35
],
[
89,
39
],
[
86,
39
],
[
83,
40
],
[
92,
40
],
[
98,
42
],
[
77,
43
],
[
85,
45
],
[
23,
54
],
[
89,
58
],
[
86,
58
],
[
83,
59
],
[
92,
59
],
[
98,
61
],
[
77,
62
],
[
83,
64
],
[
92,
64
],
[
77,
65
],
[
91,
67
],
[
97,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
],
[
97,
95
],
[
97,
98
]
] | [
"n, a, b = map(int, input().split())\ns = input()\nca, cb = 0, 0\nfor i in s:\n if i == 'c':\n print('No')\n elif i == 'a' and (ca+cb) < (a+b):\n ca += 1\n print('Yes')\n elif (i == 'b' and (ca+cb) < (a+b) and cb < b):\n cb += 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",
"ca, cb = 0, 0",
"ca",
"0",
"cb",
"0",
"for i in s:\n if i == 'c':\n print('No')\n elif i == 'a' and (ca+cb) < (a+b):\n ca += 1\n print('Yes')\n elif (i == 'b' and (ca+cb) < (a+b) and cb < b):\n cb += 1\n print('Yes')\n else:\n print('No')",
"i",
"s",
"if i == 'c':\n print('No')\n elif i == 'a' and (ca+cb) < (a+b):\n ca += 1\n print('Yes')\n elif (i == 'b' and (ca+cb) < (a+b) and cb < b):\n cb += 1\n print('Yes')\n else:\n print('No')",
"i == 'c'",
"i",
"'c'",
"print('No')",
"print",
"'No'",
"elif i == 'a' and (ca+cb) < (a+b):\n ca += 1\n print('Yes')\n ",
"i == 'a' and (ca+cb) < (a+b)",
"i == 'a'",
"i",
"'a'",
"(ca+cb) < (a+b)",
"ca+cb",
"ca",
"cb",
"a+b",
"a",
"b",
"ca += 1",
"ca",
"1",
"print('Yes')",
"print",
"'Yes'",
"elif (i == 'b' and (ca+cb) < (a+b) and cb < b):\n cb += 1\n print('Yes')\n ",
"i == 'b' and (ca+cb) < (a+b) and cb < b",
"i == 'b' and (ca+cb) < (a+b)",
"i == 'b'",
"i",
"'b'",
"(ca+cb) < (a+b)",
"ca+cb",
"ca",
"cb",
"a+b",
"a",
"b",
"cb < b",
"cb",
"b",
"cb += 1",
"cb",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"s = input()",
"input()",
"s",
"cb = 0, 0",
"0",
"cb",
"ca += 1",
"1",
"ca",
"ca, cb = 0, 0",
"0",
"ca",
"cb += 1",
"1",
"cb",
"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()
ca, cb = 0, 0
for i in s:
if i == 'c':
print('No')
elif i == 'a' and (ca+cb) < (a+b):
ca += 1
print('Yes')
elif (i == 'b' and (ca+cb) < (a+b) and cb < b):
cb += 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,
2,
18,
13,
13,
17,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
2,
13,
13,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
2,
13,
10,
2,
13,
10,
2,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
116,
2
],
[
116,
11
],
[
116,
12
],
[
113,
14
],
[
92,
18
],
[
110,
21
],
[
25,
24
],
[
90,
27
],
[
114,
32
],
[
24,
33
],
[
93,
36
],
[
96,
36
],
[
102,
36
],
[
105,
38
],
[
117,
39
],
[
101,
44
],
[
93,
46
],
[
96,
46
],
[
102,
46
],
[
114,
51
],
[
24,
52
],
[
111,
57
],
[
108,
57
],
[
99,
57
],
[
117,
58
],
[
93,
60
],
[
96,
60
],
[
102,
60
],
[
105,
62
],
[
117,
63
],
[
95,
68
],
[
93,
70
],
[
96,
70
],
[
102,
70
],
[
98,
73
],
[
111,
75
],
[
108,
75
],
[
99,
75
],
[
107,
81
],
[
111,
83
],
[
108,
83
],
[
99,
83
],
[
116,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
],
[
116,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
],
[
116,
117
]
] | [
"N,A,B=map(int,input().split())\nS=input()\n\ntukasya=0\nkaigai=0\nfor i in range(N):\n if (S[i]=='a' and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n elif S[i]=='b':\n if (kaigai<B and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n kaigai=kaigai+1\n else:\n print('No')\n kaigai=kaigai+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",
"tukasya=0",
"tukasya",
"0",
"kaigai=0",
"kaigai",
"0",
"for i in range(N):\n if (S[i]=='a' and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n elif S[i]=='b':\n if (kaigai<B and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n kaigai=kaigai+1\n else:\n print('No')\n kaigai=kaigai+1\n else:\n print('No')",
"i",
"range(N)",
"range",
"N",
"if (S[i]=='a' and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n elif S[i]=='b':\n if (kaigai<B and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n kaigai=kaigai+1\n else:\n print('No')\n kaigai=kaigai+1\n else:\n print('No')",
"S[i]=='a' and tukasya<A+B",
"S[i]=='a'",
"S[i]",
"S",
"i",
"'a'",
"tukasya<A+B",
"tukasya",
"A+B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"tukasya=tukasya+1",
"tukasya",
"tukasya+1",
"tukasya",
"1",
"elif S[i]=='b':\n if (kaigai<B and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n kaigai=kaigai+1\n else:\n print('No')\n kaigai=kaigai+1\n ",
"S[i]=='b'",
"S[i]",
"S",
"i",
"'b'",
"if (kaigai<B and tukasya<A+B):\n print('Yes')\n tukasya=tukasya+1\n kaigai=kaigai+1\n else:\n print('No')\n kaigai=kaigai+1\n ",
"kaigai<B and tukasya<A+B",
"kaigai<B",
"kaigai",
"B",
"tukasya<A+B",
"tukasya",
"A+B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"tukasya=tukasya+1",
"tukasya",
"tukasya+1",
"tukasya",
"1",
"kaigai=kaigai+1",
"kaigai",
"kaigai+1",
"kaigai",
"1",
"print('No')",
"print",
"'No'",
"kaigai=kaigai+1",
"kaigai",
"kaigai+1",
"kaigai",
"1",
"print('No')",
"print",
"'No'",
"N,A,B=map(int,input().split())",
"map(int,input().split())",
"N",
"tukasya=0",
"0",
"tukasya",
"tukasya=tukasya+1",
"tukasya+1",
"tukasya",
"kaigai=kaigai+1",
"kaigai+1",
"kaigai",
"tukasya=tukasya+1",
"tukasya+1",
"tukasya",
"A,B=map(int,input().split())",
"map(int,input().split())",
"A",
"kaigai=kaigai+1",
"kaigai+1",
"kaigai",
"kaigai=0",
"0",
"kaigai",
"S=input()",
"input()",
"S",
"B=map(int,input().split())",
"map(int,input().split())",
"B"
] | N,A,B=map(int,input().split())
S=input()
tukasya=0
kaigai=0
for i in range(N):
if (S[i]=='a' and tukasya<A+B):
print('Yes')
tukasya=tukasya+1
elif S[i]=='b':
if (kaigai<B and tukasya<A+B):
print('Yes')
tukasya=tukasya+1
kaigai=kaigai+1
else:
print('No')
kaigai=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,
4,
13,
13,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
18,
13,
13,
17,
2,
2,
13,
13,
17,
4,
13,
17,
14,
2,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
18,
13,
13,
17,
2,
13,
17,
4,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
2,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
2,
13
] | [
[
100,
2
],
[
100,
11
],
[
100,
12
],
[
82,
14
],
[
97,
20
],
[
83,
23
],
[
26,
25
],
[
98,
30
],
[
83,
30
],
[
98,
35
],
[
83,
35
],
[
25,
36
],
[
101,
40
],
[
89,
40
],
[
95,
41
],
[
92,
41
],
[
104,
41
],
[
101,
48
],
[
89,
48
],
[
88,
51
],
[
101,
53
],
[
89,
53
],
[
103,
56
],
[
95,
58
],
[
92,
58
],
[
104,
58
],
[
98,
64
],
[
83,
64
],
[
25,
65
],
[
95,
68
],
[
92,
68
],
[
104,
68
],
[
91,
74
],
[
95,
76
],
[
92,
76
],
[
104,
76
],
[
82,
83
],
[
100,
86
],
[
88,
89
],
[
91,
92
],
[
100,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
]
] | [
"n,a,b=map(int,input().split())\ns=str(input())\ns=list(s)\nfor i in range(len(s)):\n if s[i]==\"a\" and a+b>0:\n print(\"Yes\")\n if a>0:\n a=a-1\n else:\n b=b-1\n elif s[i]==\"b\" and b>0:\n print(\"Yes\")\n b=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=str(input())",
"s",
"str(input())",
"str",
"input()",
"input",
"s=list(s)",
"s",
"list(s)",
"list",
"s",
"for i in range(len(s)):\n if s[i]==\"a\" and a+b>0:\n print(\"Yes\")\n if a>0:\n a=a-1\n else:\n b=b-1\n elif s[i]==\"b\" and b>0:\n print(\"Yes\")\n b=b-1\n else:\n print(\"No\")",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
"s",
"if s[i]==\"a\" and a+b>0:\n print(\"Yes\")\n if a>0:\n a=a-1\n else:\n b=b-1\n elif s[i]==\"b\" and b>0:\n print(\"Yes\")\n b=b-1\n else:\n print(\"No\")",
"s[i]==\"a\" and a+b>0",
"s[i]==\"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"a+b>0",
"a+b",
"a",
"b",
"0",
"print(\"Yes\")",
"print",
"\"Yes\"",
"if a>0:\n a=a-1\n else:\n b=b-1\n ",
"a>0",
"a",
"0",
"a=a-1",
"a",
"a-1",
"a",
"1",
"b=b-1",
"b",
"b-1",
"b",
"1",
"elif s[i]==\"b\" and b>0:\n print(\"Yes\")\n b=b-1\n ",
"s[i]==\"b\" and b>0",
"s[i]==\"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"b>0",
"b",
"0",
"print(\"Yes\")",
"print",
"\"Yes\"",
"b=b-1",
"b",
"b-1",
"b",
"1",
"print(\"No\")",
"print",
"\"No\"",
"s=str(input())",
"str(input())",
"s",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"a=a-1",
"a-1",
"a",
"b=b-1",
"b-1",
"b",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"s=list(s)",
"list(s)",
"s",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"b=b-1",
"b-1",
"b"
] | n,a,b=map(int,input().split())
s=str(input())
s=list(s)
for i in range(len(s)):
if s[i]=="a" and a+b>0:
print("Yes")
if a>0:
a=a-1
else:
b=b-1
elif s[i]=="b" and b>0:
print("Yes")
b=b-1
else:
print("No") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
2,
39,
17,
4,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
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,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
107,
2
],
[
107,
11
],
[
107,
12
],
[
98,
14
],
[
110,
23
],
[
101,
26
],
[
30,
29
],
[
90,
34
],
[
99,
39
],
[
29,
40
],
[
111,
44
],
[
105,
44
],
[
93,
44
],
[
108,
46
],
[
96,
47
],
[
92,
52
],
[
99,
60
],
[
29,
61
],
[
111,
66
],
[
105,
66
],
[
93,
66
],
[
108,
68
],
[
96,
69
],
[
102,
71
],
[
114,
71
],
[
96,
72
],
[
104,
77
],
[
113,
80
],
[
107,
90
],
[
92,
93
],
[
107,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
]
] | [
"N,A,B = map(int, input().split())\nS = [\"*\"]+list(input())\n\nfinalist = 0\nforeigner_student_finalist = 0\n\nfor i in range(1,N+1):\n if S[i] == \"a\":\n if finalist < A+B:\n print(\"Yes\")\n finalist += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if finalist < A+B and foreigner_student_finalist < B:\n print(\"Yes\")\n finalist += 1\n foreigner_student_finalist += 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())",
"list",
"input()",
"input",
"finalist = 0",
"finalist",
"0",
"foreigner_student_finalist = 0",
"foreigner_student_finalist",
"0",
"for i in range(1,N+1):\n if S[i] == \"a\":\n if finalist < A+B:\n print(\"Yes\")\n finalist += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if finalist < A+B and foreigner_student_finalist < B:\n print(\"Yes\")\n finalist += 1\n foreigner_student_finalist += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(1,N+1)",
"range",
"1",
"N+1",
"N",
"1",
"if S[i] == \"a\":\n if finalist < A+B:\n print(\"Yes\")\n finalist += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n if finalist < A+B and foreigner_student_finalist < B:\n print(\"Yes\")\n finalist += 1\n foreigner_student_finalist += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"if finalist < A+B:\n print(\"Yes\")\n finalist += 1\n else:\n print(\"No\")\n ",
"finalist < A+B",
"finalist",
"A+B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"finalist += 1",
"finalist",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == \"b\":\n if finalist < A+B and foreigner_student_finalist < B:\n print(\"Yes\")\n finalist += 1\n foreigner_student_finalist += 1\n else:\n print(\"No\")\n ",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"if finalist < A+B and foreigner_student_finalist < B:\n print(\"Yes\")\n finalist += 1\n foreigner_student_finalist += 1\n else:\n print(\"No\")\n ",
"finalist < A+B and foreigner_student_finalist < B",
"finalist < A+B",
"finalist",
"A+B",
"A",
"B",
"foreigner_student_finalist < B",
"foreigner_student_finalist",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"finalist += 1",
"finalist",
"1",
"foreigner_student_finalist += 1",
"foreigner_student_finalist",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"N,A,B = map(int, input().split())",
"map(int, input().split())",
"N",
"finalist += 1",
"1",
"finalist",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"S = [\"*\"]+list(input())",
"[\"*\"]+list(input())",
"S",
"foreigner_student_finalist = 0",
"0",
"foreigner_student_finalist",
"finalist += 1",
"1",
"finalist",
"A,B = map(int, input().split())",
"map(int, input().split())",
"A",
"finalist = 0",
"0",
"finalist",
"foreigner_student_finalist += 1",
"1",
"foreigner_student_finalist"
] | N,A,B = map(int, input().split())
S = ["*"]+list(input())
finalist = 0
foreigner_student_finalist = 0
for i in range(1,N+1):
if S[i] == "a":
if finalist < A+B:
print("Yes")
finalist += 1
else:
print("No")
elif S[i] == "b":
if finalist < A+B and foreigner_student_finalist < B:
print("Yes")
finalist += 1
foreigner_student_finalist += 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,
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,
40,
13,
2,
13,
17,
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,
4,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
95,
2
],
[
95,
11
],
[
95,
12
],
[
89,
14
],
[
77,
18
],
[
98,
21
],
[
25,
24
],
[
90,
24
],
[
24,
28
],
[
78,
32
],
[
87,
32
],
[
102,
32
],
[
93,
34
],
[
96,
35
],
[
101,
40
],
[
24,
47
],
[
78,
52
],
[
87,
52
],
[
102,
52
],
[
93,
54
],
[
96,
55
],
[
99,
57
],
[
81,
57
],
[
96,
59
],
[
86,
65
],
[
80,
68
],
[
77,
78
],
[
80,
81
],
[
95,
84
],
[
86,
87
],
[
89,
90
],
[
95,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
]
] | [
"n,a,b=map(int,input().split())\ns=input()\npassed=0\nabroad_passed=0\nfor i in s:\n if i==\"a\":\n if passed<a+b:\n print(\"Yes\")\n passed+=1\n else:\n print(\"No\")\n elif i==\"b\":\n if passed<a+b and abroad_passed<=b-1:\n print(\"Yes\")\n passed+=1\n abroad_passed+=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",
"passed=0",
"passed",
"0",
"abroad_passed=0",
"abroad_passed",
"0",
"for i in s:\n if i==\"a\":\n if passed<a+b:\n print(\"Yes\")\n passed+=1\n else:\n print(\"No\")\n elif i==\"b\":\n if passed<a+b and abroad_passed<=b-1:\n print(\"Yes\")\n passed+=1\n abroad_passed+=1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"s",
"if i==\"a\":\n if passed<a+b:\n print(\"Yes\")\n passed+=1\n else:\n print(\"No\")\n elif i==\"b\":\n if passed<a+b and abroad_passed<=b-1:\n print(\"Yes\")\n passed+=1\n abroad_passed+=1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i==\"a\"",
"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 i==\"b\":\n if passed<a+b and abroad_passed<=b-1:\n print(\"Yes\")\n passed+=1\n abroad_passed+=1\n else:\n print(\"No\")\n ",
"i==\"b\"",
"i",
"\"b\"",
"if passed<a+b and abroad_passed<=b-1:\n print(\"Yes\")\n passed+=1\n abroad_passed+=1\n else:\n print(\"No\")\n ",
"passed<a+b and abroad_passed<=b-1",
"passed<a+b",
"passed",
"a+b",
"a",
"b",
"abroad_passed<=b-1",
"abroad_passed",
"b-1",
"b",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"passed+=1",
"passed",
"1",
"abroad_passed+=1",
"abroad_passed",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"passed=0",
"0",
"passed",
"abroad_passed+=1",
"1",
"abroad_passed",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"passed+=1",
"1",
"passed",
"s=input()",
"input()",
"s",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"abroad_passed=0",
"0",
"abroad_passed",
"passed+=1",
"1",
"passed"
] | n,a,b=map(int,input().split())
s=input()
passed=0
abroad_passed=0
for i in s:
if i=="a":
if passed<a+b:
print("Yes")
passed+=1
else:
print("No")
elif i=="b":
if passed<a+b and abroad_passed<=b-1:
print("Yes")
passed+=1
abroad_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,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
14,
2,
2,
18,
13,
13,
17,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
100,
2
],
[
100,
11
],
[
100,
12
],
[
103,
14
],
[
109,
20
],
[
115,
23
],
[
27,
26
],
[
104,
31
],
[
104,
35
],
[
26,
36
],
[
104,
45
],
[
26,
46
],
[
110,
49
],
[
113,
49
],
[
107,
49
],
[
92,
51
],
[
98,
52
],
[
106,
57
],
[
104,
62
],
[
26,
63
],
[
94,
66
],
[
110,
71
],
[
113,
71
],
[
107,
71
],
[
92,
73
],
[
98,
74
],
[
95,
76
],
[
116,
76
],
[
98,
77
],
[
112,
82
],
[
100,
92
],
[
94,
95
],
[
100,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
],
[
112,
113
],
[
115,
116
]
] | [
"#入力\nn,a,b = map(int, input().split())\ns = list(input()) #1文字ずつリストに格納する\n#総通過人数\npass_contest = 0\n#海外学生の順位\nrank_overseas = 0\nfor i in range(len(s)):\n if s[i] == \"c\":\n print(\"No\")\n elif s[i] == \"a\" and pass_contest < a+b:\n print(\"Yes\")\n pass_contest += 1\n elif s[i] == \"b\":\n rank_overseas += 1\n if pass_contest < a+b and rank_overseas <= b:\n print(\"Yes\")\n pass_contest += 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",
"pass_contest = 0",
"pass_contest",
"0",
"rank_overseas = 0",
"rank_overseas",
"0",
"for i in range(len(s)):\n if s[i] == \"c\":\n print(\"No\")\n elif s[i] == \"a\" and pass_contest < a+b:\n print(\"Yes\")\n pass_contest += 1\n elif s[i] == \"b\":\n rank_overseas += 1\n if pass_contest < a+b and rank_overseas <= b:\n print(\"Yes\")\n pass_contest += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
"s",
"if s[i] == \"c\":\n print(\"No\")\n elif s[i] == \"a\" and pass_contest < a+b:\n print(\"Yes\")\n pass_contest += 1\n elif s[i] == \"b\":\n rank_overseas += 1\n if pass_contest < a+b and rank_overseas <= b:\n print(\"Yes\")\n pass_contest += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"s[i] == \"c\"",
"s[i]",
"s",
"i",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif s[i] == \"a\" and pass_contest < a+b:\n print(\"Yes\")\n pass_contest += 1\n ",
"s[i] == \"a\" and pass_contest < a+b",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"pass_contest < a+b",
"pass_contest",
"a+b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_contest += 1",
"pass_contest",
"1",
"elif s[i] == \"b\":\n rank_overseas += 1\n if pass_contest < a+b and rank_overseas <= b:\n print(\"Yes\")\n pass_contest += 1\n else:\n print(\"No\")\n ",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"rank_overseas += 1",
"rank_overseas",
"1",
"if pass_contest < a+b and rank_overseas <= b:\n print(\"Yes\")\n pass_contest += 1\n else:\n print(\"No\")\n ",
"pass_contest < a+b and rank_overseas <= b",
"pass_contest < a+b",
"pass_contest",
"a+b",
"a",
"b",
"rank_overseas <= b",
"rank_overseas",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_contest += 1",
"pass_contest",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"a,b = map(int, input().split())",
"map(int, input().split())",
"a",
"rank_overseas += 1",
"1",
"rank_overseas",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"n,a,b = map(int, input().split())",
"map(int, input().split())",
"n",
"s = list(input())",
"list(input())",
"s",
"pass_contest += 1",
"1",
"pass_contest",
"pass_contest = 0",
"0",
"pass_contest",
"pass_contest += 1",
"1",
"pass_contest",
"rank_overseas = 0",
"0",
"rank_overseas"
] | #入力
n,a,b = map(int, input().split())
s = list(input()) #1文字ずつリストに格納する
#総通過人数
pass_contest = 0
#海外学生の順位
rank_overseas = 0
for i in range(len(s)):
if s[i] == "c":
print("No")
elif s[i] == "a" and pass_contest < a+b:
print("Yes")
pass_contest += 1
elif s[i] == "b":
rank_overseas += 1
if pass_contest < a+b and rank_overseas <= b:
print("Yes")
pass_contest += 1
else:
print("No")
else:
print("No") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
15,
13,
0,
13,
2,
13,
13,
0,
13,
13,
28,
13,
13,
14,
2,
13,
17,
4,
13,
17,
9,
14,
2,
13,
17,
14,
2,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
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,
4,
13,
10,
17,
13,
10,
13,
13,
10,
4,
13,
10,
2,
13,
10,
4,
13,
10,
17,
13
] | [
[
97,
2
],
[
97,
11
],
[
97,
12
],
[
79,
14
],
[
94,
20
],
[
92,
22
],
[
98,
23
],
[
88,
25
],
[
98,
26
],
[
29,
28
],
[
80,
28
],
[
28,
32
],
[
28,
40
],
[
95,
44
],
[
77,
44
],
[
101,
44
],
[
100,
50
],
[
95,
58
],
[
77,
58
],
[
101,
58
],
[
89,
61
],
[
86,
61
],
[
85,
67
],
[
76,
70
],
[
76,
77
],
[
79,
80
],
[
97,
83
],
[
85,
86
],
[
98,
88
],
[
88,
89
],
[
97,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
]
] | [
"N, A, B = map(int, input().split())\nS = input()\n\nimport sys\n\nT = A + B\nTa = B\n\nfor p in S:\n if p == \"c\":\n print(\"No\")\n continue\n \n elif p == \"a\":\n if T > 0:\n print(\"Yes\")\n T -= 1\n else:\n print(\"No\")\n \n else:\n if T > 0 and Ta > 0:\n print(\"Yes\")\n Ta -= 1\n T -= 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",
"import sys",
"sys",
"T = A + B",
"T",
"A + B",
"A",
"B",
"Ta = B",
"Ta",
"B",
"for p in S:\n if p == \"c\":\n print(\"No\")\n continue\n \n elif p == \"a\":\n if T > 0:\n print(\"Yes\")\n T -= 1\n else:\n print(\"No\")\n \n else:\n if T > 0 and Ta > 0:\n print(\"Yes\")\n Ta -= 1\n T -= 1\n else:\n print(\"No\")",
"p",
"S",
"if p == \"c\":\n print(\"No\")\n continue\n \n elif p == \"a\":\n if T > 0:\n print(\"Yes\")\n T -= 1\n else:\n print(\"No\")\n \n else:\n if T > 0 and Ta > 0:\n print(\"Yes\")\n Ta -= 1\n T -= 1\n else:\n print(\"No\")",
"p == \"c\"",
"p",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"continue",
"elif p == \"a\":\n if T > 0:\n print(\"Yes\")\n T -= 1\n else:\n print(\"No\")\n \n ",
"p == \"a\"",
"p",
"\"a\"",
"if T > 0:\n print(\"Yes\")\n T -= 1\n else:\n print(\"No\")\n \n ",
"T > 0",
"T",
"0",
"print(\"Yes\")",
"print",
"\"Yes\"",
"T -= 1",
"T",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if T > 0 and Ta > 0:\n print(\"Yes\")\n Ta -= 1\n T -= 1\n else:\n print(\"No\")",
"T > 0 and Ta > 0",
"T > 0",
"T",
"0",
"Ta > 0",
"Ta",
"0",
"print(\"Yes\")",
"print",
"\"Yes\"",
"Ta -= 1",
"Ta",
"1",
"T -= 1",
"T",
"1",
"print(\"No\")",
"print",
"\"No\"",
"T -= 1",
"1",
"T",
"S = input()",
"input()",
"S",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"Ta -= 1",
"1",
"Ta",
"Ta = B",
"B",
"Ta",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"T = A + B",
"A + B",
"T",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"T -= 1",
"1",
"T"
] | N, A, B = map(int, input().split())
S = input()
import sys
T = A + B
Ta = B
for p in S:
if p == "c":
print("No")
continue
elif p == "a":
if T > 0:
print("Yes")
T -= 1
else:
print("No")
else:
if T > 0 and Ta > 0:
print("Yes")
Ta -= 1
T -= 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,
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,
40,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
13,
17,
4,
13,
17,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
100,
2
],
[
100,
11
],
[
100,
12
],
[
82,
14
],
[
103,
18
],
[
79,
21
],
[
25,
24
],
[
83,
24
],
[
24,
28
],
[
104,
32
],
[
95,
32
],
[
92,
32
],
[
89,
34
],
[
101,
35
],
[
91,
40
],
[
24,
47
],
[
92,
52
],
[
104,
52
],
[
95,
52
],
[
89,
54
],
[
101,
55
],
[
80,
57
],
[
86,
57
],
[
101,
58
],
[
94,
63
],
[
85,
66
],
[
24,
73
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
100,
89
],
[
91,
92
],
[
94,
95
],
[
100,
98
],
[
100,
101
],
[
103,
104
]
] | [
"n, a, b = map(int, input().split())\nS = input()\n\ncnt = 0\noversea = 1\nfor s in S:\n #print(s)\n if s == \"a\":\n if cnt < a+b:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n if s == \"b\":\n if cnt < a+b and oversea <= b:\n print(\"Yes\")\n cnt += 1\n oversea += 1\n else:\n print(\"No\")\n if 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 = input()",
"S",
"input()",
"input",
"cnt = 0",
"cnt",
"0",
"oversea = 1",
"oversea",
"1",
"for s in S:\n #print(s)\n if s == \"a\":\n if cnt < a+b:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n if s == \"b\":\n if cnt < a+b and oversea <= b:\n print(\"Yes\")\n cnt += 1\n oversea += 1\n else:\n print(\"No\")\n if s == \"c\":\n print(\"No\")",
"s",
"S",
"if s == \"a\":\n if cnt < a+b:\n print(\"Yes\")\n cnt += 1\n else:\n print(\"No\")\n ",
"s == \"a\"",
"s",
"\"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\"",
"if s == \"b\":\n if cnt < a+b and oversea <= b:\n print(\"Yes\")\n cnt += 1\n oversea += 1\n else:\n print(\"No\")\n ",
"s == \"b\"",
"s",
"\"b\"",
"if cnt < a+b and oversea <= b:\n print(\"Yes\")\n cnt += 1\n oversea += 1\n else:\n print(\"No\")\n ",
"cnt < a+b and oversea <= b",
"cnt < a+b",
"cnt",
"a+b",
"a",
"b",
"oversea <= b",
"oversea",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"oversea += 1",
"oversea",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if s == \"c\":\n print(\"No\")",
"s == \"c\"",
"s",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"oversea = 1",
"1",
"oversea",
"S = input()",
"input()",
"S",
"oversea += 1",
"1",
"oversea",
"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",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"cnt = 0",
"0",
"cnt"
] | n, a, b = map(int, input().split())
S = input()
cnt = 0
oversea = 1
for s in S:
#print(s)
if s == "a":
if cnt < a+b:
print("Yes")
cnt += 1
else:
print("No")
if s == "b":
if cnt < a+b and oversea <= b:
print("Yes")
cnt += 1
oversea += 1
else:
print("No")
if s == "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,
0,
13,
18,
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
17,
13
] | [
[
94,
2
],
[
94,
11
],
[
94,
12
],
[
76,
14
],
[
97,
18
],
[
82,
21
],
[
25,
24
],
[
95,
27
],
[
100,
29
],
[
77,
31
],
[
24,
32
],
[
101,
36
],
[
98,
39
],
[
80,
39
],
[
104,
39
],
[
86,
41
],
[
89,
42
],
[
103,
47
],
[
101,
53
],
[
98,
56
],
[
80,
56
],
[
104,
56
],
[
86,
58
],
[
89,
59
],
[
83,
61
],
[
92,
61
],
[
89,
62
],
[
79,
67
],
[
91,
70
],
[
76,
77
],
[
79,
80
],
[
82,
83
],
[
94,
86
],
[
94,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
]
] | [
"n,a,b=map(int,input().split())\ntext=input()\n\nnum=0\nf=1\nfor i in range(n):\n alp=text[i]\n if alp=='a' and num<(a+b):\n print(\"Yes\")\n num+=1\n elif alp=='b' and num<(a+b) and f<=b:\n print(\"Yes\")\n num+=1\n 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",
"text=input()",
"text",
"input()",
"input",
"num=0",
"num",
"0",
"f=1",
"f",
"1",
"for i in range(n):\n alp=text[i]\n if alp=='a' and num<(a+b):\n print(\"Yes\")\n num+=1\n elif alp=='b' and num<(a+b) and f<=b:\n print(\"Yes\")\n num+=1\n f+=1\n else:\n print(\"No\")",
"i",
"range(n)",
"range",
"n",
"alp=text[i]",
"alp",
"text[i]",
"text",
"i",
"if alp=='a' and num<(a+b):\n print(\"Yes\")\n num+=1\n elif alp=='b' and num<(a+b) and f<=b:\n print(\"Yes\")\n num+=1\n f+=1\n else:\n print(\"No\")",
"alp=='a' and num<(a+b)",
"alp=='a'",
"alp",
"'a'",
"num<(a+b)",
"num",
"a+b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"num+=1",
"num",
"1",
"elif alp=='b' and num<(a+b) and f<=b:\n print(\"Yes\")\n num+=1\n f+=1\n ",
"alp=='b' and num<(a+b) and f<=b",
"alp=='b' and num<(a+b)",
"alp=='b'",
"alp",
"'b'",
"num<(a+b)",
"num",
"a+b",
"a",
"b",
"f<=b",
"f",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"num+=1",
"num",
"1",
"f+=1",
"f",
"1",
"print(\"No\")",
"print",
"\"No\"",
"text=input()",
"input()",
"text",
"num+=1",
"1",
"num",
"f=1",
"1",
"f",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"f+=1",
"1",
"f",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"num=0",
"0",
"num",
"alp=text[i]",
"text[i]",
"alp",
"num+=1",
"1",
"num"
] | n,a,b=map(int,input().split())
text=input()
num=0
f=1
for i in range(n):
alp=text[i]
if alp=='a' and num<(a+b):
print("Yes")
num+=1
elif alp=='b' and num<(a+b) and f<=b:
print("Yes")
num+=1
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,
4,
13,
4,
13,
13,
0,
13,
18,
13,
39,
13,
2,
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,
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,
17,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
110,
2
],
[
110,
11
],
[
110,
12
],
[
113,
14
],
[
98,
18
],
[
101,
21
],
[
25,
24
],
[
114,
29
],
[
95,
31
],
[
114,
33
],
[
24,
37
],
[
96,
41
],
[
99,
46
],
[
93,
46
],
[
102,
47
],
[
108,
47
],
[
111,
49
],
[
105,
50
],
[
92,
55
],
[
96,
62
],
[
99,
68
],
[
93,
68
],
[
102,
69
],
[
108,
69
],
[
111,
71
],
[
105,
72
],
[
102,
74
],
[
108,
74
],
[
105,
75
],
[
107,
80
],
[
110,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
],
[
110,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
]
] | [
"n, a, b = map(int, input().split())\ns = input()\na_n = 0\nb_n = 0\nfor i in range(len(s)):\n m = s[i:i+1]\n if(m == \"a\"):\n if(a_n + b_n < a + b):\n print(\"Yes\")\n a_n += 1\n else:\n print(\"No\")\n elif(m == \"b\"):\n if((a_n + b_n < a + b) and (b_n < b)):\n print(\"Yes\")\n b_n += 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_n = 0",
"a_n",
"0",
"b_n = 0",
"b_n",
"0",
"for i in range(len(s)):\n m = s[i:i+1]\n if(m == \"a\"):\n if(a_n + b_n < a + b):\n print(\"Yes\")\n a_n += 1\n else:\n print(\"No\")\n elif(m == \"b\"):\n if((a_n + b_n < a + b) and (b_n < b)):\n print(\"Yes\")\n b_n += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
"s",
"m = s[i:i+1]",
"m",
"s[i:i+1]",
"s",
"i:i+1",
"i",
"i+1",
"i",
"1",
"if(m == \"a\"):\n if(a_n + b_n < a + b):\n print(\"Yes\")\n a_n += 1\n else:\n print(\"No\")\n elif(m == \"b\"):\n if((a_n + b_n < a + b) and (b_n < b)):\n print(\"Yes\")\n b_n += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"m == \"a\"",
"m",
"\"a\"",
"if(a_n + b_n < a + b):\n print(\"Yes\")\n a_n += 1\n else:\n print(\"No\")\n ",
"a_n + b_n < a + b",
"a_n + b_n",
"a_n",
"b_n",
"a + b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"a_n += 1",
"a_n",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif(m == \"b\"):\n if((a_n + b_n < a + b) and (b_n < b)):\n print(\"Yes\")\n b_n += 1\n else:\n print(\"No\")\n ",
"m == \"b\"",
"m",
"\"b\"",
"if((a_n + b_n < a + b) and (b_n < b)):\n print(\"Yes\")\n b_n += 1\n else:\n print(\"No\")\n ",
"(a_n + b_n < a + b) and (b_n < b)",
"a_n + b_n < a + b",
"a_n + b_n",
"a_n",
"b_n",
"a + b",
"a",
"b",
"b_n < b",
"b_n",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"b_n += 1",
"b_n",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"a_n += 1",
"1",
"a_n",
"m = s[i:i+1]",
"s[i:i+1]",
"m",
"a_n = 0",
"0",
"a_n",
"b_n = 0",
"0",
"b_n",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"b_n += 1",
"1",
"b_n",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"s = input()",
"input()",
"s"
] | n, a, b = map(int, input().split())
s = input()
a_n = 0
b_n = 0
for i in range(len(s)):
m = s[i:i+1]
if(m == "a"):
if(a_n + b_n < a + b):
print("Yes")
a_n += 1
else:
print("No")
elif(m == "b"):
if((a_n + b_n < a + b) and (b_n < b)):
print("Yes")
b_n += 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,
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,
40,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
107,
2
],
[
107,
11
],
[
107,
12
],
[
104,
14
],
[
89,
18
],
[
92,
21
],
[
25,
24
],
[
105,
29
],
[
105,
34
],
[
24,
35
],
[
90,
38
],
[
102,
38
],
[
99,
38
],
[
108,
40
],
[
87,
41
],
[
98,
46
],
[
105,
53
],
[
24,
54
],
[
90,
57
],
[
102,
57
],
[
99,
57
],
[
108,
59
],
[
87,
60
],
[
93,
62
],
[
111,
62
],
[
87,
63
],
[
101,
68
],
[
110,
71
],
[
105,
76
],
[
24,
77
],
[
107,
87
],
[
89,
90
],
[
92,
93
],
[
107,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
110,
111
]
] | [
"N,A,B=map(int,input().split())\nS=input()\n\nP=0\nQ=1\nfor i in range(len(S)):\n if S[i]=='a'and P<A+B:\n print('Yes')\n P+=1\n elif S[i]=='b'and P<A+B and Q<=B:\n print('Yes')\n P+=1\n Q+=1\n elif S[i]=='c ':\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",
"Q=1",
"Q",
"1",
"for i in range(len(S)):\n if S[i]=='a'and P<A+B:\n print('Yes')\n P+=1\n elif S[i]=='b'and P<A+B and Q<=B:\n print('Yes')\n P+=1\n Q+=1\n elif S[i]=='c ':\n print('No')\n else:\n print('No')",
"i",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if S[i]=='a'and P<A+B:\n print('Yes')\n P+=1\n elif S[i]=='b'and P<A+B and Q<=B:\n print('Yes')\n P+=1\n Q+=1\n elif S[i]=='c ':\n print('No')\n else:\n print('No')",
"S[i]=='a'and P<A+B",
"S[i]=='a'",
"S[i]",
"S",
"i",
"'a'",
"P<A+B",
"P",
"A+B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"P+=1",
"P",
"1",
"elif S[i]=='b'and P<A+B and Q<=B:\n print('Yes')\n P+=1\n Q+=1\n ",
"S[i]=='b'and P<A+B and Q<=B",
"S[i]=='b'and P<A+B",
"S[i]=='b'",
"S[i]",
"S",
"i",
"'b'",
"P<A+B",
"P",
"A+B",
"A",
"B",
"Q<=B",
"Q",
"B",
"print('Yes')",
"print",
"'Yes'",
"P+=1",
"P",
"1",
"Q+=1",
"Q",
"1",
"elif S[i]=='c ':\n print('No')\n ",
"S[i]=='c '",
"S[i]",
"S",
"i",
"'c '",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"B=map(int,input().split())",
"map(int,input().split())",
"B",
"P=0",
"0",
"P",
"Q=1",
"1",
"Q",
"N,A,B=map(int,input().split())",
"map(int,input().split())",
"N",
"P+=1",
"1",
"P",
"P+=1",
"1",
"P",
"S=input()",
"input()",
"S",
"A,B=map(int,input().split())",
"map(int,input().split())",
"A",
"Q+=1",
"1",
"Q"
] | N,A,B=map(int,input().split())
S=input()
P=0
Q=1
for i in range(len(S)):
if S[i]=='a'and P<A+B:
print('Yes')
P+=1
elif S[i]=='b'and P<A+B and Q<=B:
print('Yes')
P+=1
Q+=1
elif S[i]=='c ':
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,
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,
40,
2,
13,
17,
13,
4,
13,
17,
0,
13,
17,
0,
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,
10,
17,
13
] | [
[
94,
2
],
[
94,
11
],
[
94,
12
],
[
73,
14
],
[
85,
20
],
[
91,
23
],
[
27,
26
],
[
74,
26
],
[
86,
31
],
[
83,
31
],
[
98,
31
],
[
95,
33
],
[
77,
34
],
[
26,
36
],
[
97,
42
],
[
86,
48
],
[
83,
48
],
[
98,
48
],
[
95,
50
],
[
77,
51
],
[
26,
53
],
[
92,
57
],
[
80,
57
],
[
77,
59
],
[
82,
64
],
[
79,
67
],
[
73,
74
],
[
94,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
94,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
]
] | [
"N,A,B=map(int,input().split())\nS=list(input())\n\np=0\nq=0\n\nfor i in S:\n if p<A+B and i==\"a\":\n print(\"Yes\")\n p+=1\n \n elif p<A+B and i==\"b\" and q+1<=B:\n print(\"Yes\")\n p+=1\n q+=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",
"p=0",
"p",
"0",
"q=0",
"q",
"0",
"for i in S:\n if p<A+B and i==\"a\":\n print(\"Yes\")\n p+=1\n \n elif p<A+B and i==\"b\" and q+1<=B:\n print(\"Yes\")\n p+=1\n q+=1\n else:\n print(\"No\")",
"i",
"S",
"if p<A+B and i==\"a\":\n print(\"Yes\")\n p+=1\n \n elif p<A+B and i==\"b\" and q+1<=B:\n print(\"Yes\")\n p+=1\n q+=1\n else:\n print(\"No\")",
"p<A+B and i==\"a\"",
"p<A+B",
"p",
"A+B",
"A",
"B",
"i==\"a\"",
"i",
"\"a\"",
"print(\"Yes\")",
"print",
"\"Yes\"",
"p+=1",
"p",
"1",
"elif p<A+B and i==\"b\" and q+1<=B:\n print(\"Yes\")\n p+=1\n q+=1\n ",
"p<A+B and i==\"b\" and q+1<=B",
"p<A+B and i==\"b\"",
"p<A+B",
"p",
"A+B",
"A",
"B",
"i==\"b\"",
"i",
"\"b\"",
"q+1<=B",
"q+1",
"q",
"1",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"p+=1",
"p",
"1",
"q+=1",
"q",
"1",
"print(\"No\")",
"print",
"\"No\"",
"S=list(input())",
"list(input())",
"S",
"B=map(int,input().split())",
"map(int,input().split())",
"B",
"q+=1",
"1",
"q",
"p+=1",
"1",
"p",
"p=0",
"0",
"p",
"N,A,B=map(int,input().split())",
"map(int,input().split())",
"N",
"q=0",
"0",
"q",
"A,B=map(int,input().split())",
"map(int,input().split())",
"A",
"p+=1",
"1",
"p"
] | N,A,B=map(int,input().split())
S=list(input())
p=0
q=0
for i in S:
if p<A+B and i=="a":
print("Yes")
p+=1
elif p<A+B and i=="b" and q+1<=B:
print("Yes")
p+=1
q+=1
else:
print("No") |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
18,
13,
17,
13,
18,
13,
17,
13,
18,
13,
17,
0,
13,
4,
13,
4,
13,
0,
13,
17,
13,
17,
0,
13,
39,
28,
13,
4,
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,
13,
13,
2,
13,
13,
14,
2,
13,
13,
4,
18,
13,
13,
17,
0,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
18,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
18,
13,
10,
17,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13
] | [
[
132,
2
],
[
144,
14
],
[
133,
16
],
[
123,
18
],
[
133,
20
],
[
138,
22
],
[
133,
24
],
[
129,
27
],
[
147,
33
],
[
141,
35
],
[
126,
38
],
[
42,
41
],
[
130,
46
],
[
130,
50
],
[
41,
51
],
[
148,
56
],
[
136,
56
],
[
142,
57
],
[
151,
57
],
[
124,
59
],
[
139,
60
],
[
127,
63
],
[
135,
67
],
[
127,
71
],
[
130,
77
],
[
41,
78
],
[
148,
83
],
[
136,
83
],
[
142,
84
],
[
151,
84
],
[
124,
86
],
[
139,
87
],
[
142,
90
],
[
151,
90
],
[
139,
91
],
[
127,
94
],
[
150,
98
],
[
127,
102
],
[
127,
107
],
[
127,
112
],
[
127,
121
],
[
123,
124
],
[
126,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
],
[
138,
139
],
[
141,
142
],
[
144,
145
],
[
147,
148
],
[
150,
151
]
] | [
"datalist=list(map(int,input().split()))\nN, A, B = datalist[0], datalist[1], datalist[2]\nstrings=str(input())\nna,nb=0,0\nout=[]\nfor i in range(len(strings)):\n if strings[i]==\"a\":\n if na + nb < A+B:\n out.append(\"Yes\")\n na += 1\n else:\n out.append(\"No\")\n elif strings[i]==\"b\":\n if na + nb < A+B:\n if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\nprint(\"\\n\".join(out))",
"datalist=list(map(int,input().split()))",
"datalist",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"N, A, B = datalist[0], datalist[1], datalist[2]",
"N",
"datalist[0]",
"datalist",
"0",
"A",
"datalist[1]",
"datalist",
"1",
"B",
"datalist[2]",
"datalist",
"2",
"strings=str(input())",
"strings",
"str(input())",
"str",
"input()",
"input",
"na,nb=0,0",
"na",
"0",
"nb",
"0",
"out=[]",
"out",
"[]",
"for i in range(len(strings)):\n if strings[i]==\"a\":\n if na + nb < A+B:\n out.append(\"Yes\")\n na += 1\n else:\n out.append(\"No\")\n elif strings[i]==\"b\":\n if na + nb < A+B:\n if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")",
"i",
"range(len(strings))",
"range",
"len(strings)",
"len",
"strings",
"if strings[i]==\"a\":\n if na + nb < A+B:\n out.append(\"Yes\")\n na += 1\n else:\n out.append(\"No\")\n elif strings[i]==\"b\":\n if na + nb < A+B:\n if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")",
"strings[i]==\"a\"",
"strings[i]",
"strings",
"i",
"\"a\"",
"if na + nb < A+B:\n out.append(\"Yes\")\n na += 1\n else:\n out.append(\"No\")\n ",
"na + nb < A+B",
"na + nb",
"na",
"nb",
"A+B",
"A",
"B",
"out.append(\"Yes\")",
"out.append",
"out",
"append",
"\"Yes\"",
"na += 1",
"na",
"1",
"out.append(\"No\")",
"out.append",
"out",
"append",
"\"No\"",
"elif strings[i]==\"b\":\n if na + nb < A+B:\n if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\n ",
"strings[i]==\"b\"",
"strings[i]",
"strings",
"i",
"\"b\"",
"if na + nb < A+B:\n if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n else:\n out.append(\"No\")\n ",
"na + nb < A+B",
"na + nb",
"na",
"nb",
"A+B",
"A",
"B",
"if nb < B:\n out.append(\"Yes\")\n nb += 1\n else:\n out.append(\"No\")\n ",
"nb < B",
"nb",
"B",
"out.append(\"Yes\")",
"out.append",
"out",
"append",
"\"Yes\"",
"nb += 1",
"nb",
"1",
"out.append(\"No\")",
"out.append",
"out",
"append",
"\"No\"",
"out.append(\"No\")",
"out.append",
"out",
"append",
"\"No\"",
"out.append(\"No\")",
"out.append",
"out",
"append",
"\"No\"",
"print(\"\\n\".join(out))",
"print",
"\"\\n\".join(out)",
"\"\\n\".join",
"\"\\n\"",
"join",
"out",
"A, B = datalist[0], datalist[1], datalist[2]",
"datalist[1]",
"A",
"out=[]",
"[]",
"out",
"strings=str(input())",
"str(input())",
"strings",
"datalist=list(map(int,input().split()))",
"list(map(int,input().split()))",
"datalist",
"na += 1",
"1",
"na",
"B = datalist[0], datalist[1], datalist[2]",
"datalist[2]",
"B",
"nb=0,0",
"0",
"nb",
"N, A, B = datalist[0], datalist[1], datalist[2]",
"datalist[0]",
"N",
"na,nb=0,0",
"0",
"na",
"nb += 1",
"1",
"nb"
] | datalist=list(map(int,input().split()))
N, A, B = datalist[0], datalist[1], datalist[2]
strings=str(input())
na,nb=0,0
out=[]
for i in range(len(strings)):
if strings[i]=="a":
if na + nb < A+B:
out.append("Yes")
na += 1
else:
out.append("No")
elif strings[i]=="b":
if na + nb < A+B:
if nb < B:
out.append("Yes")
nb += 1
else:
out.append("No")
else:
out.append("No")
else:
out.append("No")
print("\n".join(out))
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
4,
13,
0,
13,
17,
0,
13,
17,
0,
13,
39,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
13,
13,
14,
2,
13,
17,
14,
2,
2,
13,
13,
2,
13,
13,
4,
18,
13,
13,
13,
0,
13,
17,
4,
18,
13,
13,
13,
14,
2,
13,
17,
14,
2,
2,
2,
13,
13,
2,
13,
13,
2,
13,
13,
4,
18,
13,
13,
13,
0,
13,
17,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
28,
13,
4,
13,
4,
13,
13,
4,
13,
18,
13,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
39,
13,
10,
18,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13
] | [
[
144,
2
],
[
141,
14
],
[
145,
16
],
[
156,
19
],
[
145,
21
],
[
159,
24
],
[
145,
26
],
[
150,
29
],
[
132,
33
],
[
138,
36
],
[
153,
39
],
[
165,
42
],
[
135,
45
],
[
49,
48
],
[
142,
51
],
[
147,
53
],
[
151,
55
],
[
48,
56
],
[
148,
59
],
[
133,
64
],
[
130,
64
],
[
139,
65
],
[
163,
65
],
[
157,
67
],
[
160,
68
],
[
154,
71
],
[
166,
73
],
[
129,
75
],
[
154,
79
],
[
136,
81
],
[
148,
84
],
[
133,
90
],
[
130,
90
],
[
139,
91
],
[
163,
91
],
[
157,
93
],
[
160,
94
],
[
139,
96
],
[
163,
96
],
[
160,
97
],
[
154,
100
],
[
166,
102
],
[
162,
104
],
[
154,
108
],
[
136,
110
],
[
154,
113
],
[
136,
115
],
[
118,
117
],
[
154,
122
],
[
154,
126
],
[
117,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
],
[
138,
139
],
[
141,
142
],
[
144,
145
],
[
147,
148
],
[
150,
151
],
[
153,
154
],
[
156,
157
],
[
159,
160
],
[
162,
163
],
[
165,
166
]
] | [
"x = list(map(int, input().split()))\nn = x[0]\na = x[1]\nb = x[2]\ns = input()\n\n\ncount_domestic = 0\ncount_oversea = 0\njudge_list = []\nyes = 'Yes'\nno = 'No'\n\nfor i in range(n):\n candidate = s[i]\n if candidate == 'a':\n if count_domestic + count_oversea < a + b:\n judge_list.append(yes)\n count_domestic += 1\n else:\n judge_list.append(no)\n elif candidate == 'b':\n if count_domestic + count_oversea < a + b and count_oversea < b:\n judge_list.append(yes)\n count_oversea += 1\n else:\n judge_list.append(no)\n else:\n judge_list.append(no)\n\nfor j in range(len(judge_list)):\n print(judge_list[j])",
"x = list(map(int, input().split()))",
"x",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"n = x[0]",
"n",
"x[0]",
"x",
"0",
"a = x[1]",
"a",
"x[1]",
"x",
"1",
"b = x[2]",
"b",
"x[2]",
"x",
"2",
"s = input()",
"s",
"input()",
"input",
"count_domestic = 0",
"count_domestic",
"0",
"count_oversea = 0",
"count_oversea",
"0",
"judge_list = []",
"judge_list",
"[]",
"yes = 'Yes'",
"yes",
"'Yes'",
"no = 'No'",
"no",
"'No'",
"for i in range(n):\n candidate = s[i]\n if candidate == 'a':\n if count_domestic + count_oversea < a + b:\n judge_list.append(yes)\n count_domestic += 1\n else:\n judge_list.append(no)\n elif candidate == 'b':\n if count_domestic + count_oversea < a + b and count_oversea < b:\n judge_list.append(yes)\n count_oversea += 1\n else:\n judge_list.append(no)\n else:\n judge_list.append(no)",
"i",
"range(n)",
"range",
"n",
"candidate = s[i]",
"candidate",
"s[i]",
"s",
"i",
"if candidate == 'a':\n if count_domestic + count_oversea < a + b:\n judge_list.append(yes)\n count_domestic += 1\n else:\n judge_list.append(no)\n elif candidate == 'b':\n if count_domestic + count_oversea < a + b and count_oversea < b:\n judge_list.append(yes)\n count_oversea += 1\n else:\n judge_list.append(no)\n else:\n judge_list.append(no)",
"candidate == 'a'",
"candidate",
"'a'",
"if count_domestic + count_oversea < a + b:\n judge_list.append(yes)\n count_domestic += 1\n else:\n judge_list.append(no)\n ",
"count_domestic + count_oversea < a + b",
"count_domestic + count_oversea",
"count_domestic",
"count_oversea",
"a + b",
"a",
"b",
"judge_list.append(yes)",
"judge_list.append",
"judge_list",
"append",
"yes",
"count_domestic += 1",
"count_domestic",
"1",
"judge_list.append(no)",
"judge_list.append",
"judge_list",
"append",
"no",
"elif candidate == 'b':\n if count_domestic + count_oversea < a + b and count_oversea < b:\n judge_list.append(yes)\n count_oversea += 1\n else:\n judge_list.append(no)\n ",
"candidate == 'b'",
"candidate",
"'b'",
"if count_domestic + count_oversea < a + b and count_oversea < b:\n judge_list.append(yes)\n count_oversea += 1\n else:\n judge_list.append(no)\n ",
"count_domestic + count_oversea < a + b and count_oversea < b",
"count_domestic + count_oversea < a + b",
"count_domestic + count_oversea",
"count_domestic",
"count_oversea",
"a + b",
"a",
"b",
"count_oversea < b",
"count_oversea",
"b",
"judge_list.append(yes)",
"judge_list.append",
"judge_list",
"append",
"yes",
"count_oversea += 1",
"count_oversea",
"1",
"judge_list.append(no)",
"judge_list.append",
"judge_list",
"append",
"no",
"judge_list.append(no)",
"judge_list.append",
"judge_list",
"append",
"no",
"for j in range(len(judge_list)):\n print(judge_list[j])",
"j",
"range(len(judge_list))",
"range",
"len(judge_list)",
"len",
"judge_list",
"print(judge_list[j])",
"print",
"judge_list[j]",
"judge_list",
"j",
"count_domestic += 1",
"1",
"count_domestic",
"count_domestic = 0",
"0",
"count_domestic",
"no = 'No'",
"'No'",
"no",
"count_oversea = 0",
"0",
"count_oversea",
"n = x[0]",
"x[0]",
"n",
"x = list(map(int, input().split()))",
"list(map(int, input().split()))",
"x",
"candidate = s[i]",
"s[i]",
"candidate",
"s = input()",
"input()",
"s",
"judge_list = []",
"[]",
"judge_list",
"a = x[1]",
"x[1]",
"a",
"b = x[2]",
"x[2]",
"b",
"count_oversea += 1",
"1",
"count_oversea",
"yes = 'Yes'",
"'Yes'",
"yes"
] | x = list(map(int, input().split()))
n = x[0]
a = x[1]
b = x[2]
s = input()
count_domestic = 0
count_oversea = 0
judge_list = []
yes = 'Yes'
no = 'No'
for i in range(n):
candidate = s[i]
if candidate == 'a':
if count_domestic + count_oversea < a + b:
judge_list.append(yes)
count_domestic += 1
else:
judge_list.append(no)
elif candidate == 'b':
if count_domestic + count_oversea < a + b and count_oversea < b:
judge_list.append(yes)
count_oversea += 1
else:
judge_list.append(no)
else:
judge_list.append(no)
for j in range(len(judge_list)):
print(judge_list[j])
|
[
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,
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,
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,
10,
4,
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
],
[
92,
14
],
[
95,
20
],
[
104,
23
],
[
27,
26
],
[
93,
31
],
[
93,
35
],
[
26,
36
],
[
93,
44
],
[
26,
45
],
[
96,
50
],
[
108,
50
],
[
105,
51
],
[
102,
51
],
[
99,
53
],
[
114,
54
],
[
107,
56
],
[
93,
67
],
[
26,
68
],
[
108,
74
],
[
96,
74
],
[
105,
75
],
[
102,
75
],
[
99,
77
],
[
114,
78
],
[
105,
80
],
[
102,
80
],
[
114,
81
],
[
101,
83
],
[
92,
93
],
[
95,
96
],
[
113,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
113,
111
],
[
113,
114
]
] | [
"n, a, b=map(int, input().split())\ns=str(input())\ncnt_a=0\ncnt_b=0\nfor i in range(len(s)):\n if s[i]=='c':\n print('No')\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 if 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 \n \n ",
"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",
"cnt_a=0",
"cnt_a",
"0",
"cnt_b=0",
"cnt_b",
"0",
"for i in range(len(s)):\n if s[i]=='c':\n print('No')\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 if 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 \n \n ",
"i",
"range(len(s))",
"range",
"len(s)",
"len",
"s",
"if s[i]=='c':\n print('No')\n ",
"s[i]=='c'",
"s[i]",
"s",
"i",
"'c'",
"print('No')",
"print",
"'No'",
"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 ",
"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'",
"if 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 \n \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 \n \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'",
"s=str(input())",
"str(input())",
"s",
"cnt_a=0",
"0",
"cnt_a",
"a, b=map(int, input().split())",
"map(int, input().split())",
"a",
"cnt_b+=1",
"1",
"cnt_b",
"cnt_b=0",
"0",
"cnt_b",
"cnt_a+=1",
"1",
"cnt_a",
"n, a, b=map(int, input().split())",
"map(int, input().split())",
"n",
"b=map(int, input().split())",
"map(int, input().split())",
"b"
] | n, a, b=map(int, input().split())
s=str(input())
cnt_a=0
cnt_b=0
for i in range(len(s)):
if s[i]=='c':
print('No')
if s[i]=='a':
if cnt_a+cnt_b<a+b:
cnt_a+=1
print('Yes')
else:
print('No')
if s[i]=='b':
if cnt_a+cnt_b<a+b and cnt_b<b:
cnt_b+=1
print('Yes')
else:
print('No')
|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
41,
28,
13,
13,
4,
4,
13,
13,
0,
13,
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,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
103,
2
],
[
103,
11
],
[
103,
12
],
[
97,
14
],
[
20,
19
],
[
98,
19
],
[
19,
24
],
[
106,
26
],
[
112,
29
],
[
109,
32
],
[
36,
35
],
[
107,
35
],
[
35,
39
],
[
113,
44
],
[
95,
44
],
[
110,
45
],
[
116,
45
],
[
101,
47
],
[
104,
48
],
[
94,
53
],
[
35,
60
],
[
95,
66
],
[
113,
66
],
[
110,
67
],
[
116,
67
],
[
101,
69
],
[
104,
70
],
[
110,
72
],
[
116,
72
],
[
104,
73
],
[
115,
78
],
[
35,
85
],
[
103,
92
],
[
94,
95
],
[
97,
98
],
[
103,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
],
[
112,
113
],
[
115,
116
]
] | [
"n,a,b=map(int,input().split())\ns=input()\nparticipant=[str(c) for c in s]\ngokakua=0\ngokakub=0\nfor i in participant:\n if i=='a':\n if gokakua+gokakub<a+b:\n print(\"Yes\")\n gokakua+=1\n else:\n print(\"No\")\n if i=='b':\n if gokakua+gokakub<a+b and gokakub<b:\n print(\"Yes\")\n gokakub+=1\n else:\n print(\"No\")\n if 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",
"str(c) for c in s",
"for c in s",
"c",
"s",
"for c in s",
"str(c)",
"str",
"c",
"participant=[str(c) for c in s]",
"participant",
"[str(c) for c in s]",
"gokakua=0",
"gokakua",
"0",
"gokakub=0",
"gokakub",
"0",
"for i in participant:\n if i=='a':\n if gokakua+gokakub<a+b:\n print(\"Yes\")\n gokakua+=1\n else:\n print(\"No\")\n if i=='b':\n if gokakua+gokakub<a+b and gokakub<b:\n print(\"Yes\")\n gokakub+=1\n else:\n print(\"No\")\n if i=='c':\n print(\"No\")",
"i",
"participant",
"if i=='a':\n if gokakua+gokakub<a+b:\n print(\"Yes\")\n gokakua+=1\n else:\n print(\"No\")\n ",
"i=='a'",
"i",
"'a'",
"if gokakua+gokakub<a+b:\n print(\"Yes\")\n gokakua+=1\n else:\n print(\"No\")\n ",
"gokakua+gokakub<a+b",
"gokakua+gokakub",
"gokakua",
"gokakub",
"a+b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"gokakua+=1",
"gokakua",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if i=='b':\n if gokakua+gokakub<a+b and gokakub<b:\n print(\"Yes\")\n gokakub+=1\n else:\n print(\"No\")\n ",
"i=='b'",
"i",
"'b'",
"if gokakua+gokakub<a+b and gokakub<b:\n print(\"Yes\")\n gokakub+=1\n else:\n print(\"No\")\n ",
"gokakua+gokakub<a+b and gokakub<b",
"gokakua+gokakub<a+b",
"gokakua+gokakub",
"gokakua",
"gokakub",
"a+b",
"a",
"b",
"gokakub<b",
"gokakub",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"gokakub+=1",
"gokakub",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if i=='c':\n print(\"No\")",
"i=='c'",
"i",
"'c'",
"print(\"No\")",
"print",
"\"No\"",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"gokakua+=1",
"1",
"gokakua",
"s=input()",
"input()",
"s",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"participant=[str(c) for c in s]",
"[str(c) for c in s]",
"participant",
"gokakub=0",
"0",
"gokakub",
"gokakua=0",
"0",
"gokakua",
"gokakub+=1",
"1",
"gokakub"
] | n,a,b=map(int,input().split())
s=input()
participant=[str(c) for c in s]
gokakua=0
gokakub=0
for i in participant:
if i=='a':
if gokakua+gokakub<a+b:
print("Yes")
gokakua+=1
else:
print("No")
if i=='b':
if gokakua+gokakub<a+b and gokakub<b:
print("Yes")
gokakub+=1
else:
print("No")
if 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,
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,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
103,
2
],
[
103,
11
],
[
103,
12
],
[
91,
14
],
[
82,
18
],
[
88,
21
],
[
25,
24
],
[
98,
27
],
[
92,
31
],
[
24,
32
],
[
83,
37
],
[
101,
37
],
[
89,
38
],
[
86,
38
],
[
104,
40
],
[
95,
41
],
[
100,
46
],
[
92,
54
],
[
24,
55
],
[
83,
61
],
[
101,
61
],
[
89,
62
],
[
86,
62
],
[
104,
64
],
[
95,
65
],
[
89,
67
],
[
86,
67
],
[
95,
68
],
[
85,
73
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
],
[
103,
95
],
[
103,
98
],
[
100,
101
],
[
103,
104
]
] | [
"n,a,b=map(int,input().split())\ns=input()\nc=0\nd=0\nfor i in range(n):\n if s[i]=='a':\n if c+d<a+b:\n print('Yes')\n c+=1\n else:\n print('No')\n elif s[i]=='b':\n if c+d<a+b and d<b:\n print('Yes')\n d+=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",
"c=0",
"c",
"0",
"d=0",
"d",
"0",
"for i in range(n):\n if s[i]=='a':\n if c+d<a+b:\n print('Yes')\n c+=1\n else:\n print('No')\n elif s[i]=='b':\n if c+d<a+b and d<b:\n print('Yes')\n d+=1\n else:\n print('No')\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"if s[i]=='a':\n if c+d<a+b:\n print('Yes')\n c+=1\n else:\n print('No')\n elif s[i]=='b':\n if c+d<a+b and d<b:\n print('Yes')\n d+=1\n else:\n print('No')\n else:\n print('No')",
"s[i]=='a'",
"s[i]",
"s",
"i",
"'a'",
"if c+d<a+b:\n print('Yes')\n c+=1\n else:\n print('No')\n ",
"c+d<a+b",
"c+d",
"c",
"d",
"a+b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"c+=1",
"c",
"1",
"print('No')",
"print",
"'No'",
"elif s[i]=='b':\n if c+d<a+b and d<b:\n print('Yes')\n d+=1\n else:\n print('No')\n ",
"s[i]=='b'",
"s[i]",
"s",
"i",
"'b'",
"if c+d<a+b and d<b:\n print('Yes')\n d+=1\n else:\n print('No')\n ",
"c+d<a+b and d<b",
"c+d<a+b",
"c+d",
"c",
"d",
"a+b",
"a",
"b",
"d<b",
"d",
"b",
"print('Yes')",
"print",
"'Yes'",
"d+=1",
"d",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"c=0",
"0",
"c",
"d+=1",
"1",
"d",
"d=0",
"0",
"d",
"s=input()",
"input()",
"s",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"c+=1",
"1",
"c",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a"
] | n,a,b=map(int,input().split())
s=input()
c=0
d=0
for i in range(n):
if s[i]=='a':
if c+d<a+b:
print('Yes')
c+=1
else:
print('No')
elif s[i]=='b':
if c+d<a+b and d<b:
print('Yes')
d+=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,
13,
2,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
0,
13,
17,
14,
2,
2,
18,
13,
13,
17,
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,
17,
13,
10,
4,
13
] | [
[
98,
2
],
[
98,
11
],
[
98,
12
],
[
77,
14
],
[
86,
20
],
[
83,
23
],
[
27,
26
],
[
75,
29
],
[
84,
32
],
[
93,
32
],
[
96,
32
],
[
81,
34
],
[
99,
35
],
[
78,
39
],
[
26,
40
],
[
95,
46
],
[
78,
52
],
[
26,
53
],
[
87,
56
],
[
90,
56
],
[
99,
57
],
[
89,
62
],
[
92,
65
],
[
98,
75
],
[
77,
78
],
[
98,
81
],
[
83,
84
],
[
86,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
]
] | [
"n,a,b=map(int,input().split())\ns=list(input())\nnover=0\ntot=0\nfor i in range(n):\n if tot<a+b:\n if s[i]=='a':\n print('Yes')\n tot+=1\n elif s[i]=='b' and nover<b:\n print('Yes')\n nover+=1\n tot+=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",
"nover=0",
"nover",
"0",
"tot=0",
"tot",
"0",
"for i in range(n):\n if tot<a+b:\n if s[i]=='a':\n print('Yes')\n tot+=1\n elif s[i]=='b' and nover<b:\n print('Yes')\n nover+=1\n tot+=1\n else:\n print('No')\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"if tot<a+b:\n if s[i]=='a':\n print('Yes')\n tot+=1\n elif s[i]=='b' and nover<b:\n print('Yes')\n nover+=1\n tot+=1\n else:\n print('No')\n else:\n print('No')",
"tot<a+b",
"tot",
"a+b",
"a",
"b",
"if s[i]=='a':\n print('Yes')\n tot+=1\n elif s[i]=='b' and nover<b:\n print('Yes')\n nover+=1\n tot+=1\n else:\n print('No')\n ",
"s[i]=='a'",
"s[i]",
"s",
"i",
"'a'",
"print('Yes')",
"print",
"'Yes'",
"tot+=1",
"tot",
"1",
"elif s[i]=='b' and nover<b:\n print('Yes')\n nover+=1\n tot+=1\n ",
"s[i]=='b' and nover<b",
"s[i]=='b'",
"s[i]",
"s",
"i",
"'b'",
"nover<b",
"nover",
"b",
"print('Yes')",
"print",
"'Yes'",
"nover+=1",
"nover",
"1",
"tot+=1",
"tot",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"s=list(input())",
"list(input())",
"s",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"tot=0",
"0",
"tot",
"nover=0",
"0",
"nover",
"nover+=1",
"1",
"nover",
"tot+=1",
"1",
"tot",
"tot+=1",
"1",
"tot",
"b=map(int,input().split())",
"map(int,input().split())",
"b"
] | n,a,b=map(int,input().split())
s=list(input())
nover=0
tot=0
for i in range(n):
if tot<a+b:
if s[i]=='a':
print('Yes')
tot+=1
elif s[i]=='b' and nover<b:
print('Yes')
nover+=1
tot+=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,
13,
4,
13,
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,
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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
92,
2
],
[
92,
11
],
[
92,
12
],
[
89,
14
],
[
104,
18
],
[
107,
21
],
[
101,
24
],
[
90,
31
],
[
105,
40
],
[
96,
40
],
[
108,
41
],
[
99,
41
],
[
84,
43
],
[
87,
44
],
[
95,
49
],
[
105,
62
],
[
96,
62
],
[
108,
63
],
[
99,
63
],
[
84,
65
],
[
87,
66
],
[
108,
68
],
[
99,
68
],
[
87,
69
],
[
98,
74
],
[
92,
84
],
[
92,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
]
] | [
"N, A, B = map(int, input().split())\nS = input()\na = 0\nb = 0\nans = \"No\"\nfor v, k in enumerate(S, 1):\n if k == \"a\":\n if a+b < A+B:\n print(\"Yes\")\n a += 1\n else:\n print(\"No\")\n elif k == \"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",
"ans = \"No\"",
"ans",
"\"No\"",
"for v, k in enumerate(S, 1):\n if k == \"a\":\n if a+b < A+B:\n print(\"Yes\")\n a += 1\n else:\n print(\"No\")\n elif k == \"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\")",
"v",
"k",
"enumerate(S, 1)",
"enumerate",
"S",
"1",
"if k == \"a\":\n if a+b < A+B:\n print(\"Yes\")\n a += 1\n else:\n print(\"No\")\n elif k == \"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\")",
"k == \"a\"",
"k",
"\"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 k == \"b\":\n if a+b < A+B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")\n ",
"k == \"b\"",
"k",
"\"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\"",
"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",
"a += 1",
"1",
"a",
"b += 1",
"1",
"b",
"ans = \"No\"",
"\"No\"",
"ans",
"a = 0",
"0",
"a",
"b = 0",
"0",
"b"
] | N, A, B = map(int, input().split())
S = input()
a = 0
b = 0
ans = "No"
for v, k in enumerate(S, 1):
if k == "a":
if a+b < A+B:
print("Yes")
a += 1
else:
print("No")
elif k == "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,
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,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
93,
2
],
[
93,
11
],
[
93,
12
],
[
72,
14
],
[
87,
18
],
[
81,
21
],
[
25,
24
],
[
73,
24
],
[
24,
29
],
[
88,
32
],
[
76,
32
],
[
85,
32
],
[
94,
34
],
[
79,
35
],
[
84,
40
],
[
24,
46
],
[
88,
49
],
[
76,
49
],
[
85,
49
],
[
94,
51
],
[
79,
52
],
[
82,
54
],
[
70,
54
],
[
79,
55
],
[
75,
60
],
[
69,
63
],
[
69,
70
],
[
72,
73
],
[
75,
76
],
[
93,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
93,
91
],
[
93,
94
]
] | [
"n, a, b = map(int, input().split())\nS = input()\ncnt = 0\ncnt2 = 0\nfor s in S:\n if s == 'a' and cnt < (a + b):\n print('Yes')\n cnt += 1\n elif s == 'b' and cnt < (a + b)and cnt2 < b:\n print('Yes')\n cnt += 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",
"cnt = 0",
"cnt",
"0",
"cnt2 = 0",
"cnt2",
"0",
"for s in S:\n if s == 'a' and cnt < (a + b):\n print('Yes')\n cnt += 1\n elif s == 'b' and cnt < (a + b)and cnt2 < b:\n print('Yes')\n cnt += 1\n cnt2 += 1\n else:\n print('No')",
"s",
"S",
"if s == 'a' and cnt < (a + b):\n print('Yes')\n cnt += 1\n elif s == 'b' and cnt < (a + b)and cnt2 < b:\n print('Yes')\n cnt += 1\n cnt2 += 1\n else:\n print('No')",
"s == 'a' and cnt < (a + b)",
"s == 'a'",
"s",
"'a'",
"cnt < (a + b)",
"cnt",
"a + b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"cnt += 1",
"cnt",
"1",
"elif s == 'b' and cnt < (a + b)and cnt2 < b:\n print('Yes')\n cnt += 1\n cnt2 += 1\n ",
"s == 'b' and cnt < (a + b)and cnt2 < b",
"s == 'b' and cnt < (a + b)",
"s == 'b'",
"s",
"'b'",
"cnt < (a + b)",
"cnt",
"a + b",
"a",
"b",
"cnt2 < b",
"cnt2",
"b",
"print('Yes')",
"print",
"'Yes'",
"cnt += 1",
"cnt",
"1",
"cnt2 += 1",
"cnt2",
"1",
"print('No')",
"print",
"'No'",
"cnt2 += 1",
"1",
"cnt2",
"S = input()",
"input()",
"S",
"cnt += 1",
"1",
"cnt",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"cnt2 = 0",
"0",
"cnt2",
"cnt += 1",
"1",
"cnt",
"cnt = 0",
"0",
"cnt",
"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()
cnt = 0
cnt2 = 0
for s in S:
if s == 'a' and cnt < (a + b):
print('Yes')
cnt += 1
elif s == 'b' and cnt < (a + b)and cnt2 < b:
print('Yes')
cnt += 1
cnt2 += 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,
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,
40,
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
99,
2
],
[
99,
11
],
[
99,
12
],
[
90,
14
],
[
93,
18
],
[
78,
21
],
[
25,
24
],
[
85,
27
],
[
91,
32
],
[
24,
33
],
[
94,
36
],
[
97,
36
],
[
76,
36
],
[
100,
38
],
[
88,
39
],
[
75,
44
],
[
91,
51
],
[
24,
52
],
[
94,
55
],
[
97,
55
],
[
76,
55
],
[
100,
57
],
[
88,
58
],
[
79,
60
],
[
82,
60
],
[
88,
61
],
[
96,
66
],
[
81,
69
],
[
75,
76
],
[
78,
79
],
[
81,
82
],
[
99,
85
],
[
99,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
]
] | [
"N, A, B = map(int,input().split())\nS = input()\nyosen = 0\nyosen_b = 1\nfor i in range(N):\n if S[i] == \"a\" and yosen < (A + B):\n print(\"Yes\")\n yosen += 1\n elif S[i] == \"b\" and yosen < (A + B) and yosen_b <= B:\n print(\"Yes\")\n yosen += 1\n yosen_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",
"yosen = 0",
"yosen",
"0",
"yosen_b = 1",
"yosen_b",
"1",
"for i in range(N):\n if S[i] == \"a\" and yosen < (A + B):\n print(\"Yes\")\n yosen += 1\n elif S[i] == \"b\" and yosen < (A + B) and yosen_b <= B:\n print(\"Yes\")\n yosen += 1\n yosen_b += 1\n else:\n print(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\" and yosen < (A + B):\n print(\"Yes\")\n yosen += 1\n elif S[i] == \"b\" and yosen < (A + B) and yosen_b <= B:\n print(\"Yes\")\n yosen += 1\n yosen_b += 1\n else:\n print(\"No\")",
"S[i] == \"a\" and yosen < (A + B)",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"yosen < (A + B)",
"yosen",
"A + B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"yosen += 1",
"yosen",
"1",
"elif S[i] == \"b\" and yosen < (A + B) and yosen_b <= B:\n print(\"Yes\")\n yosen += 1\n yosen_b += 1\n ",
"S[i] == \"b\" and yosen < (A + B) and yosen_b <= B",
"S[i] == \"b\" and yosen < (A + B)",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"yosen < (A + B)",
"yosen",
"A + B",
"A",
"B",
"yosen_b <= B",
"yosen_b",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"yosen += 1",
"yosen",
"1",
"yosen_b += 1",
"yosen_b",
"1",
"print(\"No\")",
"print",
"\"No\"",
"yosen += 1",
"1",
"yosen",
"yosen_b = 1",
"1",
"yosen_b",
"yosen_b += 1",
"1",
"yosen_b",
"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",
"yosen = 0",
"0",
"yosen",
"yosen += 1",
"1",
"yosen",
"A, B = map(int,input().split())",
"map(int,input().split())",
"A"
] | N, A, B = map(int,input().split())
S = input()
yosen = 0
yosen_b = 1
for i in range(N):
if S[i] == "a" and yosen < (A + B):
print("Yes")
yosen += 1
elif S[i] == "b" and yosen < (A + B) and yosen_b <= B:
print("Yes")
yosen += 1
yosen_b += 1
else:
print("No") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
4,
13,
4,
13,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
40,
2,
13,
13,
2,
13,
13,
4,
13,
17,
4,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
40,
2,
13,
13,
2,
13,
13,
40,
13,
13,
4,
13,
17,
0,
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,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
96,
2
],
[
96,
11
],
[
96,
12
],
[
105,
14
],
[
105,
17
],
[
99,
20
],
[
27,
26
],
[
100,
26
],
[
26,
30
],
[
93,
33
],
[
94,
38
],
[
106,
38
],
[
82,
39
],
[
91,
39
],
[
103,
39
],
[
88,
41
],
[
85,
42
],
[
26,
51
],
[
102,
54
],
[
106,
60
],
[
94,
60
],
[
103,
61
],
[
82,
61
],
[
91,
61
],
[
88,
63
],
[
85,
64
],
[
103,
66
],
[
82,
66
],
[
91,
66
],
[
85,
67
],
[
90,
72
],
[
105,
82
],
[
96,
85
],
[
96,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"N,A,B = map(int, input().split())\nna = nb = 0\nS = list(input())\nfor c in S:\n #print(na,nb,end='')\n if c == 'a':\n na += 1\n if na + nb <= A + B:\n print('Yes')\n else:\n print('No')\n \n elif c == 'b':\n nb += 1\n if na + nb <= A + B and nb <= B:\n print('Yes')\n else:\n nb -= 1\n print('No')\n \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",
"na = nb = 0",
"na",
"0",
"= nb = 0",
"nb",
"0",
"S = list(input())",
"S",
"list(input())",
"list",
"input()",
"input",
"for c in S:\n #print(na,nb,end='')\n if c == 'a':\n na += 1\n if na + nb <= A + B:\n print('Yes')\n else:\n print('No')\n \n elif c == 'b':\n nb += 1\n if na + nb <= A + B and nb <= B:\n print('Yes')\n else:\n nb -= 1\n print('No')\n \n else:\n print('No')",
"c",
"S",
"if c == 'a':\n na += 1\n if na + nb <= A + B:\n print('Yes')\n else:\n print('No')\n \n elif c == 'b':\n nb += 1\n if na + nb <= A + B and nb <= B:\n print('Yes')\n else:\n nb -= 1\n print('No')\n \n else:\n print('No')",
"c == 'a'",
"c",
"'a'",
"na += 1",
"na",
"1",
"if na + nb <= A + B:\n print('Yes')\n else:\n print('No')\n \n ",
"na + nb <= A + B",
"na + nb",
"na",
"nb",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif c == 'b':\n nb += 1\n if na + nb <= A + B and nb <= B:\n print('Yes')\n else:\n nb -= 1\n print('No')\n \n ",
"c == 'b'",
"c",
"'b'",
"nb += 1",
"nb",
"1",
"if na + nb <= A + B and nb <= B:\n print('Yes')\n else:\n nb -= 1\n print('No')\n \n ",
"na + nb <= A + B and nb <= B",
"na + nb <= A + B",
"na + nb",
"na",
"nb",
"A + B",
"A",
"B",
"nb <= B",
"nb",
"B",
"print('Yes')",
"print",
"'Yes'",
"nb -= 1",
"nb",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"nb = 0",
"0",
"nb",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"A,B = map(int, input().split())",
"map(int, input().split())",
"A",
"nb -= 1",
"1",
"nb",
"na += 1",
"1",
"na",
"N,A,B = map(int, input().split())",
"map(int, input().split())",
"N",
"S = list(input())",
"list(input())",
"S",
"nb += 1",
"1",
"nb",
"na = nb = 0",
"0",
"na"
] | N,A,B = map(int, input().split())
na = nb = 0
S = list(input())
for c in S:
#print(na,nb,end='')
if c == 'a':
na += 1
if na + nb <= A + B:
print('Yes')
else:
print('No')
elif c == 'b':
nb += 1
if na + nb <= A + B and nb <= B:
print('Yes')
else:
nb -= 1
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,
0,
13,
2,
39,
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,
18,
13,
13,
17,
9,
14,
2,
2,
2,
13,
17,
2,
2,
13,
13,
2,
13,
13,
2,
13,
13,
0,
13,
17,
4,
18,
13,
13,
17,
9,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
17,
13,
10,
13,
13,
10,
17,
13,
10,
13,
13,
10,
4,
13,
10,
17,
13,
10,
2,
13,
10,
13,
13,
10,
17,
13
] | [
[
4,
3
],
[
3,
12
],
[
116,
14
],
[
116,
16
],
[
116,
17
],
[
107,
19
],
[
113,
23
],
[
105,
26
],
[
95,
28
],
[
119,
31
],
[
35,
34
],
[
108,
34
],
[
34,
39
],
[
120,
43
],
[
111,
43
],
[
96,
44
],
[
102,
44
],
[
99,
46
],
[
117,
47
],
[
110,
49
],
[
114,
53
],
[
34,
61
],
[
120,
65
],
[
111,
65
],
[
96,
66
],
[
102,
66
],
[
99,
68
],
[
117,
69
],
[
96,
71
],
[
102,
71
],
[
117,
72
],
[
101,
74
],
[
114,
78
],
[
114,
84
],
[
114,
93
],
[
95,
96
],
[
116,
99
],
[
101,
102
],
[
116,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
],
[
116,
117
],
[
119,
120
]
] | [
"N,A,B = [int(i) for i in input().split()]\nS = input()\nans = []*N\nb = 0\na = 0\nfor i in S:\n if i == \"a\" and a+b < A+B:\n a += 1\n ans.append(\"Yes\")\n continue\n elif i == \"b\" and a+b < A+B and b < B:\n b += 1\n ans.append(\"Yes\")\n continue\n ans.append(\"No\")\nprint(\"\\n\".join(ans))",
"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",
"N,A,B = [int(i) for i in input().split()]",
"N",
"[int(i) for i in input().split()]",
"A",
"B",
"S = input()",
"S",
"input()",
"input",
"ans = []*N",
"ans",
"[]*N",
"[]",
"N",
"b = 0",
"b",
"0",
"a = 0",
"a",
"0",
"for i in S:\n if i == \"a\" and a+b < A+B:\n a += 1\n ans.append(\"Yes\")\n continue\n elif i == \"b\" and a+b < A+B and b < B:\n b += 1\n ans.append(\"Yes\")\n continue\n ans.append(\"No\")",
"i",
"S",
"if i == \"a\" and a+b < A+B:\n a += 1\n ans.append(\"Yes\")\n continue\n elif i == \"b\" and a+b < A+B and b < B:\n b += 1\n ans.append(\"Yes\")\n continue\n ",
"i == \"a\" and a+b < A+B",
"i == \"a\"",
"i",
"\"a\"",
"a+b < A+B",
"a+b",
"a",
"b",
"A+B",
"A",
"B",
"a += 1",
"a",
"1",
"ans.append(\"Yes\")",
"ans.append",
"ans",
"append",
"\"Yes\"",
"continue",
"elif i == \"b\" and a+b < A+B and b < B:\n b += 1\n ans.append(\"Yes\")\n continue\n ",
"i == \"b\" and a+b < A+B and b < B",
"i == \"b\" and a+b < A+B",
"i == \"b\"",
"i",
"\"b\"",
"a+b < A+B",
"a+b",
"a",
"b",
"A+B",
"A",
"B",
"b < B",
"b",
"B",
"b += 1",
"b",
"1",
"ans.append(\"Yes\")",
"ans.append",
"ans",
"append",
"\"Yes\"",
"continue",
"ans.append(\"No\")",
"ans.append",
"ans",
"append",
"\"No\"",
"print(\"\\n\".join(ans))",
"print",
"\"\\n\".join(ans)",
"\"\\n\".join",
"\"\\n\"",
"join",
"ans",
"b = 0",
"0",
"b",
"A,B = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"A",
"b += 1",
"1",
"b",
"N,A,B = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"N",
"S = input()",
"input()",
"S",
"a += 1",
"1",
"a",
"ans = []*N",
"[]*N",
"ans",
"B = [int(i) for i in input().split()]",
"[int(i) for i in input().split()]",
"B",
"a = 0",
"0",
"a"
] | N,A,B = [int(i) for i in input().split()]
S = input()
ans = []*N
b = 0
a = 0
for i in S:
if i == "a" and a+b < A+B:
a += 1
ans.append("Yes")
continue
elif i == "b" and a+b < A+B and b < B:
b += 1
ans.append("Yes")
continue
ans.append("No")
print("\n".join(ans)) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
13,
0,
13,
39,
17,
17,
0,
13,
4,
13,
4,
13,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
18,
13,
17,
13,
4,
13,
17,
0,
18,
13,
17,
17,
4,
13,
17,
14,
2,
2,
18,
13,
17,
13,
2,
18,
13,
17,
13,
4,
13,
17,
0,
18,
13,
17,
17,
4,
13,
17,
0,
18,
13,
17,
17,
10,
4,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
13,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
108,
14
],
[
94,
15
],
[
96,
17
],
[
99,
22
],
[
29,
28
],
[
103,
31
],
[
100,
35
],
[
28,
36
],
[
100,
44
],
[
28,
45
],
[
97,
50
],
[
109,
52
],
[
106,
52
],
[
60,
57
],
[
97,
58
],
[
97,
68
],
[
109,
70
],
[
106,
70
],
[
97,
73
],
[
94,
75
],
[
83,
80
],
[
97,
81
],
[
91,
88
],
[
97,
89
],
[
105,
94
],
[
96,
97
],
[
99,
100
],
[
105,
103
],
[
105,
106
],
[
94,
108
],
[
108,
109
]
] | [
"N,A,B=map(int,input().split())\nA += B\ncnt = [0,0]\nS=list(input())\nfor i in range(N):\n if S[i] == 'c':\n print(\"No\")\n elif S[i] == 'a':\n if cnt[0] < A:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n else:\n if cnt[0] < A and cnt[1] < B:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n cnt[1] += 1",
"N,A,B=map(int,input().split())",
"N",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A",
"B",
"A += B",
"A",
"B",
"cnt = [0,0]",
"cnt",
"[0,0]",
"0",
"0",
"S=list(input())",
"S",
"list(input())",
"list",
"input()",
"input",
"for i in range(N):\n if S[i] == 'c':\n print(\"No\")\n elif S[i] == 'a':\n if cnt[0] < A:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n else:\n if cnt[0] < A and cnt[1] < B:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n cnt[1] += 1",
"i",
"range(N)",
"range",
"N",
"if S[i] == 'c':\n print(\"No\")\n elif S[i] == 'a':\n if cnt[0] < A:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n else:\n if cnt[0] < A and cnt[1] < B:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n cnt[1] += 1",
"S[i] == 'c'",
"S[i]",
"S",
"i",
"'c'",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == 'a':\n if cnt[0] < A:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n ",
"S[i] == 'a'",
"S[i]",
"S",
"i",
"'a'",
"if cnt[0] < A:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n ",
"cnt[0] < A",
"cnt[0]",
"cnt",
"0",
"A",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cnt[0] += 1",
"cnt[0]",
"cnt",
"0",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if cnt[0] < A and cnt[1] < B:\n print(\"Yes\")\n cnt[0] += 1\n else:\n print(\"No\")\n ",
"cnt[0] < A and cnt[1] < B",
"cnt[0] < A",
"cnt[0]",
"cnt",
"0",
"A",
"cnt[1] < B",
"cnt[1]",
"cnt",
"1",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cnt[0] += 1",
"cnt[0]",
"cnt",
"0",
"1",
"print(\"No\")",
"print",
"\"No\"",
"cnt[1] += 1",
"cnt[1]",
"cnt",
"1",
"1",
"B=map(int,input().split())",
"map(int,input().split())",
"B",
"cnt = [0,0]",
"[0,0]",
"cnt",
"S=list(input())",
"list(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",
"A += B",
"B",
"A"
] | N,A,B=map(int,input().split())
A += B
cnt = [0,0]
S=list(input())
for i in range(N):
if S[i] == 'c':
print("No")
elif S[i] == 'a':
if cnt[0] < A:
print("Yes")
cnt[0] += 1
else:
print("No")
else:
if cnt[0] < A and cnt[1] < B:
print("Yes")
cnt[0] += 1
else:
print("No")
cnt[1] += 1 |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
4,
13,
0,
13,
39,
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,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
13,
13,
14,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
28,
13,
4,
13,
13,
4,
13,
18,
13,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
39,
13,
10,
2,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
136,
2
],
[
136,
11
],
[
136,
12
],
[
121,
14
],
[
124,
20
],
[
127,
23
],
[
119,
25
],
[
116,
26
],
[
139,
28
],
[
130,
31
],
[
35,
34
],
[
137,
37
],
[
122,
41
],
[
34,
42
],
[
140,
46
],
[
134,
46
],
[
113,
46
],
[
128,
47
],
[
112,
49
],
[
125,
53
],
[
125,
58
],
[
122,
64
],
[
34,
65
],
[
140,
69
],
[
134,
69
],
[
113,
69
],
[
128,
70
],
[
131,
73
],
[
143,
73
],
[
116,
74
],
[
133,
76
],
[
142,
79
],
[
125,
83
],
[
125,
88
],
[
125,
93
],
[
125,
98
],
[
103,
102
],
[
137,
105
],
[
125,
109
],
[
102,
110
],
[
112,
113
],
[
136,
116
],
[
136,
119
],
[
121,
122
],
[
124,
125
],
[
127,
128
],
[
130,
131
],
[
133,
134
],
[
136,
137
],
[
139,
140
],
[
142,
143
]
] | [
"#n = 人数,a = 日本,b = 海外\nn,a,b = map(int,input().split())\n#s = 順位\ns = list(input())\n#k = 結果格納\nk = []\nj = a + b\nc = 0\nd = 0\n\nfor i in range(n):\n if s[i] == 'a':\n if c < j:\n c += 1\n k.append('Yes')\n else:\n k.append('No')\n elif s[i] == 'b':\n if c < j:\n if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n else:\n k.append('No')\n else:\n k.append('No')\n\nfor i in range(n):\n print(k[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",
"k = []",
"k",
"[]",
"j = a + b",
"j",
"a + b",
"a",
"b",
"c = 0",
"c",
"0",
"d = 0",
"d",
"0",
"for i in range(n):\n if s[i] == 'a':\n if c < j:\n c += 1\n k.append('Yes')\n else:\n k.append('No')\n elif s[i] == 'b':\n if c < j:\n if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n else:\n k.append('No')\n else:\n k.append('No')",
"i",
"range(n)",
"range",
"n",
"if s[i] == 'a':\n if c < j:\n c += 1\n k.append('Yes')\n else:\n k.append('No')\n elif s[i] == 'b':\n if c < j:\n if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n else:\n k.append('No')\n else:\n k.append('No')",
"s[i] == 'a'",
"s[i]",
"s",
"i",
"'a'",
"if c < j:\n c += 1\n k.append('Yes')\n else:\n k.append('No')\n ",
"c < j",
"c",
"j",
"c += 1",
"c",
"1",
"k.append('Yes')",
"k.append",
"k",
"append",
"'Yes'",
"k.append('No')",
"k.append",
"k",
"append",
"'No'",
"elif s[i] == 'b':\n if c < j:\n if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n else:\n k.append('No')\n ",
"s[i] == 'b'",
"s[i]",
"s",
"i",
"'b'",
"if c < j:\n if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n else:\n k.append('No')\n ",
"c < j",
"c",
"j",
"if d < b:\n c += 1\n d += 1\n k.append('Yes')\n else:\n k.append('No')\n ",
"d < b",
"d",
"b",
"c += 1",
"c",
"1",
"d += 1",
"d",
"1",
"k.append('Yes')",
"k.append",
"k",
"append",
"'Yes'",
"k.append('No')",
"k.append",
"k",
"append",
"'No'",
"k.append('No')",
"k.append",
"k",
"append",
"'No'",
"k.append('No')",
"k.append",
"k",
"append",
"'No'",
"for i in range(n):\n print(k[i])",
"i",
"range(n)",
"range",
"n",
"print(k[i])",
"print",
"k[i]",
"k",
"i",
"c += 1",
"1",
"c",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"s = list(input())",
"list(input())",
"s",
"k = []",
"[]",
"k",
"j = a + b",
"a + b",
"j",
"d = 0",
"0",
"d",
"c += 1",
"1",
"c",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n",
"c = 0",
"0",
"c",
"d += 1",
"1",
"d"
] | #n = 人数,a = 日本,b = 海外
n,a,b = map(int,input().split())
#s = 順位
s = list(input())
#k = 結果格納
k = []
j = a + b
c = 0
d = 0
for i in range(n):
if s[i] == 'a':
if c < j:
c += 1
k.append('Yes')
else:
k.append('No')
elif s[i] == 'b':
if c < j:
if d < b:
c += 1
d += 1
k.append('Yes')
else:
k.append('No')
else:
k.append('No')
else:
k.append('No')
for i in range(n):
print(k[i]) |
[
7,
15,
13,
13,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
12,
13,
12,
13,
12,
13,
12,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
12,
13,
23,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
4,
13,
17,
0,
13,
2,
2,
17,
17,
17,
15,
0,
13,
4,
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,
10,
2,
13,
10,
17,
13,
10,
17,
13,
10,
12,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
12,
13,
10,
4,
13,
10,
4,
13,
10,
4,
13,
10,
12,
13,
10,
12,
13,
10,
17,
13,
10,
17,
13
] | [
[
26,
25
],
[
134,
31
],
[
35,
35
],
[
139,
44
],
[
124,
49
],
[
154,
57
],
[
134,
59
],
[
154,
60
],
[
154,
61
],
[
157,
63
],
[
149,
65
],
[
127,
67
],
[
166,
70
],
[
74,
73
],
[
143,
76
],
[
158,
81
],
[
73,
82
],
[
128,
85
],
[
131,
85
],
[
170,
85
],
[
152,
87
],
[
155,
88
],
[
169,
90
],
[
158,
100
],
[
73,
101
],
[
128,
104
],
[
131,
104
],
[
170,
104
],
[
152,
106
],
[
155,
107
],
[
167,
109
],
[
146,
109
],
[
155,
110
],
[
130,
112
],
[
145,
115
],
[
124,
125
],
[
127,
128
],
[
130,
131
],
[
139,
140
],
[
154,
143
],
[
145,
146
],
[
154,
152
],
[
154,
155
],
[
157,
158
],
[
166,
167
],
[
169,
170
]
] | [
"import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log\nfrom itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom bisect import bisect, bisect_left, insort, insort_left\nfrom fractions import gcd\nfrom heapq import heappush, heappop\nfrom functools import reduce\nfrom decimal import Decimal\ndef input(): return sys.stdin.readline().strip()\ndef INT(): return int(input())\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\ndef ZIP(n): return zip(*(MAP() for _ in range(n)))\nsys.setrecursionlimit(10 ** 9)\nINF = float('inf')\nmod = 10**9 + 7\nfrom decimal import *\n\nN, A, B = MAP()\nS = input()\n\ncnt = 0\ncnt_for = 0\nfor i in range(N):\n\tif S[i] == \"a\" and cnt < A+B:\n\t\tcnt += 1\n\t\tprint(\"Yes\")\n\telif S[i] == \"b\" and cnt < A+B and cnt_for < B:\n\t\tcnt += 1\n\t\tcnt_for += 1\n\t\tprint(\"Yes\")\n\telse:\n\t\tprint(\"No\")",
"import sys, re",
"sys",
"re",
"from collections import deque, defaultdict, Counter",
"from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees",
"from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby",
"from operator import itemgetter, mul",
"from copy import deepcopy",
"from string import ascii_lowercase, ascii_uppercase, digits",
"from bisect import bisect, bisect_left, insort, insort_left",
"from fractions import gcd",
"from heapq import heappush, heappop",
"from functools import reduce",
"from decimal import Decimal",
"def input(): return sys.stdin.readline().strip()",
"input",
"def INT(): return int(input())",
"INT",
"def MAP(): return map(int, input().split())",
"MAP",
"def LIST(): return list(map(int, input().split()))",
"LIST",
"MAP() for _ in range(n)",
"for _ in range(n)",
"_",
"range(n)",
"range",
"n",
"for _ in range(n)",
"MAP()",
"MAP",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"ZIP",
"n",
"n",
"sys.setrecursionlimit(10 ** 9)",
"sys.setrecursionlimit",
"sys",
"setrecursionlimit",
"10 ** 9",
"10",
"9",
"INF = float('inf')",
"INF",
"float('inf')",
"float",
"'inf'",
"mod = 10**9 + 7",
"mod",
"10**9 + 7",
"10**9",
"10",
"9",
"7",
"from decimal import *",
"N, A, B = MAP()",
"N",
"MAP()",
"MAP",
"A",
"B",
"S = input()",
"S",
"input()",
"input",
"cnt = 0",
"cnt",
"0",
"cnt_for = 0",
"cnt_for",
"0",
"for i in range(N):\n\tif S[i] == \"a\" and cnt < A+B:\n\t\tcnt += 1\n\t\tprint(\"Yes\")\n\telif S[i] == \"b\" and cnt < A+B and cnt_for < B:\n\t\tcnt += 1\n\t\tcnt_for += 1\n\t\tprint(\"Yes\")\n\telse:\n\t\tprint(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\" and cnt < A+B:\n\t\tcnt += 1\n\t\tprint(\"Yes\")\n\telif S[i] == \"b\" and cnt < A+B and cnt_for < B:\n\t\tcnt += 1\n\t\tcnt_for += 1\n\t\tprint(\"Yes\")\n\telse:\n\t\tprint(\"No\")",
"S[i] == \"a\" and cnt < A+B",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"cnt < A+B",
"cnt",
"A+B",
"A",
"B",
"cnt += 1",
"cnt",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"elif S[i] == \"b\" and cnt < A+B and cnt_for < B:\n\t\tcnt += 1\n\t\tcnt_for += 1\n\t\tprint(\"Yes\")\n\t",
"S[i] == \"b\" and cnt < A+B and cnt_for < B",
"S[i] == \"b\" and cnt < A+B",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"cnt < A+B",
"cnt",
"A+B",
"A",
"B",
"cnt_for < B",
"cnt_for",
"B",
"cnt += 1",
"cnt",
"1",
"cnt_for += 1",
"cnt_for",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"mod = 10**9 + 7",
"10**9 + 7",
"mod",
"cnt = 0",
"0",
"cnt",
"cnt += 1",
"1",
"cnt",
"def MAP(): return map(int, input().split())",
"def MAP(): return map(int, input().split())",
"MAP",
"def LIST(): return list(map(int, input().split()))",
"def LIST(): return list(map(int, input().split()))",
"LIST",
"INF = float('inf')",
"float('inf')",
"INF",
"N, A, B = MAP()",
"MAP()",
"N",
"cnt_for += 1",
"1",
"cnt_for",
"def input(): return sys.stdin.readline().strip()",
"def input(): return sys.stdin.readline().strip()",
"input",
"A, B = MAP()",
"MAP()",
"A",
"B = MAP()",
"MAP()",
"B",
"S = input()",
"input()",
"S",
"def INT(): return int(input())",
"def INT(): return int(input())",
"INT",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"def ZIP(n): return zip(*(MAP() for _ in range(n)))",
"ZIP",
"cnt_for = 0",
"0",
"cnt_for",
"cnt += 1",
"1",
"cnt"
] | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
from decimal import Decimal
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
from decimal import *
N, A, B = MAP()
S = input()
cnt = 0
cnt_for = 0
for i in range(N):
if S[i] == "a" and cnt < A+B:
cnt += 1
print("Yes")
elif S[i] == "b" and cnt < A+B and cnt_for < B:
cnt += 1
cnt_for += 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,
2,
18,
13,
13,
17,
2,
2,
13,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
14,
2,
2,
2,
18,
13,
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,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
94,
2
],
[
94,
11
],
[
94,
12
],
[
97,
14
],
[
91,
18
],
[
88,
21
],
[
25,
24
],
[
77,
27
],
[
98,
32
],
[
24,
33
],
[
92,
37
],
[
83,
37
],
[
89,
38
],
[
86,
38
],
[
95,
40
],
[
80,
41
],
[
82,
46
],
[
98,
53
],
[
24,
54
],
[
92,
58
],
[
83,
58
],
[
89,
59
],
[
86,
59
],
[
95,
61
],
[
80,
62
],
[
89,
64
],
[
86,
64
],
[
80,
65
],
[
85,
70
],
[
94,
77
],
[
94,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
]
] | [
"N, A, B = map(int, input().split())\nS = input()\na = 0\nb = 0\nfor i in range(N):\n if S[i] == \"a\" and a + b < A + B:\n print(\"Yes\")\n a += 1\n elif S[i] == \"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 i in range(N):\n if S[i] == \"a\" and a + b < A + B:\n print(\"Yes\")\n a += 1\n elif S[i] == \"b\" and a + b < A + B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\" and a + b < A + B:\n print(\"Yes\")\n a += 1\n elif S[i] == \"b\" and a + b < A + B and b < B:\n print(\"Yes\")\n b += 1\n else:\n print(\"No\")",
"S[i] == \"a\" and a + b < A + B",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"a + b < A + B",
"a + b",
"a",
"b",
"A + B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"a += 1",
"a",
"1",
"elif S[i] == \"b\" and a + b < A + B and b < B:\n print(\"Yes\")\n b += 1\n ",
"S[i] == \"b\" and a + b < A + B and b < B",
"S[i] == \"b\" and a + b < A + B",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"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\"",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"a += 1",
"1",
"a",
"b += 1",
"1",
"b",
"b = 0",
"0",
"b",
"a = 0",
"0",
"a",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"S = input()",
"input()",
"S"
] | N, A, B = map(int, input().split())
S = input()
a = 0
b = 0
for i in range(N):
if S[i] == "a" and a + b < A + B:
print("Yes")
a += 1
elif S[i] == "b" and a + b < A + B and b < B:
print("Yes")
b += 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,
17,
0,
13,
17,
28,
13,
4,
13,
13,
0,
13,
18,
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,
4,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
103,
2
],
[
103,
13
],
[
103,
14
],
[
94,
16
],
[
106,
20
],
[
100,
23
],
[
27,
26
],
[
86,
29
],
[
88,
31
],
[
95,
33
],
[
26,
34
],
[
89,
37
],
[
107,
42
],
[
110,
42
],
[
101,
43
],
[
98,
43
],
[
92,
45
],
[
104,
46
],
[
109,
51
],
[
89,
58
],
[
107,
64
],
[
110,
64
],
[
101,
65
],
[
98,
65
],
[
92,
67
],
[
104,
68
],
[
101,
70
],
[
98,
70
],
[
104,
71
],
[
97,
76
],
[
103,
86
],
[
88,
89
],
[
103,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
]
] | [
"N,A,B=list(map(int, input().split()))\nS=input()\na=0\nb=0\n\nfor i in range(N):\n s=S[i]\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",
"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",
"a=0",
"a",
"0",
"b=0",
"b",
"0",
"for i in range(N):\n s=S[i]\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')",
"i",
"range(N)",
"range",
"N",
"s=S[i]",
"s",
"S[i]",
"S",
"i",
"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'",
"N,A,B=list(map(int, input().split()))",
"list(map(int, input().split()))",
"N",
"s=S[i]",
"S[i]",
"s",
"A,B=list(map(int, input().split()))",
"list(map(int, input().split()))",
"A",
"S=input()",
"input()",
"S",
"b+=1",
"1",
"b",
"b=0",
"0",
"b",
"B=list(map(int, input().split()))",
"list(map(int, input().split()))",
"B",
"a=0",
"0",
"a",
"a+=1",
"1",
"a"
] | N,A,B=list(map(int, input().split()))
S=input()
a=0
b=0
for i in range(N):
s=S[i]
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,
2,
13,
13,
28,
13,
13,
14,
2,
13,
17,
14,
2,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
2,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
90,
2
],
[
90,
11
],
[
90,
12
],
[
78,
14
],
[
72,
20
],
[
91,
22
],
[
76,
23
],
[
26,
25
],
[
79,
25
],
[
25,
29
],
[
73,
33
],
[
94,
33
],
[
88,
33
],
[
87,
39
],
[
25,
46
],
[
76,
51
],
[
82,
51
],
[
73,
54
],
[
94,
54
],
[
88,
54
],
[
93,
60
],
[
81,
63
],
[
72,
73
],
[
90,
76
],
[
78,
79
],
[
81,
82
],
[
90,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
]
] | [
"n,a,b = map(int,input().split())\nli = list(input())\nc=a+b\nfor stu in li:\n if stu=='a':\n if c==0:\n print(\"No\")\n else:\n c-=1\n print(\"Yes\")\n elif stu=='b':\n if b==0 or c==0:\n print(\"No\")\n else:\n c-=1\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",
"li = list(input())",
"li",
"list(input())",
"list",
"input()",
"input",
"c=a+b",
"c",
"a+b",
"a",
"b",
"for stu in li:\n if stu=='a':\n if c==0:\n print(\"No\")\n else:\n c-=1\n print(\"Yes\")\n elif stu=='b':\n if b==0 or c==0:\n print(\"No\")\n else:\n c-=1\n b-=1\n print(\"Yes\")\n else:\n print(\"No\")",
"stu",
"li",
"if stu=='a':\n if c==0:\n print(\"No\")\n else:\n c-=1\n print(\"Yes\")\n elif stu=='b':\n if b==0 or c==0:\n print(\"No\")\n else:\n c-=1\n b-=1\n print(\"Yes\")\n else:\n print(\"No\")",
"stu=='a'",
"stu",
"'a'",
"if c==0:\n print(\"No\")\n else:\n c-=1\n print(\"Yes\")\n ",
"c==0",
"c",
"0",
"print(\"No\")",
"print",
"\"No\"",
"c-=1",
"c",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"elif stu=='b':\n if b==0 or c==0:\n print(\"No\")\n else:\n c-=1\n b-=1\n print(\"Yes\")\n ",
"stu=='b'",
"stu",
"'b'",
"if b==0 or c==0:\n print(\"No\")\n else:\n c-=1\n b-=1\n print(\"Yes\")\n ",
"b==0 or c==0",
"b==0",
"b",
"0",
"c==0",
"c",
"0",
"print(\"No\")",
"print",
"\"No\"",
"c-=1",
"c",
"1",
"b-=1",
"b",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"c=a+b",
"a+b",
"c",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"li = list(input())",
"list(input())",
"li",
"b-=1",
"1",
"b",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n",
"c-=1",
"1",
"c",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"c-=1",
"1",
"c"
] | n,a,b = map(int,input().split())
li = list(input())
c=a+b
for stu in li:
if stu=='a':
if c==0:
print("No")
else:
c-=1
print("Yes")
elif stu=='b':
if b==0 or c==0:
print("No")
else:
c-=1
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,
21,
22,
17,
17,
22,
17,
17,
28,
13,
4,
13,
13,
0,
13,
17,
0,
13,
18,
13,
13,
14,
2,
2,
18,
13,
17,
18,
13,
17,
2,
13,
13,
14,
2,
13,
17,
0,
13,
17,
0,
18,
13,
17,
17,
14,
2,
13,
17,
14,
2,
18,
13,
17,
13,
0,
13,
17,
0,
18,
13,
17,
17,
14,
13,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
21,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
108,
2
],
[
108,
11
],
[
108,
12
],
[
114,
14
],
[
96,
18
],
[
28,
27
],
[
106,
30
],
[
111,
32
],
[
102,
35
],
[
115,
37
],
[
27,
38
],
[
97,
43
],
[
97,
46
],
[
91,
49
],
[
109,
50
],
[
103,
53
],
[
93,
56
],
[
62,
59
],
[
97,
60
],
[
103,
65
],
[
97,
70
],
[
109,
72
],
[
99,
74
],
[
80,
77
],
[
97,
78
],
[
108,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
108,
106
],
[
108,
109
],
[
111,
112
],
[
114,
115
]
] | [
"N, A, B = map(int, input().split())\nS = input()\n\nqual = {\"A\": 0, \"B\": 0}\n\nfor i in range(N):\n ans = False\n l = S[i]\n if qual[\"A\"] + qual[\"B\"] < A + B:\n if l == \"a\":\n ans = True\n qual[\"A\"] += 1\n elif l == \"b\":\n if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n if ans:\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",
"qual = {\"A\": 0, \"B\": 0}",
"qual",
"{\"A\": 0, \"B\": 0}",
"\"A\"",
"\"A\"",
"0",
"\"B\"",
"\"B\"",
"0",
"for i in range(N):\n ans = False\n l = S[i]\n if qual[\"A\"] + qual[\"B\"] < A + B:\n if l == \"a\":\n ans = True\n qual[\"A\"] += 1\n elif l == \"b\":\n if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n if ans:\n print('Yes')\n else:\n print('No')",
"i",
"range(N)",
"range",
"N",
"ans = False",
"ans",
"False",
"l = S[i]",
"l",
"S[i]",
"S",
"i",
"if qual[\"A\"] + qual[\"B\"] < A + B:\n if l == \"a\":\n ans = True\n qual[\"A\"] += 1\n elif l == \"b\":\n if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n ",
"qual[\"A\"] + qual[\"B\"] < A + B",
"qual[\"A\"] + qual[\"B\"]",
"qual[\"A\"]",
"qual",
"\"A\"",
"qual[\"B\"]",
"qual",
"\"B\"",
"A + B",
"A",
"B",
"if l == \"a\":\n ans = True\n qual[\"A\"] += 1\n elif l == \"b\":\n if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n ",
"l == \"a\"",
"l",
"\"a\"",
"ans = True",
"ans",
"True",
"qual[\"A\"] += 1",
"qual[\"A\"]",
"qual",
"\"A\"",
"1",
"elif l == \"b\":\n if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n ",
"l == \"b\"",
"l",
"\"b\"",
"if qual[\"B\"] < B:\n ans = True\n qual[\"B\"] += 1\n ",
"qual[\"B\"] < B",
"qual[\"B\"]",
"qual",
"\"B\"",
"B",
"ans = True",
"ans",
"True",
"qual[\"B\"] += 1",
"qual[\"B\"]",
"qual",
"\"B\"",
"1",
"if ans:\n print('Yes')\n else:\n print('No')",
"ans",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"ans = True",
"True",
"ans",
"qual = {\"A\": 0, \"B\": 0}",
"{\"A\": 0, \"B\": 0}",
"qual",
"ans = True",
"True",
"ans",
"l = S[i]",
"S[i]",
"l",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"ans = False",
"False",
"ans",
"S = input()",
"input()",
"S"
] | N, A, B = map(int, input().split())
S = input()
qual = {"A": 0, "B": 0}
for i in range(N):
ans = False
l = S[i]
if qual["A"] + qual["B"] < A + B:
if l == "a":
ans = True
qual["A"] += 1
elif l == "b":
if qual["B"] < B:
ans = True
qual["B"] += 1
if ans:
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,
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,
40,
13,
13,
4,
13,
17,
0,
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,
17,
13,
10,
4,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
99,
14
],
[
87,
18
],
[
93,
21
],
[
25,
24
],
[
106,
27
],
[
100,
31
],
[
24,
32
],
[
88,
36
],
[
97,
36
],
[
91,
36
],
[
82,
38
],
[
85,
39
],
[
90,
44
],
[
100,
52
],
[
24,
53
],
[
88,
58
],
[
97,
58
],
[
91,
58
],
[
82,
60
],
[
85,
61
],
[
94,
63
],
[
103,
63
],
[
85,
64
],
[
102,
69
],
[
96,
72
],
[
105,
82
],
[
105,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"n,a,b=map(int,input().split())\ns=input()\npassed=0\nrank_b=1\nfor i in range(n):\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 rank_b<=b:\n print(\"Yes\")\n rank_b+=1\n passed+=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",
"passed=0",
"passed",
"0",
"rank_b=1",
"rank_b",
"1",
"for i in range(n):\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 rank_b<=b:\n print(\"Yes\")\n rank_b+=1\n passed+=1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(n)",
"range",
"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 rank_b<=b:\n print(\"Yes\")\n rank_b+=1\n passed+=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 rank_b<=b:\n print(\"Yes\")\n rank_b+=1\n passed+=1\n else:\n print(\"No\")\n ",
"s[i]==\"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"if passed<a+b and rank_b<=b:\n print(\"Yes\")\n rank_b+=1\n passed+=1\n else:\n print(\"No\")\n ",
"passed<a+b and rank_b<=b",
"passed<a+b",
"passed",
"a+b",
"a",
"b",
"rank_b<=b",
"rank_b",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"rank_b+=1",
"rank_b",
"1",
"passed+=1",
"passed",
"1",
"print(\"No\")",
"print",
"\"No\"",
"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",
"passed=0",
"0",
"passed",
"passed+=1",
"1",
"passed",
"rank_b=1",
"1",
"rank_b",
"passed+=1",
"1",
"passed",
"s=input()",
"input()",
"s",
"rank_b+=1",
"1",
"rank_b",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n"
] | n,a,b=map(int,input().split())
s=input()
passed=0
rank_b=1
for i in range(n):
if s[i]=="a":
if passed<a+b:
print("Yes")
passed+=1
else:
print("No")
elif s[i]=="b":
if passed<a+b and rank_b<=b:
print("Yes")
rank_b+=1
passed+=1
else:
print("No")
else:
print("No") |
[
7,
15,
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,
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,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
4,
13,
17,
29,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
12,
13,
10,
12,
13
] | [
[
11,
10
],
[
88,
12
],
[
11,
13
],
[
11,
14
],
[
17,
16
],
[
91,
18
],
[
21,
20
],
[
24,
23
],
[
27,
26
],
[
16,
26
],
[
26,
30
],
[
20,
34
],
[
62,
34
],
[
39,
34
],
[
13,
36
],
[
14,
37
],
[
40,
39
],
[
26,
49
],
[
20,
54
],
[
62,
54
],
[
39,
54
],
[
13,
56
],
[
14,
57
],
[
23,
59
],
[
65,
59
],
[
14,
60
],
[
63,
62
],
[
66,
65
],
[
85,
82
]
] | [
"import sys\ndef S(): return sys.stdin.readline().rstrip()\ndef IL(): return map(int,sys.stdin.readline().rstrip().split())\n\ndef solve():\n n,a,b = IL()\n s = S()\n count = 0\n fs = 1\n for rep in s:\n if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n return\n\nif __name__=='__main__':\n solve()",
"import sys",
"sys",
"def S(): return sys.stdin.readline().rstrip()",
"S",
"def IL(): return map(int,sys.stdin.readline().rstrip().split())",
"IL",
"def solve():\n n,a,b = IL()\n s = S()\n count = 0\n fs = 1\n for rep in s:\n if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n return",
"solve",
"n,a,b = IL()",
"n",
"IL()",
"IL",
"a",
"b",
"s = S()",
"s",
"S()",
"S",
"count = 0",
"count",
"0",
"fs = 1",
"fs",
"1",
"for rep in s:\n if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n ",
"rep",
"s",
"if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n ",
"rep=='a'",
"rep",
"'a'",
"if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n ",
"count < a+b",
"count",
"a+b",
"a",
"b",
"count += 1",
"count",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n ",
"rep=='b'",
"rep",
"'b'",
"if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n ",
"count<a+b and fs<=b",
"count<a+b",
"count",
"a+b",
"a",
"b",
"fs<=b",
"fs",
"b",
"count += 1",
"count",
"1",
"fs += 1",
"fs",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"return",
"if __name__=='__main__':\n solve()",
"__name__=='__main__'",
"__name__",
"'__main__'",
"solve()",
"solve",
"def solve():\n n,a,b = IL()\n s = S()\n count = 0\n fs = 1\n for rep in s:\n if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n return",
"def solve():\n n,a,b = IL()\n s = S()\n count = 0\n fs = 1\n for rep in s:\n if rep=='a':\n if count < a+b:\n count += 1\n print('Yes')\n else:\n print('No')\n elif rep=='b':\n if count<a+b and fs<=b:\n count += 1\n fs += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n return",
"solve",
"def IL(): return map(int,sys.stdin.readline().rstrip().split())",
"def IL(): return map(int,sys.stdin.readline().rstrip().split())",
"IL",
"def S(): return sys.stdin.readline().rstrip()",
"def S(): return sys.stdin.readline().rstrip()",
"S"
] | import sys
def S(): return sys.stdin.readline().rstrip()
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def solve():
n,a,b = IL()
s = S()
count = 0
fs = 1
for rep in s:
if rep=='a':
if count < a+b:
count += 1
print('Yes')
else:
print('No')
elif rep=='b':
if count<a+b and fs<=b:
count += 1
fs += 1
print('Yes')
else:
print('No')
else:
print('No')
return
if __name__=='__main__':
solve() |
[
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,
13,
4,
13,
13,
0,
13,
17,
14,
2,
13,
17,
14,
2,
13,
2,
13,
13,
0,
13,
17,
4,
13,
17,
9,
14,
2,
13,
17,
0,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
0,
13,
17,
4,
13,
17,
9,
4,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
13
],
[
5,
14
],
[
17,
16
],
[
21,
20
],
[
24,
23
],
[
16,
30
],
[
33,
32
],
[
23,
40
],
[
69,
40
],
[
45,
40
],
[
13,
42
],
[
14,
43
],
[
46,
45
],
[
57,
56
],
[
23,
61
],
[
69,
61
],
[
45,
61
],
[
13,
63
],
[
14,
64
],
[
56,
66
],
[
20,
66
],
[
14,
67
],
[
70,
69
],
[
82,
79
]
] | [
"def resolve():\n n, a, b = map(int, input().split())\n ss = input()\n b_count = 0\n total = 0\n for i, s in enumerate(ss):\n i += 1\n if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n print(\"No\")\nresolve()",
"def resolve():\n n, a, b = map(int, input().split())\n ss = input()\n b_count = 0\n total = 0\n for i, s in enumerate(ss):\n i += 1\n if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\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",
"ss = input()",
"ss",
"input()",
"input",
"b_count = 0",
"b_count",
"0",
"total = 0",
"total",
"0",
"for i, s in enumerate(ss):\n i += 1\n if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n print(\"No\")",
"i",
"s",
"enumerate(ss)",
"enumerate",
"ss",
"i += 1",
"i",
"1",
"if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n ",
"s == \"a\"",
"s",
"\"a\"",
"if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n ",
"total < a+b",
"total",
"a+b",
"a",
"b",
"total += 1",
"total",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"continue",
"elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n ",
"s == \"b\"",
"s",
"\"b\"",
"b_count += 1",
"b_count",
"1",
"if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n ",
"total < a+b and b_count <= b",
"total < a+b",
"total",
"a+b",
"a",
"b",
"b_count <= b",
"b_count",
"b",
"total += 1",
"total",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"continue",
"print(\"No\")",
"print",
"\"No\"",
"resolve()",
"resolve",
"def resolve():\n n, a, b = map(int, input().split())\n ss = input()\n b_count = 0\n total = 0\n for i, s in enumerate(ss):\n i += 1\n if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n print(\"No\")",
"def resolve():\n n, a, b = map(int, input().split())\n ss = input()\n b_count = 0\n total = 0\n for i, s in enumerate(ss):\n i += 1\n if s == \"a\":\n if total < a+b:\n total += 1\n print(\"Yes\")\n continue\n elif s == \"b\":\n b_count += 1\n if total < a+b and b_count <= b:\n total += 1\n print(\"Yes\")\n continue\n print(\"No\")",
"resolve"
] | def resolve():
n, a, b = map(int, input().split())
ss = input()
b_count = 0
total = 0
for i, s in enumerate(ss):
i += 1
if s == "a":
if total < a+b:
total += 1
print("Yes")
continue
elif s == "b":
b_count += 1
if total < a+b and b_count <= b:
total += 1
print("Yes")
continue
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,
40,
2,
2,
13,
13,
17,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
2,
40,
2,
2,
13,
13,
17,
13,
40,
13,
2,
13,
17,
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,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
87,
14
],
[
81,
18
],
[
96,
21
],
[
25,
24
],
[
88,
24
],
[
24,
28
],
[
106,
34
],
[
91,
35
],
[
82,
37
],
[
100,
37
],
[
85,
37
],
[
84,
42
],
[
24,
49
],
[
106,
56
],
[
91,
57
],
[
82,
59
],
[
100,
59
],
[
85,
59
],
[
97,
61
],
[
94,
61
],
[
91,
63
],
[
99,
69
],
[
93,
72
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
105,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
105,
103
],
[
105,
106
]
] | [
"N,A,B = map(int,input().split())\nS = input()\n\npass_num = 0\npass_fo = 0\n\nfor i in S:\n if i == 'a':\n if (A + B)-1 >= pass_num:\n print('Yes')\n pass_num += 1\n else:\n print('No')\n elif i == 'b':\n if ((A+B-1) >= pass_num)and(pass_fo <= B-1):\n print('Yes')\n pass_num += 1\n pass_fo += 1\n else:\n print('No')\n else:# 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",
"pass_num = 0",
"pass_num",
"0",
"pass_fo = 0",
"pass_fo",
"0",
"for i in S:\n if i == 'a':\n if (A + B)-1 >= pass_num:\n print('Yes')\n pass_num += 1\n else:\n print('No')\n elif i == 'b':\n if ((A+B-1) >= pass_num)and(pass_fo <= B-1):\n print('Yes')\n pass_num += 1\n pass_fo += 1\n else:\n print('No')\n else:# i == 'c'\n print('No')",
"i",
"S",
"if i == 'a':\n if (A + B)-1 >= pass_num:\n print('Yes')\n pass_num += 1\n else:\n print('No')\n elif i == 'b':\n if ((A+B-1) >= pass_num)and(pass_fo <= B-1):\n print('Yes')\n pass_num += 1\n pass_fo += 1\n else:\n print('No')\n else:# i == 'c'\n print('No')",
"i == 'a'",
"i",
"'a'",
"if (A + B)-1 >= pass_num:\n print('Yes')\n pass_num += 1\n else:\n print('No')\n ",
"(A + B)-1 >= pass_num",
"(A + B)-1",
"A + B",
"A",
"B",
"1",
"pass_num",
"print('Yes')",
"print",
"'Yes'",
"pass_num += 1",
"pass_num",
"1",
"print('No')",
"print",
"'No'",
"elif i == 'b':\n if ((A+B-1) >= pass_num)and(pass_fo <= B-1):\n print('Yes')\n pass_num += 1\n pass_fo += 1\n else:\n print('No')\n ",
"i == 'b'",
"i",
"'b'",
"if ((A+B-1) >= pass_num)and(pass_fo <= B-1):\n print('Yes')\n pass_num += 1\n pass_fo += 1\n else:\n print('No')\n ",
"((A+B-1) >= pass_num)and(pass_fo <= B-1)",
"(A+B-1) >= pass_num",
"A+B-1",
"A+B",
"A",
"B",
"1",
"pass_num",
"pass_fo <= B-1",
"pass_fo",
"B-1",
"B",
"1",
"print('Yes')",
"print",
"'Yes'",
"pass_num += 1",
"pass_num",
"1",
"pass_fo += 1",
"pass_fo",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"pass_num = 0",
"0",
"pass_num",
"pass_num += 1",
"1",
"pass_num",
"S = input()",
"input()",
"S",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"pass_fo += 1",
"1",
"pass_fo",
"pass_fo = 0",
"0",
"pass_fo",
"pass_num += 1",
"1",
"pass_num",
"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()
pass_num = 0
pass_fo = 0
for i in S:
if i == 'a':
if (A + B)-1 >= pass_num:
print('Yes')
pass_num += 1
else:
print('No')
elif i == 'b':
if ((A+B-1) >= pass_num)and(pass_fo <= B-1):
print('Yes')
pass_num += 1
pass_fo += 1
else:
print('No')
else:# 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,
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,
40,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
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
] | [
[
95,
2
],
[
95,
11
],
[
95,
12
],
[
98,
14
],
[
77,
20
],
[
89,
23
],
[
27,
26
],
[
99,
26
],
[
26,
30
],
[
78,
34
],
[
84,
34
],
[
102,
34
],
[
93,
36
],
[
96,
37
],
[
101,
39
],
[
26,
49
],
[
78,
54
],
[
84,
54
],
[
102,
54
],
[
93,
56
],
[
96,
57
],
[
90,
59
],
[
81,
59
],
[
96,
60
],
[
83,
62
],
[
80,
65
],
[
77,
78
],
[
80,
81
],
[
83,
84
],
[
95,
87
],
[
89,
90
],
[
95,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
]
] | [
"n, a, b = map(int, input().split())\nS = list(input())\n\nt_pass = 0\nf_pass = 1\n\nfor e in S:\n if e == 'a':\n if t_pass < a + b:\n t_pass += 1\n print('Yes')\n else:\n print('No')\n elif e == 'b':\n if t_pass < a + b and f_pass <= b:\n t_pass += 1\n f_pass += 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",
"t_pass = 0",
"t_pass",
"0",
"f_pass = 1",
"f_pass",
"1",
"for e in S:\n if e == 'a':\n if t_pass < a + b:\n t_pass += 1\n print('Yes')\n else:\n print('No')\n elif e == 'b':\n if t_pass < a + b and f_pass <= b:\n t_pass += 1\n f_pass += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"e",
"S",
"if e == 'a':\n if t_pass < a + b:\n t_pass += 1\n print('Yes')\n else:\n print('No')\n elif e == 'b':\n if t_pass < a + b and f_pass <= b:\n t_pass += 1\n f_pass += 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"e == 'a'",
"e",
"'a'",
"if t_pass < a + b:\n t_pass += 1\n print('Yes')\n else:\n print('No')\n ",
"t_pass < a + b",
"t_pass",
"a + b",
"a",
"b",
"t_pass += 1",
"t_pass",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif e == 'b':\n if t_pass < a + b and f_pass <= b:\n t_pass += 1\n f_pass += 1\n print('Yes')\n else:\n print('No')\n ",
"e == 'b'",
"e",
"'b'",
"if t_pass < a + b and f_pass <= b:\n t_pass += 1\n f_pass += 1\n print('Yes')\n else:\n print('No')\n ",
"t_pass < a + b and f_pass <= b",
"t_pass < a + b",
"t_pass",
"a + b",
"a",
"b",
"f_pass <= b",
"f_pass",
"b",
"t_pass += 1",
"t_pass",
"1",
"f_pass += 1",
"f_pass",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"t_pass = 0",
"0",
"t_pass",
"f_pass += 1",
"1",
"f_pass",
"t_pass += 1",
"1",
"t_pass",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"f_pass = 1",
"1",
"f_pass",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"S = list(input())",
"list(input())",
"S",
"t_pass += 1",
"1",
"t_pass"
] | n, a, b = map(int, input().split())
S = list(input())
t_pass = 0
f_pass = 1
for e in S:
if e == 'a':
if t_pass < a + b:
t_pass += 1
print('Yes')
else:
print('No')
elif e == 'b':
if t_pass < a + b and f_pass <= b:
t_pass += 1
f_pass += 1
print('Yes')
else:
print('No')
else:
print('No')
|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
28,
13,
4,
13,
0,
13,
17,
14,
2,
2,
13,
17,
2,
2,
13,
13,
17,
14,
2,
2,
2,
13,
17,
2,
2,
13,
13,
17,
2,
13,
17,
4,
13,
18,
17,
39,
13,
17,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
61,
2
],
[
61,
11
],
[
61,
12
],
[
15,
14
],
[
58,
18
],
[
14,
23
],
[
62,
27
],
[
56,
28
],
[
14,
34
],
[
62,
38
],
[
56,
39
],
[
56,
42
],
[
61,
53
],
[
61,
56
],
[
58,
59
],
[
61,
62
]
] | [
"n,a,b=map(int,input().split())\nfor c in input():\n f=1\n if c<\"b\"and a+b>0:f=0;a-=1\n elif c<\"c\"and a+b>0and b>0:f=0;b-=1\n print(\"YNeos\"[f::2])",
"n,a,b=map(int,input().split())",
"n",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a",
"b",
"for c in input():\n f=1\n if c<\"b\"and a+b>0:f=0;a-=1\n elif c<\"c\"and a+b>0and b>0:f=0;b-=1\n print(\"YNeos\"[f::2])",
"c",
"input()",
"input",
"f=1",
"f",
"1",
"if c<\"b\"and a+b>0:f=0;a-=1\n elif c<\"c\"and a+b>0and b>0:f=0;b-=1\n ",
"c<\"b\"and a+b>0",
"c<\"b\"",
"c",
"\"b\"",
"a+b>0",
"a+b",
"a",
"b",
"0",
"elif c<\"c\"and a+b>0and b>0:f=0;b-=1\n ",
"c<\"c\"and a+b>0and b>0",
"c<\"c\"and a+b>0",
"c<\"c\"",
"c",
"\"c\"",
"a+b>0",
"a+b",
"a",
"b",
"0",
"b>0",
"b",
"0",
"print(\"YNeos\"[f::2])",
"print",
"\"YNeos\"[f::2]",
"\"YNeos\"",
"f::2",
"f",
"2",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"f=1",
"1",
"f",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a"
] | n,a,b=map(int,input().split())
for c in input():
f=1
if c<"b"and a+b>0:f=0;a-=1
elif c<"c"and a+b>0and b>0:f=0;b-=1
print("YNeos"[f::2]) |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
13,
0,
13,
4,
13,
0,
13,
2,
39,
17,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
4,
13,
13,
14,
2,
13,
17,
14,
2,
13,
2,
13,
13,
0,
18,
13,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
0,
18,
13,
13,
17,
0,
13,
17,
28,
13,
13,
4,
13,
8,
13,
17,
17,
10,
4,
13,
10,
17,
13,
10,
13,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13,
10,
2,
13,
10,
17,
13,
10,
13,
13,
10,
17,
13
] | [
[
4,
3
],
[
3,
12
],
[
117,
14
],
[
117,
16
],
[
117,
17
],
[
93,
19
],
[
111,
23
],
[
100,
27
],
[
96,
29
],
[
114,
32
],
[
94,
39
],
[
97,
46
],
[
106,
46
],
[
121,
46
],
[
118,
48
],
[
103,
49
],
[
54,
51
],
[
112,
52
],
[
120,
56
],
[
108,
63
],
[
97,
68
],
[
106,
68
],
[
121,
68
],
[
118,
70
],
[
103,
71
],
[
109,
73
],
[
115,
73
],
[
103,
74
],
[
79,
76
],
[
112,
77
],
[
105,
81
],
[
85,
84
],
[
112,
84
],
[
84,
89
],
[
93,
94
],
[
96,
97
],
[
117,
100
],
[
117,
103
],
[
105,
106
],
[
108,
109
],
[
111,
112
],
[
114,
115
],
[
117,
118
],
[
120,
121
]
] | [
"n, a, b = [int(w) for w in input().split()]\ns = input()\n\nn_li = [False] * n\npass_num = 0\nb_rank = 0\n\nfor i, c in enumerate(s):\n if c == \"a\":\n if pass_num < a + b:\n n_li[i] = True\n pass_num += 1\n elif c == \"b\":\n b_rank += 1\n if pass_num < a + b and b_rank <= b:\n n_li[i] = True\n pass_num += 1\n\n\nfor t in n_li:\n print(\"Yes\" if t else \"No\")",
"int(w) for w in input().split()",
"for w in input().split()",
"w",
"input().split()",
"().split",
"()",
"input",
"split",
"for w in input().split()",
"int(w)",
"int",
"w",
"n, a, b = [int(w) for w in input().split()]",
"n",
"[int(w) for w in input().split()]",
"a",
"b",
"s = input()",
"s",
"input()",
"input",
"n_li = [False] * n",
"n_li",
"[False] * n",
"[False]",
"False",
"n",
"pass_num = 0",
"pass_num",
"0",
"b_rank = 0",
"b_rank",
"0",
"for i, c in enumerate(s):\n if c == \"a\":\n if pass_num < a + b:\n n_li[i] = True\n pass_num += 1\n elif c == \"b\":\n b_rank += 1\n if pass_num < a + b and b_rank <= b:\n n_li[i] = True\n pass_num += 1",
"i",
"c",
"enumerate(s)",
"enumerate",
"s",
"if c == \"a\":\n if pass_num < a + b:\n n_li[i] = True\n pass_num += 1\n elif c == \"b\":\n b_rank += 1\n if pass_num < a + b and b_rank <= b:\n n_li[i] = True\n pass_num += 1",
"c == \"a\"",
"c",
"\"a\"",
"if pass_num < a + b:\n n_li[i] = True\n pass_num += 1\n ",
"pass_num < a + b",
"pass_num",
"a + b",
"a",
"b",
"n_li[i] = True",
"n_li[i]",
"n_li",
"i",
"True",
"pass_num += 1",
"pass_num",
"1",
"elif c == \"b\":\n b_rank += 1\n if pass_num < a + b and b_rank <= b:\n n_li[i] = True\n pass_num += 1",
"c == \"b\"",
"c",
"\"b\"",
"b_rank += 1",
"b_rank",
"1",
"if pass_num < a + b and b_rank <= b:\n n_li[i] = True\n pass_num += 1",
"pass_num < a + b and b_rank <= b",
"pass_num < a + b",
"pass_num",
"a + b",
"a",
"b",
"b_rank <= b",
"b_rank",
"b",
"n_li[i] = True",
"n_li[i]",
"n_li",
"i",
"True",
"pass_num += 1",
"pass_num",
"1",
"for t in n_li:\n print(\"Yes\" if t else \"No\")",
"t",
"n_li",
"print(\"Yes\" if t else \"No\")",
"print",
"\"Yes\" if t else \"No\"",
"t",
"\"Yes\"",
"\"No\"",
"s = input()",
"input()",
"s",
"pass_num = 0",
"0",
"pass_num",
"n, a, b = [int(w) for w in input().split()]",
"[int(w) for w in input().split()]",
"n",
"b = [int(w) for w in input().split()]",
"[int(w) for w in input().split()]",
"b",
"pass_num += 1",
"1",
"pass_num",
"b_rank += 1",
"1",
"b_rank",
"n_li = [False] * n",
"[False] * n",
"n_li",
"b_rank = 0",
"0",
"b_rank",
"a, b = [int(w) for w in input().split()]",
"[int(w) for w in input().split()]",
"a",
"pass_num += 1",
"1",
"pass_num"
] | n, a, b = [int(w) for w in input().split()]
s = input()
n_li = [False] * n
pass_num = 0
b_rank = 0
for i, c in enumerate(s):
if c == "a":
if pass_num < a + b:
n_li[i] = True
pass_num += 1
elif c == "b":
b_rank += 1
if pass_num < a + b and b_rank <= b:
n_li[i] = True
pass_num += 1
for t in n_li:
print("Yes" if t else "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,
4,
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,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
95,
2
],
[
95,
11
],
[
95,
12
],
[
83,
14
],
[
80,
18
],
[
98,
20
],
[
84,
27
],
[
81,
34
],
[
102,
34
],
[
78,
34
],
[
87,
36
],
[
96,
37
],
[
77,
42
],
[
81,
54
],
[
102,
54
],
[
78,
54
],
[
87,
56
],
[
96,
57
],
[
99,
59
],
[
93,
59
],
[
96,
60
],
[
101,
65
],
[
92,
68
],
[
77,
78
],
[
80,
81
],
[
83,
84
],
[
95,
87
],
[
95,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
]
] | [
"N,A,B = map(int, input().split())\nS = input()\n\nC,D = 0,0\nfor i,c in enumerate(S):\n if c == 'a':\n if C < A+B:\n print(\"Yes\")\n C += 1\n else:\n print(\"No\")\n elif c == 'b':\n if C < A+B and D < B:\n print(\"Yes\")\n C += 1\n D += 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",
"C,D = 0,0",
"C",
"0",
"D",
"0",
"for i,c in enumerate(S):\n if c == 'a':\n if C < A+B:\n print(\"Yes\")\n C += 1\n else:\n print(\"No\")\n elif c == 'b':\n if C < A+B and D < B:\n print(\"Yes\")\n C += 1\n D += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"c",
"enumerate(S)",
"enumerate",
"S",
"if c == 'a':\n if C < A+B:\n print(\"Yes\")\n C += 1\n else:\n print(\"No\")\n elif c == 'b':\n if C < A+B and D < B:\n print(\"Yes\")\n C += 1\n D += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"c == 'a'",
"c",
"'a'",
"if C < A+B:\n print(\"Yes\")\n C += 1\n else:\n print(\"No\")\n ",
"C < A+B",
"C",
"A+B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"C += 1",
"C",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif c == 'b':\n if C < A+B and D < B:\n print(\"Yes\")\n C += 1\n D += 1\n else:\n print(\"No\")\n ",
"c == 'b'",
"c",
"'b'",
"if C < A+B and D < B:\n print(\"Yes\")\n C += 1\n D += 1\n else:\n print(\"No\")\n ",
"C < A+B and D < B",
"C < A+B",
"C",
"A+B",
"A",
"B",
"D < B",
"D",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"C += 1",
"C",
"1",
"D += 1",
"D",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"C += 1",
"1",
"C",
"C,D = 0,0",
"0",
"C",
"S = input()",
"input()",
"S",
"A,B = map(int, input().split())",
"map(int, input().split())",
"A",
"N,A,B = map(int, input().split())",
"map(int, input().split())",
"N",
"D += 1",
"1",
"D",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"D = 0,0",
"0",
"D",
"C += 1",
"1",
"C"
] | N,A,B = map(int, input().split())
S = input()
C,D = 0,0
for i,c in enumerate(S):
if c == 'a':
if C < A+B:
print("Yes")
C += 1
else:
print("No")
elif c == 'b':
if C < A+B and D < B:
print("Yes")
C += 1
D += 1
else:
print("No")
else:
print("No") |
[
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,
13,
14,
2,
13,
17,
4,
13,
17,
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,
13,
2,
13,
13,
14,
2,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
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
],
[
24,
23
],
[
27,
26
],
[
16,
26
],
[
26,
30
],
[
26,
37
],
[
20,
41
],
[
72,
41
],
[
49,
41
],
[
13,
43
],
[
14,
44
],
[
50,
49
],
[
26,
56
],
[
20,
60
],
[
72,
60
],
[
49,
60
],
[
13,
62
],
[
14,
63
],
[
23,
66
],
[
75,
66
],
[
14,
67
],
[
73,
72
],
[
76,
75
],
[
94,
91
]
] | [
"#!/usr/bin/env python3\n\n\ndef main():\n n, a, b = map(int,input().split())\n s = input()\n sanka = 0\n sankaigai = 0\n\n for hito in s:\n if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\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 sanka = 0\n sankaigai = 0\n\n for hito in s:\n if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\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",
"sanka = 0",
"sanka",
"0",
"sankaigai = 0",
"sankaigai",
"0",
"for hito in s:\n if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n print(\"No\")",
"hito",
"s",
"if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n print(\"No\")",
"hito is \"c\"",
"hito",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n ",
"hito is \"a\"",
"hito",
"\"a\"",
"if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n ",
"sanka < a+b",
"sanka",
"a+b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"sanka+=1",
"sanka",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n ",
"hito is \"b\"",
"hito",
"\"b\"",
"if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n ",
"sanka < a+b",
"sanka",
"a+b",
"a",
"b",
"if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n ",
"sankaigai < b",
"sankaigai",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"sanka+=1",
"sanka",
"1",
"sankaigai+=1",
"sankaigai",
"1",
"print(\"No\")",
"print",
"\"No\"",
"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 sanka = 0\n sankaigai = 0\n\n for hito in s:\n if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n print(\"No\")",
"def main():\n n, a, b = map(int,input().split())\n s = input()\n sanka = 0\n sankaigai = 0\n\n for hito in s:\n if hito is \"c\":\n print(\"No\")\n elif hito is \"a\":\n if sanka < a+b:\n print(\"Yes\")\n sanka+=1\n else:\n print(\"No\")\n elif hito is \"b\":\n if sanka < a+b:\n if sankaigai < b:\n print(\"Yes\")\n sanka+=1\n sankaigai+=1\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n print(\"No\")",
"main"
] | #!/usr/bin/env python3
def main():
n, a, b = map(int,input().split())
s = input()
sanka = 0
sankaigai = 0
for hito in s:
if hito is "c":
print("No")
elif hito is "a":
if sanka < a+b:
print("Yes")
sanka+=1
else:
print("No")
elif hito is "b":
if sanka < a+b:
if sankaigai < b:
print("Yes")
sanka+=1
sankaigai+=1
else:
print("No")
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,
4,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
13,
0,
13,
17,
4,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
2,
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,
10,
4,
13
] | [
[
102,
2
],
[
102,
11
],
[
102,
12
],
[
75,
14
],
[
105,
18
],
[
76,
21
],
[
78,
23
],
[
103,
25
],
[
82,
26
],
[
93,
28
],
[
87,
31
],
[
35,
34
],
[
106,
34
],
[
76,
34
],
[
34,
39
],
[
94,
42
],
[
97,
42
],
[
100,
42
],
[
79,
43
],
[
99,
45
],
[
34,
54
],
[
94,
57
],
[
97,
57
],
[
100,
57
],
[
79,
58
],
[
88,
60
],
[
91,
60
],
[
82,
61
],
[
96,
63
],
[
90,
66
],
[
75,
76
],
[
78,
79
],
[
102,
82
],
[
102,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"#B - Qualification simulator\nN,A,B = map(int,input().split())\nS = input()\nS = list(S)\n\ncapacity = A + B\ncandidate = 0\noverseas = 0\nfor i in S:\n if i == 'a' and candidate < capacity:\n candidate += 1\n print('Yes')\n elif i == 'b' and candidate < capacity and overseas < B:\n candidate += 1\n overseas += 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",
"S = list(S)",
"S",
"list(S)",
"list",
"S",
"capacity = A + B",
"capacity",
"A + B",
"A",
"B",
"candidate = 0",
"candidate",
"0",
"overseas = 0",
"overseas",
"0",
"for i in S:\n if i == 'a' and candidate < capacity:\n candidate += 1\n print('Yes')\n elif i == 'b' and candidate < capacity and overseas < B:\n candidate += 1\n overseas += 1\n print('Yes')\n else :\n print('No')",
"i",
"S",
"if i == 'a' and candidate < capacity:\n candidate += 1\n print('Yes')\n elif i == 'b' and candidate < capacity and overseas < B:\n candidate += 1\n overseas += 1\n print('Yes')\n else :\n print('No')",
"i == 'a' and candidate < capacity",
"i == 'a'",
"i",
"'a'",
"candidate < capacity",
"candidate",
"capacity",
"candidate += 1",
"candidate",
"1",
"print('Yes')",
"print",
"'Yes'",
"elif i == 'b' and candidate < capacity and overseas < B:\n candidate += 1\n overseas += 1\n print('Yes')\n ",
"i == 'b' and candidate < capacity and overseas < B",
"i == 'b' and candidate < capacity",
"i == 'b'",
"i",
"'b'",
"candidate < capacity",
"candidate",
"capacity",
"overseas < B",
"overseas",
"B",
"candidate += 1",
"candidate",
"1",
"overseas += 1",
"overseas",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"S = input()",
"input()",
"S",
"capacity = A + B",
"A + B",
"capacity",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N",
"overseas = 0",
"0",
"overseas",
"overseas += 1",
"1",
"overseas",
"candidate = 0",
"0",
"candidate",
"candidate += 1",
"1",
"candidate",
"candidate += 1",
"1",
"candidate",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"S = list(S)",
"list(S)",
"S"
] | #B - Qualification simulator
N,A,B = map(int,input().split())
S = input()
S = list(S)
capacity = A + B
candidate = 0
overseas = 0
for i in S:
if i == 'a' and candidate < capacity:
candidate += 1
print('Yes')
elif i == 'b' and candidate < capacity and overseas < B:
candidate += 1
overseas += 1
print('Yes')
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,
0,
13,
17,
0,
13,
17,
28,
13,
13,
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,
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,
2,
13,
10,
13,
13,
10,
4,
13
] | [
[
111,
2
],
[
111,
11
],
[
111,
12
],
[
84,
14
],
[
105,
20
],
[
82,
22
],
[
94,
23
],
[
108,
25
],
[
94,
26
],
[
87,
28
],
[
96,
31
],
[
35,
34
],
[
85,
34
],
[
34,
38
],
[
88,
42
],
[
100,
42
],
[
91,
42
],
[
106,
43
],
[
90,
48
],
[
34,
55
],
[
88,
60
],
[
100,
60
],
[
91,
60
],
[
106,
61
],
[
97,
63
],
[
103,
63
],
[
109,
64
],
[
99,
69
],
[
102,
72
],
[
111,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
111,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
],
[
94,
108
],
[
108,
109
],
[
111,
112
]
] | [
"# -*- coding:utf-8 -*-\nn,a,b = map(int,input().split())\nmember_list = list(input())\n\nthr_dom = a+b\nthr_nat = b\npass_num = 0\npass_nat = 0\n\nfor member in member_list:\n if member == 'a':\n if pass_num < thr_dom:\n print(\"Yes\")\n pass_num += 1\n else:\n print(\"No\")\n elif member == \"b\":\n if pass_num < thr_dom and pass_nat < thr_nat:\n print(\"Yes\")\n pass_num += 1\n pass_nat += 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",
"member_list = list(input())",
"member_list",
"list(input())",
"list",
"input()",
"input",
"thr_dom = a+b",
"thr_dom",
"a+b",
"a",
"b",
"thr_nat = b",
"thr_nat",
"b",
"pass_num = 0",
"pass_num",
"0",
"pass_nat = 0",
"pass_nat",
"0",
"for member in member_list:\n if member == 'a':\n if pass_num < thr_dom:\n print(\"Yes\")\n pass_num += 1\n else:\n print(\"No\")\n elif member == \"b\":\n if pass_num < thr_dom and pass_nat < thr_nat:\n print(\"Yes\")\n pass_num += 1\n pass_nat += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"member",
"member_list",
"if member == 'a':\n if pass_num < thr_dom:\n print(\"Yes\")\n pass_num += 1\n else:\n print(\"No\")\n elif member == \"b\":\n if pass_num < thr_dom and pass_nat < thr_nat:\n print(\"Yes\")\n pass_num += 1\n pass_nat += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"member == 'a'",
"member",
"'a'",
"if pass_num < thr_dom:\n print(\"Yes\")\n pass_num += 1\n else:\n print(\"No\")\n ",
"pass_num < thr_dom",
"pass_num",
"thr_dom",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_num += 1",
"pass_num",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif member == \"b\":\n if pass_num < thr_dom and pass_nat < thr_nat:\n print(\"Yes\")\n pass_num += 1\n pass_nat += 1\n else:\n print(\"No\")\n ",
"member == \"b\"",
"member",
"\"b\"",
"if pass_num < thr_dom and pass_nat < thr_nat:\n print(\"Yes\")\n pass_num += 1\n pass_nat += 1\n else:\n print(\"No\")\n ",
"pass_num < thr_dom and pass_nat < thr_nat",
"pass_num < thr_dom",
"pass_num",
"thr_dom",
"pass_nat < thr_nat",
"pass_nat",
"thr_nat",
"print(\"Yes\")",
"print",
"\"Yes\"",
"pass_num += 1",
"pass_num",
"1",
"pass_nat += 1",
"pass_nat",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"member_list = list(input())",
"list(input())",
"member_list",
"pass_num = 0",
"0",
"pass_num",
"pass_num += 1",
"1",
"pass_num",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"pass_nat = 0",
"0",
"pass_nat",
"pass_num += 1",
"1",
"pass_num",
"pass_nat += 1",
"1",
"pass_nat",
"thr_dom = a+b",
"a+b",
"thr_dom",
"thr_nat = b",
"b",
"thr_nat",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n"
] | # -*- coding:utf-8 -*-
n,a,b = map(int,input().split())
member_list = list(input())
thr_dom = a+b
thr_nat = b
pass_num = 0
pass_nat = 0
for member in member_list:
if member == 'a':
if pass_num < thr_dom:
print("Yes")
pass_num += 1
else:
print("No")
elif member == "b":
if pass_num < thr_dom and pass_nat < thr_nat:
print("Yes")
pass_num += 1
pass_nat += 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,
13,
17,
28,
13,
4,
13,
13,
14,
2,
2,
13,
13,
2,
13,
13,
14,
2,
18,
13,
13,
17,
4,
13,
17,
0,
13,
17,
14,
2,
2,
18,
13,
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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
79,
2
],
[
79,
11
],
[
79,
12
],
[
82,
14
],
[
91,
18
],
[
88,
20
],
[
24,
23
],
[
71,
26
],
[
92,
30
],
[
77,
30
],
[
89,
31
],
[
86,
31
],
[
80,
33
],
[
74,
34
],
[
83,
38
],
[
23,
39
],
[
76,
45
],
[
83,
51
],
[
23,
52
],
[
89,
55
],
[
86,
55
],
[
74,
56
],
[
85,
61
],
[
79,
71
],
[
79,
74
],
[
76,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
]
] | [
"N,A,B=map(int,input().split())\nS=input()\n\na,b=0,0\nfor i in range(N):\n if a+b<A+B:\n if S[i]=='a':\n print('Yes')\n a += 1\n elif S[i]=='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,b=0,0",
"a",
"0",
"b",
"0",
"for i in range(N):\n if a+b<A+B:\n if S[i]=='a':\n print('Yes')\n a += 1\n elif S[i]=='b' and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n else:\n print('No')",
"i",
"range(N)",
"range",
"N",
"if a+b<A+B:\n if S[i]=='a':\n print('Yes')\n a += 1\n elif S[i]=='b' and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n else:\n print('No')",
"a+b<A+B",
"a+b",
"a",
"b",
"A+B",
"A",
"B",
"if S[i]=='a':\n print('Yes')\n a += 1\n elif S[i]=='b' and b < B:\n print('Yes')\n b += 1\n else:\n print('No')\n ",
"S[i]=='a'",
"S[i]",
"S",
"i",
"'a'",
"print('Yes')",
"print",
"'Yes'",
"a += 1",
"a",
"1",
"elif S[i]=='b' and b < B:\n print('Yes')\n b += 1\n ",
"S[i]=='b' and b < B",
"S[i]=='b'",
"S[i]",
"S",
"i",
"'b'",
"b < B",
"b",
"B",
"print('Yes')",
"print",
"'Yes'",
"b += 1",
"b",
"1",
"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",
"a += 1",
"1",
"a",
"A,B=map(int,input().split())",
"map(int,input().split())",
"A",
"S=input()",
"input()",
"S",
"b += 1",
"1",
"b",
"b=0,0",
"0",
"b",
"a,b=0,0",
"0",
"a"
] | N,A,B=map(int,input().split())
S=input()
a,b=0,0
for i in range(N):
if a+b<A+B:
if S[i]=='a':
print('Yes')
a += 1
elif S[i]=='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,
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,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
91,
2
],
[
91,
11
],
[
91,
12
],
[
73,
14
],
[
85,
18
],
[
88,
21
],
[
25,
24
],
[
74,
24
],
[
24,
29
],
[
86,
33
],
[
83,
33
],
[
89,
34
],
[
77,
34
],
[
80,
36
],
[
92,
37
],
[
82,
42
],
[
24,
48
],
[
86,
52
],
[
83,
52
],
[
89,
53
],
[
77,
53
],
[
80,
55
],
[
92,
56
],
[
89,
58
],
[
77,
58
],
[
92,
59
],
[
76,
64
],
[
91,
71
],
[
73,
74
],
[
76,
77
],
[
91,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
]
] | [
"n, a, b = map(int,input().split())\ns = input()\na_pass = 0\nb_pass = 0\n\nfor i in s:\n if i == 'a' and a_pass + b_pass < a + b:\n print('Yes')\n a_pass += 1\n elif i == 'b' and a_pass + b_pass < a + b and b_pass < b:\n print('Yes')\n b_pass += 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_pass = 0",
"a_pass",
"0",
"b_pass = 0",
"b_pass",
"0",
"for i in s:\n if i == 'a' and a_pass + b_pass < a + b:\n print('Yes')\n a_pass += 1\n elif i == 'b' and a_pass + b_pass < a + b and b_pass < b:\n print('Yes')\n b_pass += 1\n else:\n print('No')",
"i",
"s",
"if i == 'a' and a_pass + b_pass < a + b:\n print('Yes')\n a_pass += 1\n elif i == 'b' and a_pass + b_pass < a + b and b_pass < b:\n print('Yes')\n b_pass += 1\n else:\n print('No')",
"i == 'a' and a_pass + b_pass < a + b",
"i == 'a'",
"i",
"'a'",
"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",
"elif i == 'b' and a_pass + b_pass < a + b and b_pass < b:\n print('Yes')\n b_pass += 1\n ",
"i == 'b' and a_pass + b_pass < a + b and b_pass < b",
"i == 'b' and a_pass + b_pass < a + b",
"i == 'b'",
"i",
"'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'",
"n, a, b = map(int,input().split())",
"map(int,input().split())",
"n",
"s = input()",
"input()",
"s",
"b_pass += 1",
"1",
"b_pass",
"a, b = map(int,input().split())",
"map(int,input().split())",
"a",
"a_pass += 1",
"1",
"a_pass",
"a_pass = 0",
"0",
"a_pass",
"b_pass = 0",
"0",
"b_pass",
"b = map(int,input().split())",
"map(int,input().split())",
"b"
] | n, a, b = map(int,input().split())
s = input()
a_pass = 0
b_pass = 0
for i in s:
if i == 'a' and a_pass + b_pass < a + b:
print('Yes')
a_pass += 1
elif i == 'b' and a_pass + b_pass < a + b and b_pass < b:
print('Yes')
b_pass += 1
else:
print('No') |
[
7,
17,
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,
2,
13,
13,
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,
14,
2,
13,
13,
0,
13,
17,
4,
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,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
100,
3
],
[
100,
12
],
[
100,
13
],
[
103,
15
],
[
109,
21
],
[
106,
24
],
[
28,
27
],
[
95,
30
],
[
104,
34
],
[
27,
35
],
[
110,
40
],
[
92,
40
],
[
107,
41
],
[
98,
41
],
[
89,
43
],
[
101,
44
],
[
91,
46
],
[
104,
57
],
[
27,
58
],
[
110,
63
],
[
92,
63
],
[
107,
64
],
[
98,
64
],
[
89,
66
],
[
101,
67
],
[
107,
70
],
[
98,
70
],
[
101,
71
],
[
97,
73
],
[
100,
89
],
[
91,
92
],
[
100,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
]
] | [
"\"\"\"Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py\"\"\"\nN, A, B = map(int, input().split())\nS = str(input())\n\nRANK_a = 0\nRANK_b = 0\n\nfor i in range(N):\n if S[i] == \"a\":\n if RANK_a+RANK_b < A+B:\n RANK_a += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n\n if RANK_a+RANK_b < A+B:\n if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n \n print(\"No\")",
"\"\"\"Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py\"\"\"",
"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",
"RANK_a = 0",
"RANK_a",
"0",
"RANK_b = 0",
"RANK_b",
"0",
"for i in range(N):\n if S[i] == \"a\":\n if RANK_a+RANK_b < A+B:\n RANK_a += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n\n if RANK_a+RANK_b < A+B:\n if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n \n print(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\":\n if RANK_a+RANK_b < A+B:\n RANK_a += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[i] == \"b\":\n\n if RANK_a+RANK_b < A+B:\n if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n else:\n \n print(\"No\")",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"if RANK_a+RANK_b < A+B:\n RANK_a += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"RANK_a+RANK_b < A+B",
"RANK_a+RANK_b",
"RANK_a",
"RANK_b",
"A+B",
"A",
"B",
"RANK_a += 1",
"RANK_a",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == \"b\":\n\n if RANK_a+RANK_b < A+B:\n if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n ",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"if RANK_a+RANK_b < A+B:\n if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n else:\n print(\"No\")\n ",
"RANK_a+RANK_b < A+B",
"RANK_a+RANK_b",
"RANK_a",
"RANK_b",
"A+B",
"A",
"B",
"if RANK_b < B:\n RANK_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"RANK_b < B",
"RANK_b",
"B",
"RANK_b += 1",
"RANK_b",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"RANK_a += 1",
"1",
"RANK_a",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"RANK_b += 1",
"1",
"RANK_b",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"S = str(input())",
"str(input())",
"S",
"RANK_b = 0",
"0",
"RANK_b",
"RANK_a = 0",
"0",
"RANK_a"
] | """Boot-camp-for-Beginners_Easy003_B_Qualification-simulator_19-August-2020.py"""
N, A, B = map(int, input().split())
S = str(input())
RANK_a = 0
RANK_b = 0
for i in range(N):
if S[i] == "a":
if RANK_a+RANK_b < A+B:
RANK_a += 1
print("Yes")
else:
print("No")
elif S[i] == "b":
if RANK_a+RANK_b < A+B:
if RANK_b < B:
RANK_b += 1
print("Yes")
else:
print("No")
else:
print("No")
else:
print("No")
|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
39,
0,
13,
4,
13,
28,
13,
4,
13,
13,
4,
18,
13,
13,
18,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
39,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
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,
13,
2,
13,
13,
2,
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,
17,
13,
10,
17,
13,
10,
39,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
39,
13,
10,
17,
13,
10,
4,
13
] | [
[
149,
2
],
[
149,
11
],
[
149,
12
],
[
143,
14
],
[
134,
17
],
[
22,
21
],
[
150,
24
],
[
144,
27
],
[
135,
30
],
[
21,
31
],
[
122,
33
],
[
146,
36
],
[
128,
39
],
[
43,
42
],
[
150,
45
],
[
144,
49
],
[
42,
50
],
[
123,
54
],
[
132,
54
],
[
126,
54
],
[
120,
56
],
[
138,
57
],
[
129,
60
],
[
125,
64
],
[
129,
68
],
[
144,
74
],
[
42,
75
],
[
123,
80
],
[
132,
80
],
[
126,
80
],
[
120,
82
],
[
138,
83
],
[
147,
85
],
[
141,
85
],
[
138,
86
],
[
129,
89
],
[
131,
93
],
[
140,
96
],
[
129,
100
],
[
129,
105
],
[
110,
109
],
[
150,
112
],
[
129,
116
],
[
109,
117
],
[
149,
120
],
[
122,
123
],
[
125,
126
],
[
128,
129
],
[
131,
132
],
[
134,
135
],
[
149,
138
],
[
140,
141
],
[
143,
144
],
[
146,
147
],
[
149,
150
]
] | [
"n,a,b = map(int,input().split())\ns=[]\ns_in = input()\nfor i in range(n):\n s.append(s_in[i])\npass_all = 0\npass_kaigai = 0\njudge=[]\nfor i in range(n):\n if s[i] == \"a\":\n if pass_all < a + b:\n judge.append(\"Yes\")\n pass_all += 1\n else:\n judge.append(\"No\")\n elif s[i] == \"b\":\n if pass_all < a+b and pass_kaigai < b:\n judge.append(\"Yes\")\n pass_all += 1\n pass_kaigai += 1\n else:\n judge.append(\"No\")\n else:\n judge.append(\"No\")\nfor i in range(n):\n print(judge[i])",
"n,a,b = map(int,input().split())",
"n",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"a",
"b",
"s=[]",
"s",
"[]",
"s_in = input()",
"s_in",
"input()",
"input",
"for i in range(n):\n s.append(s_in[i])",
"i",
"range(n)",
"range",
"n",
"s.append(s_in[i])",
"s.append",
"s",
"append",
"s_in[i]",
"s_in",
"i",
"pass_all = 0",
"pass_all",
"0",
"pass_kaigai = 0",
"pass_kaigai",
"0",
"judge=[]",
"judge",
"[]",
"for i in range(n):\n if s[i] == \"a\":\n if pass_all < a + b:\n judge.append(\"Yes\")\n pass_all += 1\n else:\n judge.append(\"No\")\n elif s[i] == \"b\":\n if pass_all < a+b and pass_kaigai < b:\n judge.append(\"Yes\")\n pass_all += 1\n pass_kaigai += 1\n else:\n judge.append(\"No\")\n else:\n judge.append(\"No\")",
"i",
"range(n)",
"range",
"n",
"if s[i] == \"a\":\n if pass_all < a + b:\n judge.append(\"Yes\")\n pass_all += 1\n else:\n judge.append(\"No\")\n elif s[i] == \"b\":\n if pass_all < a+b and pass_kaigai < b:\n judge.append(\"Yes\")\n pass_all += 1\n pass_kaigai += 1\n else:\n judge.append(\"No\")\n else:\n judge.append(\"No\")",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"if pass_all < a + b:\n judge.append(\"Yes\")\n pass_all += 1\n else:\n judge.append(\"No\")\n ",
"pass_all < a + b",
"pass_all",
"a + b",
"a",
"b",
"judge.append(\"Yes\")",
"judge.append",
"judge",
"append",
"\"Yes\"",
"pass_all += 1",
"pass_all",
"1",
"judge.append(\"No\")",
"judge.append",
"judge",
"append",
"\"No\"",
"elif s[i] == \"b\":\n if pass_all < a+b and pass_kaigai < b:\n judge.append(\"Yes\")\n pass_all += 1\n pass_kaigai += 1\n else:\n judge.append(\"No\")\n ",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"if pass_all < a+b and pass_kaigai < b:\n judge.append(\"Yes\")\n pass_all += 1\n pass_kaigai += 1\n else:\n judge.append(\"No\")\n ",
"pass_all < a+b and pass_kaigai < b",
"pass_all < a+b",
"pass_all",
"a+b",
"a",
"b",
"pass_kaigai < b",
"pass_kaigai",
"b",
"judge.append(\"Yes\")",
"judge.append",
"judge",
"append",
"\"Yes\"",
"pass_all += 1",
"pass_all",
"1",
"pass_kaigai += 1",
"pass_kaigai",
"1",
"judge.append(\"No\")",
"judge.append",
"judge",
"append",
"\"No\"",
"judge.append(\"No\")",
"judge.append",
"judge",
"append",
"\"No\"",
"for i in range(n):\n print(judge[i])",
"i",
"range(n)",
"range",
"n",
"print(judge[i])",
"print",
"judge[i]",
"judge",
"i",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"pass_all = 0",
"0",
"pass_all",
"pass_all += 1",
"1",
"pass_all",
"judge=[]",
"[]",
"judge",
"pass_all += 1",
"1",
"pass_all",
"s_in = input()",
"input()",
"s_in",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"pass_kaigai += 1",
"1",
"pass_kaigai",
"s=[]",
"[]",
"s",
"pass_kaigai = 0",
"0",
"pass_kaigai",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n"
] | n,a,b = map(int,input().split())
s=[]
s_in = input()
for i in range(n):
s.append(s_in[i])
pass_all = 0
pass_kaigai = 0
judge=[]
for i in range(n):
if s[i] == "a":
if pass_all < a + b:
judge.append("Yes")
pass_all += 1
else:
judge.append("No")
elif s[i] == "b":
if pass_all < a+b and pass_kaigai < b:
judge.append("Yes")
pass_all += 1
pass_kaigai += 1
else:
judge.append("No")
else:
judge.append("No")
for i in range(n):
print(judge[i])
|
[
7,
12,
13,
12,
13,
0,
13,
2,
2,
17,
17,
17,
12,
13,
0,
13,
4,
13,
13,
13,
0,
13,
4,
13,
0,
13,
39,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
2,
13,
13,
17,
4,
13,
17,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
2,
2,
13,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13,
10,
12,
13,
10,
2,
13,
10,
12,
13
] | [
[
105,
6
],
[
16,
15
],
[
103,
17
],
[
16,
18
],
[
16,
19
],
[
22,
21
],
[
26,
25
],
[
29,
28
],
[
15,
31
],
[
21,
35
],
[
28,
36
],
[
18,
41
],
[
52,
41
],
[
19,
42
],
[
87,
42
],
[
55,
42
],
[
18,
49
],
[
52,
49
],
[
53,
52
],
[
56,
55
],
[
21,
63
],
[
28,
64
],
[
18,
70
],
[
52,
70
],
[
19,
71
],
[
87,
71
],
[
55,
71
],
[
19,
74
],
[
87,
74
],
[
55,
74
],
[
55,
84
],
[
19,
84
],
[
87,
84
],
[
88,
87
],
[
109,
97
],
[
105,
106
]
] | [
"def LI(): return list(map(int, input().split()))\ndef I(): return map(int, input().split())\n\n\nmod = 10**9 + 7\n\n\ndef main():\n n, a, b = I()\n s = input()\n yn = []\n for i in range(n):\n if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')\n\n\nif __name__ == '__main__':\n main()",
"def LI(): return list(map(int, input().split()))",
"LI",
"def I(): return map(int, input().split())",
"I",
"mod = 10**9 + 7",
"mod",
"10**9 + 7",
"10**9",
"10",
"9",
"7",
"def main():\n n, a, b = I()\n s = input()\n yn = []\n for i in range(n):\n if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')",
"main",
"n, a, b = I()",
"n",
"I()",
"I",
"a",
"b",
"s = input()",
"s",
"input()",
"input",
"yn = []",
"yn",
"[]",
"for i in range(n):\n if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')",
"s[i] == 'a'",
"s[i]",
"s",
"i",
"'a'",
"if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n ",
"a + b > 0",
"a + b",
"a",
"b",
"0",
"print('Yes')",
"print",
"'Yes'",
"if a > 0:\n a -= 1\n else:\n b -= 1\n ",
"a > 0",
"a",
"0",
"a -= 1",
"a",
"1",
"b -= 1",
"b",
"1",
"print('No')",
"print",
"'No'",
"elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n ",
"s[i] == 'b'",
"s[i]",
"s",
"i",
"'b'",
"if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n ",
"a + b > 0 and b > 0",
"a + b > 0",
"a + b",
"a",
"b",
"0",
"b > 0",
"b",
"0",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"if b > 0:\n b -= 1\n ",
"b > 0",
"b",
"0",
"b -= 1",
"b",
"1",
"print('No')",
"print",
"'No'",
"if __name__ == '__main__':\n main()",
"__name__ == '__main__'",
"__name__",
"'__main__'",
"main()",
"main",
"def LI(): return list(map(int, input().split()))",
"def LI(): return list(map(int, input().split()))",
"LI",
"def I(): return map(int, input().split())",
"def I(): return map(int, input().split())",
"I",
"mod = 10**9 + 7",
"10**9 + 7",
"mod",
"def main():\n n, a, b = I()\n s = input()\n yn = []\n for i in range(n):\n if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')",
"def main():\n n, a, b = I()\n s = input()\n yn = []\n for i in range(n):\n if s[i] == 'a':\n if a + b > 0:\n print('Yes')\n if a > 0:\n a -= 1\n else:\n b -= 1\n else:\n print('No')\n elif s[i] == 'b':\n if a + b > 0 and b > 0:\n print('Yes')\n else:\n print('No')\n if b > 0:\n b -= 1\n else:\n print('No')",
"main"
] | def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7
def main():
n, a, b = I()
s = input()
yn = []
for i in range(n):
if s[i] == 'a':
if a + b > 0:
print('Yes')
if a > 0:
a -= 1
else:
b -= 1
else:
print('No')
elif s[i] == 'b':
if a + b > 0 and b > 0:
print('Yes')
else:
print('No')
if b > 0:
b -= 1
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,
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,
14,
2,
13,
17,
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
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
84,
14
],
[
90,
20
],
[
93,
23
],
[
27,
26
],
[
85,
26
],
[
26,
30
],
[
91,
34
],
[
97,
34
],
[
100,
34
],
[
82,
36
],
[
106,
37
],
[
99,
39
],
[
26,
49
],
[
91,
54
],
[
97,
54
],
[
100,
54
],
[
82,
56
],
[
106,
57
],
[
94,
59
],
[
88,
59
],
[
106,
60
],
[
96,
62
],
[
87,
65
],
[
26,
75
],
[
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 = list(input())\n\nyes_num = 0\ngai = 0\n\nfor i in s:\n if i == \"a\":\n if yes_num < a + b:\n yes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif i == \"b\":\n if yes_num < a+b and gai < b:\n yes_num += 1\n gai += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif 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 = list(input())",
"s",
"list(input())",
"list",
"input()",
"input",
"yes_num = 0",
"yes_num",
"0",
"gai = 0",
"gai",
"0",
"for i in s:\n if i == \"a\":\n if yes_num < a + b:\n yes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif i == \"b\":\n if yes_num < a+b and gai < b:\n yes_num += 1\n gai += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif i == \"c\":\n print(\"No\")",
"i",
"s",
"if i == \"a\":\n if yes_num < a + b:\n yes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif i == \"b\":\n if yes_num < a+b and gai < b:\n yes_num += 1\n gai += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n elif i == \"c\":\n print(\"No\")",
"i == \"a\"",
"i",
"\"a\"",
"if yes_num < a + b:\n yes_num += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"yes_num < a + b",
"yes_num",
"a + b",
"a",
"b",
"yes_num += 1",
"yes_num",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif i == \"b\":\n if yes_num < a+b and gai < b:\n yes_num += 1\n gai += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"i == \"b\"",
"i",
"\"b\"",
"if yes_num < a+b and gai < b:\n yes_num += 1\n gai += 1\n print(\"Yes\")\n else:\n print(\"No\")\n \n ",
"yes_num < a+b and gai < b",
"yes_num < a+b",
"yes_num",
"a+b",
"a",
"b",
"gai < b",
"gai",
"b",
"yes_num += 1",
"yes_num",
"1",
"gai += 1",
"gai",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif i == \"c\":\n print(\"No\")",
"i == \"c\"",
"i",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"a,b = map(int,input().split())",
"map(int,input().split())",
"a",
"s = list(input())",
"list(input())",
"s",
"gai += 1",
"1",
"gai",
"yes_num = 0",
"0",
"yes_num",
"gai = 0",
"0",
"gai",
"yes_num += 1",
"1",
"yes_num",
"yes_num += 1",
"1",
"yes_num",
"n,a,b = map(int,input().split())",
"map(int,input().split())",
"n",
"b = map(int,input().split())",
"map(int,input().split())",
"b"
] | n,a,b = map(int,input().split())
s = list(input())
yes_num = 0
gai = 0
for i in s:
if i == "a":
if yes_num < a + b:
yes_num += 1
print("Yes")
else:
print("No")
elif i == "b":
if yes_num < a+b and gai < b:
yes_num += 1
gai += 1
print("Yes")
else:
print("No")
elif 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,
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,
0,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
4,
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
87,
2
],
[
87,
11
],
[
87,
12
],
[
96,
14
],
[
99,
18
],
[
102,
21
],
[
25,
24
],
[
88,
27
],
[
97,
31
],
[
24,
32
],
[
100,
36
],
[
94,
36
],
[
91,
36
],
[
82,
38
],
[
85,
39
],
[
90,
44
],
[
97,
52
],
[
24,
53
],
[
105,
56
],
[
100,
61
],
[
94,
61
],
[
91,
61
],
[
82,
63
],
[
85,
64
],
[
106,
66
],
[
103,
66
],
[
85,
67
],
[
93,
72
],
[
87,
82
],
[
87,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
]
] | [
"#3\nN,A,B = map(int,input().split())\nS = input()\ncou = 0\ncoub = 0\n\nfor i in range(N):\n if S[i] == \"a\":\n if cou < (A+B):\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n coub += 1\n if cou < (A+B) and coub <= B:\n print(\"Yes\")\n cou += 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",
"cou = 0",
"cou",
"0",
"coub = 0",
"coub",
"0",
"for i in range(N):\n if S[i] == \"a\":\n if cou < (A+B):\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n coub += 1\n if cou < (A+B) and coub <= B:\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(N)",
"range",
"N",
"if S[i] == \"a\":\n if cou < (A+B):\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n elif S[i] == \"b\":\n coub += 1\n if cou < (A+B) and coub <= B:\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"if cou < (A+B):\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n ",
"cou < (A+B)",
"cou",
"A+B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cou += 1",
"cou",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif S[i] == \"b\":\n coub += 1\n if cou < (A+B) and coub <= B:\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n ",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"coub += 1",
"coub",
"1",
"if cou < (A+B) and coub <= B:\n print(\"Yes\")\n cou += 1\n else:\n print(\"No\")\n ",
"cou < (A+B) and coub <= B",
"cou < (A+B)",
"cou",
"A+B",
"A",
"B",
"coub <= B",
"coub",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"cou += 1",
"cou",
"1",
"print(\"No\")",
"print",
"\"No\"",
"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",
"cou += 1",
"1",
"cou",
"cou += 1",
"1",
"cou",
"S = input()",
"input()",
"S",
"cou = 0",
"0",
"cou",
"coub = 0",
"0",
"coub",
"coub += 1",
"1",
"coub"
] | #3
N,A,B = map(int,input().split())
S = input()
cou = 0
coub = 0
for i in range(N):
if S[i] == "a":
if cou < (A+B):
print("Yes")
cou += 1
else:
print("No")
elif S[i] == "b":
coub += 1
if cou < (A+B) and coub <= B:
print("Yes")
cou += 1
else:
print("No")
else:
print("No")
|
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
17,
13,
13,
0,
13,
4,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
4,
13,
13,
14,
40,
13,
2,
13,
13,
28,
13,
4,
13,
2,
13,
13,
4,
13,
17,
29,
17,
14,
2,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
2,
13,
17,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
29,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
14
],
[
5,
15
],
[
18,
17
],
[
24,
23
],
[
27,
26
],
[
17,
33
],
[
23,
36
],
[
71,
36
],
[
57,
36
],
[
14,
38
],
[
15,
39
],
[
42,
41
],
[
4,
45
],
[
58,
57
],
[
26,
68
],
[
74,
68
],
[
15,
69
],
[
72,
71
],
[
75,
74
],
[
92,
89
]
] | [
"def resolve():\n N, A, B= map(int, input().split(\" \"))\n S = list(input())\n\n sum_of_successful_candidate = 0\n sum_of_successful_b = 0\n\n for i, s in enumerate(S):\n if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n return True\n\n\nif __name__ == \"__main__\":\n resolve()",
"def resolve():\n N, A, B= map(int, input().split(\" \"))\n S = list(input())\n\n sum_of_successful_candidate = 0\n sum_of_successful_b = 0\n\n for i, s in enumerate(S):\n if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n return True",
"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",
"sum_of_successful_candidate = 0",
"sum_of_successful_candidate",
"0",
"sum_of_successful_b = 0",
"sum_of_successful_b",
"0",
"for i, s in enumerate(S):\n if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n ",
"i",
"s",
"enumerate(S)",
"enumerate",
"S",
"if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n ",
"sum_of_successful_candidate >= A + B",
"sum_of_successful_candidate",
"A + B",
"A",
"B",
"for _ in range(N-i):\n print(\"No\")\n ",
"_",
"range(N-i)",
"range",
"N-i",
"N",
"i",
"print(\"No\")",
"print",
"\"No\"",
"return True",
"True",
"if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n ",
"s == \"a\"",
"s",
"\"a\"",
"sum_of_successful_candidate += 1",
"sum_of_successful_candidate",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n ",
"s == \"b\" and sum_of_successful_b < B",
"s == \"b\"",
"s",
"\"b\"",
"sum_of_successful_b < B",
"sum_of_successful_b",
"B",
"sum_of_successful_candidate += 1",
"sum_of_successful_candidate",
"1",
"sum_of_successful_b += 1",
"sum_of_successful_b",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"return True",
"True",
"if __name__ == \"__main__\":\n resolve()",
"__name__ == \"__main__\"",
"__name__",
"\"__main__\"",
"resolve()",
"resolve",
"def resolve():\n N, A, B= map(int, input().split(\" \"))\n S = list(input())\n\n sum_of_successful_candidate = 0\n sum_of_successful_b = 0\n\n for i, s in enumerate(S):\n if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n return True",
"def resolve():\n N, A, B= map(int, input().split(\" \"))\n S = list(input())\n\n sum_of_successful_candidate = 0\n sum_of_successful_b = 0\n\n for i, s in enumerate(S):\n if sum_of_successful_candidate >= A + B:\n for _ in range(N-i):\n print(\"No\")\n return True\n\n if s == \"a\":\n sum_of_successful_candidate += 1\n print(\"Yes\")\n elif s == \"b\" and sum_of_successful_b < B:\n sum_of_successful_candidate += 1\n sum_of_successful_b += 1\n print(\"Yes\")\n else:\n print(\"No\")\n\n return True",
"resolve"
] | def resolve():
N, A, B= map(int, input().split(" "))
S = list(input())
sum_of_successful_candidate = 0
sum_of_successful_b = 0
for i, s in enumerate(S):
if sum_of_successful_candidate >= A + B:
for _ in range(N-i):
print("No")
return True
if s == "a":
sum_of_successful_candidate += 1
print("Yes")
elif s == "b" and sum_of_successful_b < B:
sum_of_successful_candidate += 1
sum_of_successful_b += 1
print("Yes")
else:
print("No")
return True
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,
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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
90,
2
],
[
90,
11
],
[
90,
12
],
[
75,
14
],
[
84,
18
],
[
99,
21
],
[
25,
24
],
[
91,
27
],
[
76,
32
],
[
24,
33
],
[
85,
36
],
[
88,
36
],
[
94,
36
],
[
79,
38
],
[
82,
39
],
[
93,
44
],
[
76,
51
],
[
24,
52
],
[
85,
55
],
[
88,
55
],
[
94,
55
],
[
79,
57
],
[
82,
58
],
[
100,
60
],
[
97,
60
],
[
82,
61
],
[
87,
66
],
[
96,
69
],
[
75,
76
],
[
90,
79
],
[
90,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
]
] | [
"n, a, b = map(int, input().split())\ns = input()\ncount = 0\nfs = 0\nfor i in range(n):\n if s[i] == 'a' and count < a + b:\n print('Yes')\n count += 1\n elif s[i] == 'b' and count < a + b and fs < b:\n print('Yes')\n count += 1\n fs += 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",
"count = 0",
"count",
"0",
"fs = 0",
"fs",
"0",
"for i in range(n):\n if s[i] == 'a' and count < a + b:\n print('Yes')\n count += 1\n elif s[i] == 'b' and count < a + b and fs < b:\n print('Yes')\n count += 1\n fs += 1\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"if s[i] == 'a' and count < a + b:\n print('Yes')\n count += 1\n elif s[i] == 'b' and count < a + b and fs < b:\n print('Yes')\n count += 1\n fs += 1\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",
"print('Yes')",
"print",
"'Yes'",
"count += 1",
"count",
"1",
"elif s[i] == 'b' and count < a + b and fs < b:\n print('Yes')\n count += 1\n fs += 1\n ",
"s[i] == 'b' and count < a + b and fs < b",
"s[i] == 'b' and count < a + b",
"s[i] == 'b'",
"s[i]",
"s",
"i",
"'b'",
"count < a + b",
"count",
"a + b",
"a",
"b",
"fs < b",
"fs",
"b",
"print('Yes')",
"print",
"'Yes'",
"count += 1",
"count",
"1",
"fs += 1",
"fs",
"1",
"print('No')",
"print",
"'No'",
"s = input()",
"input()",
"s",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"count = 0",
"0",
"count",
"count += 1",
"1",
"count",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"count += 1",
"1",
"count",
"fs += 1",
"1",
"fs",
"fs = 0",
"0",
"fs"
] | n, a, b = map(int, input().split())
s = input()
count = 0
fs = 0
for i in range(n):
if s[i] == 'a' and count < a + b:
print('Yes')
count += 1
elif s[i] == 'b' and count < a + b and fs < b:
print('Yes')
count += 1
fs += 1
else:
print('No') |
[
7,
15,
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,
13,
4,
18,
4,
18,
13,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
13,
28,
13,
4,
13,
13,
14,
2,
2,
13,
13,
2,
18,
13,
13,
17,
4,
13,
17,
0,
13,
17,
14,
2,
2,
2,
13,
13,
2,
13,
13,
2,
18,
13,
13,
17,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
14,
40,
13,
13,
0,
13,
2,
13,
17,
3,
14,
40,
13,
17,
28,
13,
4,
13,
2,
13,
13,
4,
13,
17,
10,
17,
13,
10,
2,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
13,
13,
10,
13,
13,
10,
17,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13
] | [
[
6,
5
],
[
5,
19
],
[
147,
21
],
[
147,
23
],
[
147,
24
],
[
129,
26
],
[
123,
37
],
[
148,
39
],
[
142,
40
],
[
135,
42
],
[
135,
45
],
[
135,
47
],
[
50,
49
],
[
139,
52
],
[
136,
56
],
[
154,
56
],
[
151,
56
],
[
124,
57
],
[
130,
60
],
[
49,
61
],
[
150,
67
],
[
136,
73
],
[
154,
73
],
[
151,
73
],
[
124,
74
],
[
121,
76
],
[
145,
76
],
[
142,
77
],
[
130,
80
],
[
49,
81
],
[
153,
87
],
[
144,
90
],
[
154,
97
],
[
151,
97
],
[
136,
97
],
[
124,
98
],
[
132,
100
],
[
49,
102
],
[
133,
107
],
[
127,
107
],
[
111,
110
],
[
139,
114
],
[
133,
115
],
[
127,
115
],
[
135,
121
],
[
123,
124
],
[
135,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
],
[
147,
139
],
[
147,
142
],
[
144,
145
],
[
147,
148
],
[
150,
151
],
[
153,
154
]
] | [
"from sys import stdin\nfrom math import ceil, floor\nn,a,b=[int(x) for x in stdin.readline().rstrip().split()]\ns=list(stdin.readline().rstrip())\nc=a+b\nd=e=m=0\nfor i in range(n):\n if d<c and s[i]==\"a\":\n print(\"Yes\")\n d+=1\n elif d<c and e<b and s[i]==\"b\":\n print(\"Yes\")\n d+=1\n e+=1\n else:\n print(\"No\")\n if d>=c:\n m=i+1\n break\nif m != 0:\n for i in range(n-m):\n print(\"No\")",
"from sys import stdin",
"from math import ceil, floor",
"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=list(stdin.readline().rstrip())",
"s",
"list(stdin.readline().rstrip())",
"list",
"stdin.readline().rstrip()",
"stdin.readline().rstrip",
"stdin.readline()",
"stdin.readline",
"stdin",
"readline",
"rstrip",
"c=a+b",
"c",
"a+b",
"a",
"b",
"d=e=m=0",
"d",
"0",
"=e=m=0",
"e",
"0",
"m",
"for i in range(n):\n if d<c and s[i]==\"a\":\n print(\"Yes\")\n d+=1\n elif d<c and e<b and s[i]==\"b\":\n print(\"Yes\")\n d+=1\n e+=1\n else:\n print(\"No\")\n if d>=c:\n m=i+1\n break",
"i",
"range(n)",
"range",
"n",
"if d<c and s[i]==\"a\":\n print(\"Yes\")\n d+=1\n elif d<c and e<b and s[i]==\"b\":\n print(\"Yes\")\n d+=1\n e+=1\n else:\n print(\"No\")\n ",
"d<c and s[i]==\"a\"",
"d<c",
"d",
"c",
"s[i]==\"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"print(\"Yes\")",
"print",
"\"Yes\"",
"d+=1",
"d",
"1",
"elif d<c and e<b and s[i]==\"b\":\n print(\"Yes\")\n d+=1\n e+=1\n ",
"d<c and e<b and s[i]==\"b\"",
"d<c and e<b",
"d<c",
"d",
"c",
"e<b",
"e",
"b",
"s[i]==\"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"print(\"Yes\")",
"print",
"\"Yes\"",
"d+=1",
"d",
"1",
"e+=1",
"e",
"1",
"print(\"No\")",
"print",
"\"No\"",
"if d>=c:\n m=i+1\n break",
"d>=c",
"d",
"c",
"m=i+1",
"m",
"i+1",
"i",
"1",
"break",
"if m != 0:\n for i in range(n-m):\n print(\"No\")",
"m != 0",
"m",
"0",
"for i in range(n-m):\n print(\"No\")",
"i",
"range(n-m)",
"range",
"n-m",
"n",
"m",
"print(\"No\")",
"print",
"\"No\"",
"e=m=0",
"0",
"e",
"c=a+b",
"a+b",
"c",
"m=0",
"0",
"m",
"s=list(stdin.readline().rstrip())",
"list(stdin.readline().rstrip())",
"s",
"m=i+1",
"i+1",
"m",
"d=e=m=0",
"0",
"d",
"n,a,b=[int(x) for x in stdin.readline().rstrip().split()]",
"[int(x) for x in stdin.readline().rstrip().split()]",
"n",
"b=[int(x) for x in stdin.readline().rstrip().split()]",
"[int(x) for x in stdin.readline().rstrip().split()]",
"b",
"e+=1",
"1",
"e",
"a,b=[int(x) for x in stdin.readline().rstrip().split()]",
"[int(x) for x in stdin.readline().rstrip().split()]",
"a",
"d+=1",
"1",
"d",
"d+=1",
"1",
"d"
] | from sys import stdin
from math import ceil, floor
n,a,b=[int(x) for x in stdin.readline().rstrip().split()]
s=list(stdin.readline().rstrip())
c=a+b
d=e=m=0
for i in range(n):
if d<c and s[i]=="a":
print("Yes")
d+=1
elif d<c and e<b and s[i]=="b":
print("Yes")
d+=1
e+=1
else:
print("No")
if d>=c:
m=i+1
break
if m != 0:
for i in range(n-m):
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,
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,
14,
2,
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,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
106,
2
],
[
106,
11
],
[
106,
12
],
[
100,
14
],
[
94,
18
],
[
103,
21
],
[
97,
24
],
[
28,
27
],
[
101,
27
],
[
27,
31
],
[
95,
35
],
[
92,
35
],
[
110,
35
],
[
107,
37
],
[
89,
38
],
[
109,
43
],
[
27,
50
],
[
110,
55
],
[
95,
55
],
[
92,
55
],
[
107,
57
],
[
89,
58
],
[
104,
60
],
[
86,
60
],
[
89,
61
],
[
91,
66
],
[
85,
69
],
[
27,
76
],
[
106,
83
],
[
85,
86
],
[
106,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
]
] | [
"n,a,b=map(int,input().split())\ns=input()\n\nninzu=0\nkaigai=0\nans=0\nfor s_i in s:\n if s_i=='a':\n if ninzu<(a+b):\n print('Yes')\n ninzu+=1\n else:\n print('No')\n if s_i=='b':\n if ninzu<(a+b) and kaigai<b:\n print('Yes')\n ninzu+=1\n kaigai+=1\n else:\n print('No')\n if s_i=='c':\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",
"ninzu=0",
"ninzu",
"0",
"kaigai=0",
"kaigai",
"0",
"ans=0",
"ans",
"0",
"for s_i in s:\n if s_i=='a':\n if ninzu<(a+b):\n print('Yes')\n ninzu+=1\n else:\n print('No')\n if s_i=='b':\n if ninzu<(a+b) and kaigai<b:\n print('Yes')\n ninzu+=1\n kaigai+=1\n else:\n print('No')\n if s_i=='c':\n print('No')",
"s_i",
"s",
"if s_i=='a':\n if ninzu<(a+b):\n print('Yes')\n ninzu+=1\n else:\n print('No')\n ",
"s_i=='a'",
"s_i",
"'a'",
"if ninzu<(a+b):\n print('Yes')\n ninzu+=1\n else:\n print('No')\n ",
"ninzu<(a+b)",
"ninzu",
"a+b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"ninzu+=1",
"ninzu",
"1",
"print('No')",
"print",
"'No'",
"if s_i=='b':\n if ninzu<(a+b) and kaigai<b:\n print('Yes')\n ninzu+=1\n kaigai+=1\n else:\n print('No')\n ",
"s_i=='b'",
"s_i",
"'b'",
"if ninzu<(a+b) and kaigai<b:\n print('Yes')\n ninzu+=1\n kaigai+=1\n else:\n print('No')\n ",
"ninzu<(a+b) and kaigai<b",
"ninzu<(a+b)",
"ninzu",
"a+b",
"a",
"b",
"kaigai<b",
"kaigai",
"b",
"print('Yes')",
"print",
"'Yes'",
"ninzu+=1",
"ninzu",
"1",
"kaigai+=1",
"kaigai",
"1",
"print('No')",
"print",
"'No'",
"if s_i=='c':\n print('No')",
"s_i=='c'",
"s_i",
"'c'",
"print('No')",
"print",
"'No'",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"kaigai+=1",
"1",
"kaigai",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"ninzu+=1",
"1",
"ninzu",
"ninzu=0",
"0",
"ninzu",
"ans=0",
"0",
"ans",
"s=input()",
"input()",
"s",
"kaigai=0",
"0",
"kaigai",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"ninzu+=1",
"1",
"ninzu"
] | n,a,b=map(int,input().split())
s=input()
ninzu=0
kaigai=0
ans=0
for s_i in s:
if s_i=='a':
if ninzu<(a+b):
print('Yes')
ninzu+=1
else:
print('No')
if s_i=='b':
if ninzu<(a+b) and kaigai<b:
print('Yes')
ninzu+=1
kaigai+=1
else:
print('No')
if s_i=='c':
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,
39,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
17,
14,
2,
18,
13,
13,
17,
14,
2,
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,
13,
2,
13,
13,
2,
13,
13,
4,
18,
13,
13,
17,
0,
13,
17,
0,
13,
17,
4,
18,
13,
13,
17,
0,
13,
17,
28,
13,
13,
4,
13,
13,
10,
13,
13,
10,
39,
13,
10,
4,
13,
10,
13,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
4,
3
],
[
3,
12
],
[
126,
14
],
[
126,
16
],
[
126,
17
],
[
120,
19
],
[
117,
23
],
[
144,
26
],
[
129,
29
],
[
33,
32
],
[
115,
35
],
[
121,
39
],
[
32,
40
],
[
118,
44
],
[
121,
50
],
[
32,
51
],
[
145,
55
],
[
139,
55
],
[
133,
55
],
[
127,
57
],
[
124,
58
],
[
118,
61
],
[
132,
65
],
[
118,
69
],
[
121,
75
],
[
32,
76
],
[
145,
81
],
[
139,
81
],
[
133,
81
],
[
127,
83
],
[
124,
84
],
[
130,
86
],
[
142,
86
],
[
136,
86
],
[
124,
87
],
[
118,
90
],
[
138,
94
],
[
135,
97
],
[
118,
101
],
[
141,
105
],
[
109,
108
],
[
118,
108
],
[
108,
112
],
[
126,
115
],
[
117,
118
],
[
120,
121
],
[
126,
124
],
[
126,
127
],
[
129,
130
],
[
132,
133
],
[
135,
136
],
[
138,
139
],
[
141,
142
],
[
144,
145
]
] | [
"N, A, B = [int(a) for a in input().split()]\nS = input()\nans = []\nnpas = 0\nnpas_b = 0\n\nfor i in range(N):\n if S[i] == 'c':\n ans.append('No')\n else:\n if S[i] == 'a':\n if npas < A+B:\n ans.append('Yes')\n npas += 1\n else:\n ans.append('No')\n elif S[i] == 'b':\n if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1\n\nfor a in ans:\n print(a)",
"int(a) for a in input().split()",
"for a in input().split()",
"a",
"input().split()",
"().split",
"()",
"input",
"split",
"for a in input().split()",
"int(a)",
"int",
"a",
"N, A, B = [int(a) for a in input().split()]",
"N",
"[int(a) for a in input().split()]",
"A",
"B",
"S = input()",
"S",
"input()",
"input",
"ans = []",
"ans",
"[]",
"npas = 0",
"npas",
"0",
"npas_b = 0",
"npas_b",
"0",
"for i in range(N):\n if S[i] == 'c':\n ans.append('No')\n else:\n if S[i] == 'a':\n if npas < A+B:\n ans.append('Yes')\n npas += 1\n else:\n ans.append('No')\n elif S[i] == 'b':\n if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1",
"i",
"range(N)",
"range",
"N",
"if S[i] == 'c':\n ans.append('No')\n else:\n if S[i] == 'a':\n if npas < A+B:\n ans.append('Yes')\n npas += 1\n else:\n ans.append('No')\n elif S[i] == 'b':\n if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1",
"S[i] == 'c'",
"S[i]",
"S",
"i",
"'c'",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"if S[i] == 'a':\n if npas < A+B:\n ans.append('Yes')\n npas += 1\n else:\n ans.append('No')\n elif S[i] == 'b':\n if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1",
"S[i] == 'a'",
"S[i]",
"S",
"i",
"'a'",
"if npas < A+B:\n ans.append('Yes')\n npas += 1\n else:\n ans.append('No')\n ",
"npas < A+B",
"npas",
"A+B",
"A",
"B",
"ans.append('Yes')",
"ans.append",
"ans",
"append",
"'Yes'",
"npas += 1",
"npas",
"1",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"elif S[i] == 'b':\n if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1",
"S[i] == 'b'",
"S[i]",
"S",
"i",
"'b'",
"if npas < A+B and npas_b < B:\n ans.append('Yes')\n npas += 1\n npas_b += 1\n else:\n ans.append('No')\n npas_b += 1",
"npas < A+B and npas_b < B",
"npas < A+B",
"npas",
"A+B",
"A",
"B",
"npas_b < B",
"npas_b",
"B",
"ans.append('Yes')",
"ans.append",
"ans",
"append",
"'Yes'",
"npas += 1",
"npas",
"1",
"npas_b += 1",
"npas_b",
"1",
"ans.append('No')",
"ans.append",
"ans",
"append",
"'No'",
"npas_b += 1",
"npas_b",
"1",
"for a in ans:\n print(a)",
"a",
"ans",
"print(a)",
"print",
"a",
"N, A, B = [int(a) for a in input().split()]",
"[int(a) for a in input().split()]",
"N",
"ans = []",
"[]",
"ans",
"S = input()",
"input()",
"S",
"B = [int(a) for a in input().split()]",
"[int(a) for a in input().split()]",
"B",
"A, B = [int(a) for a in input().split()]",
"[int(a) for a in input().split()]",
"A",
"npas_b = 0",
"0",
"npas_b",
"npas += 1",
"1",
"npas",
"npas_b += 1",
"1",
"npas_b",
"npas += 1",
"1",
"npas",
"npas_b += 1",
"1",
"npas_b",
"npas = 0",
"0",
"npas"
] | N, A, B = [int(a) for a in input().split()]
S = input()
ans = []
npas = 0
npas_b = 0
for i in range(N):
if S[i] == 'c':
ans.append('No')
else:
if S[i] == 'a':
if npas < A+B:
ans.append('Yes')
npas += 1
else:
ans.append('No')
elif S[i] == 'b':
if npas < A+B and npas_b < B:
ans.append('Yes')
npas += 1
npas_b += 1
else:
ans.append('No')
npas_b += 1
for a in ans:
print(a)
|
[
7,
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,
4,
13,
13,
14,
2,
18,
13,
13,
17,
14,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
4,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
14,
2,
18,
13,
13,
17,
4,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
13
],
[
5,
14
],
[
17,
16
],
[
23,
22
],
[
26,
25
],
[
29,
28
],
[
4,
31
],
[
16,
35
],
[
28,
36
],
[
22,
40
],
[
80,
40
],
[
48,
40
],
[
13,
42
],
[
14,
43
],
[
49,
48
],
[
22,
50
],
[
80,
50
],
[
48,
50
],
[
16,
58
],
[
28,
59
],
[
63,
62
],
[
25,
64
],
[
62,
64
],
[
48,
69
],
[
22,
69
],
[
80,
69
],
[
13,
71
],
[
14,
72
],
[
62,
74
],
[
25,
74
],
[
14,
75
],
[
81,
80
],
[
48,
82
],
[
22,
82
],
[
80,
82
],
[
16,
90
],
[
28,
91
],
[
100,
97
]
] | [
"def main():\n quantity, A, B = map(int, input().split())\n l = list(input())\n yes = 0\n abroad = 0\n\n for i in range(quantity):\n if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n if l[i] == 'c':\n print('No')\n\nmain()",
"def main():\n quantity, A, B = map(int, input().split())\n l = list(input())\n yes = 0\n abroad = 0\n\n for i in range(quantity):\n if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n if l[i] == 'c':\n print('No')",
"main",
"quantity, A, B = map(int, input().split())",
"quantity",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A",
"B",
"l = list(input())",
"l",
"list(input())",
"list",
"input()",
"input",
"yes = 0",
"yes",
"0",
"abroad = 0",
"abroad",
"0",
"for i in range(quantity):\n if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n if l[i] == 'c':\n print('No')",
"i",
"range(quantity)",
"range",
"quantity",
"if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n ",
"l[i] == 'a'",
"l[i]",
"l",
"i",
"'a'",
"if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n ",
"yes < (A + B)",
"yes",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"yes = yes + 1",
"yes",
"yes + 1",
"yes",
"1",
"print('No')",
"print",
"'No'",
"if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n ",
"l[i] == 'b'",
"l[i]",
"l",
"i",
"'b'",
"abroad = abroad + 1",
"abroad",
"abroad + 1",
"abroad",
"1",
"if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n ",
"yes < (A + B) and abroad <= B",
"yes < (A + B)",
"yes",
"A + B",
"A",
"B",
"abroad <= B",
"abroad",
"B",
"print('Yes')",
"print",
"'Yes'",
"yes = yes + 1",
"yes",
"yes + 1",
"yes",
"1",
"print('No')",
"print",
"'No'",
"if l[i] == 'c':\n print('No')",
"l[i] == 'c'",
"l[i]",
"l",
"i",
"'c'",
"print('No')",
"print",
"'No'",
"main()",
"main",
"def main():\n quantity, A, B = map(int, input().split())\n l = list(input())\n yes = 0\n abroad = 0\n\n for i in range(quantity):\n if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n if l[i] == 'c':\n print('No')",
"def main():\n quantity, A, B = map(int, input().split())\n l = list(input())\n yes = 0\n abroad = 0\n\n for i in range(quantity):\n if l[i] == 'a':\n if yes < (A + B):\n print('Yes')\n yes = yes + 1\n else:\n print('No')\n \n if l[i] == 'b':\n abroad = abroad + 1\n if yes < (A + B) and abroad <= B:\n print('Yes')\n yes = yes + 1\n\n else:\n print('No')\n \n if l[i] == 'c':\n print('No')",
"main"
] | def main():
quantity, A, B = map(int, input().split())
l = list(input())
yes = 0
abroad = 0
for i in range(quantity):
if l[i] == 'a':
if yes < (A + B):
print('Yes')
yes = yes + 1
else:
print('No')
if l[i] == 'b':
abroad = abroad + 1
if yes < (A + B) and abroad <= B:
print('Yes')
yes = yes + 1
else:
print('No')
if l[i] == 'c':
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,
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,
13,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13
] | [
[
114,
2
],
[
114,
11
],
[
114,
12
],
[
90,
14
],
[
96,
18
],
[
93,
21
],
[
25,
24
],
[
109,
27
],
[
91,
31
],
[
24,
32
],
[
91,
40
],
[
24,
41
],
[
97,
45
],
[
100,
45
],
[
112,
45
],
[
115,
47
],
[
103,
48
],
[
111,
53
],
[
91,
61
],
[
24,
62
],
[
94,
67
],
[
106,
67
],
[
103,
68
],
[
97,
70
],
[
100,
70
],
[
112,
70
],
[
115,
72
],
[
103,
73
],
[
105,
78
],
[
99,
81
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
114,
103
],
[
105,
106
],
[
114,
109
],
[
111,
112
],
[
114,
115
]
] | [
"n,a,b=map(int,input().split())\ns=input()\n\ncount_ab=0\ncount_b=0\n\nfor i in range(n):\n if s[i]=='c':\n print('No')\n elif s[i]=='a':\n if count_ab<a+b:\n print('Yes')\n count_ab+=1\n else:\n print('No')\n elif s[i]=='b':\n if count_b<b and count_ab<a+b:\n print('Yes')\n count_b+=1\n count_ab+=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_ab=0",
"count_ab",
"0",
"count_b=0",
"count_b",
"0",
"for i in range(n):\n if s[i]=='c':\n print('No')\n elif s[i]=='a':\n if count_ab<a+b:\n print('Yes')\n count_ab+=1\n else:\n print('No')\n elif s[i]=='b':\n if count_b<b and count_ab<a+b:\n print('Yes')\n count_b+=1\n count_ab+=1\n else:\n print('No')\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"if s[i]=='c':\n print('No')\n elif s[i]=='a':\n if count_ab<a+b:\n print('Yes')\n count_ab+=1\n else:\n print('No')\n elif s[i]=='b':\n if count_b<b and count_ab<a+b:\n print('Yes')\n count_b+=1\n count_ab+=1\n else:\n print('No')\n else:\n print('No')",
"s[i]=='c'",
"s[i]",
"s",
"i",
"'c'",
"print('No')",
"print",
"'No'",
"elif s[i]=='a':\n if count_ab<a+b:\n print('Yes')\n count_ab+=1\n else:\n print('No')\n ",
"s[i]=='a'",
"s[i]",
"s",
"i",
"'a'",
"if count_ab<a+b:\n print('Yes')\n count_ab+=1\n else:\n print('No')\n ",
"count_ab<a+b",
"count_ab",
"a+b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"count_ab+=1",
"count_ab",
"1",
"print('No')",
"print",
"'No'",
"elif s[i]=='b':\n if count_b<b and count_ab<a+b:\n print('Yes')\n count_b+=1\n count_ab+=1\n else:\n print('No')\n ",
"s[i]=='b'",
"s[i]",
"s",
"i",
"'b'",
"if count_b<b and count_ab<a+b:\n print('Yes')\n count_b+=1\n count_ab+=1\n else:\n print('No')\n ",
"count_b<b and count_ab<a+b",
"count_b<b",
"count_b",
"b",
"count_ab<a+b",
"count_ab",
"a+b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"count_b+=1",
"count_b",
"1",
"count_ab+=1",
"count_ab",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"s=input()",
"input()",
"s",
"count_b=0",
"0",
"count_b",
"count_ab=0",
"0",
"count_ab",
"count_ab+=1",
"1",
"count_ab",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"count_b+=1",
"1",
"count_b",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"count_ab+=1",
"1",
"count_ab",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a"
] | n,a,b=map(int,input().split())
s=input()
count_ab=0
count_b=0
for i in range(n):
if s[i]=='c':
print('No')
elif s[i]=='a':
if count_ab<a+b:
print('Yes')
count_ab+=1
else:
print('No')
elif s[i]=='b':
if count_b<b and count_ab<a+b:
print('Yes')
count_b+=1
count_ab+=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,
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,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
101,
2
],
[
101,
11
],
[
101,
12
],
[
92,
14
],
[
80,
20
],
[
104,
23
],
[
27,
26
],
[
93,
26
],
[
95,
29
],
[
26,
33
],
[
81,
37
],
[
75,
37
],
[
87,
37
],
[
84,
39
],
[
90,
40
],
[
86,
42
],
[
107,
45
],
[
26,
49
],
[
87,
54
],
[
81,
54
],
[
75,
54
],
[
84,
56
],
[
90,
57
],
[
105,
59
],
[
99,
59
],
[
90,
60
],
[
74,
62
],
[
98,
65
],
[
77,
68
],
[
78,
72
],
[
108,
72
],
[
96,
72
],
[
74,
75
],
[
77,
78
],
[
80,
81
],
[
101,
84
],
[
86,
87
],
[
101,
90
],
[
92,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
]
] | [
"_,A,B = map(int,input().split())\ns = list(input())\n\nab = 0\nb = 0\n\nfor i in s:\n res = \"No\"\n \n if i == \"a\":\n if ab < A+B:\n ab += 1\n res = \"Yes\"\n \n if i == \"b\":\n if ab < A+B and b < B:\n ab += 1\n b += 1\n res = \"Yes\"\n \n print(res)",
"_,A,B = map(int,input().split())",
"_",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"A",
"B",
"s = list(input())",
"s",
"list(input())",
"list",
"input()",
"input",
"ab = 0",
"ab",
"0",
"b = 0",
"b",
"0",
"for i in s:\n res = \"No\"\n \n if i == \"a\":\n if ab < A+B:\n ab += 1\n res = \"Yes\"\n \n if i == \"b\":\n if ab < A+B and b < B:\n ab += 1\n b += 1\n res = \"Yes\"\n \n print(res)",
"i",
"s",
"res = \"No\"",
"res",
"\"No\"",
"if i == \"a\":\n if ab < A+B:\n ab += 1\n res = \"Yes\"\n \n ",
"i == \"a\"",
"i",
"\"a\"",
"if ab < A+B:\n ab += 1\n res = \"Yes\"\n \n ",
"ab < A+B",
"ab",
"A+B",
"A",
"B",
"ab += 1",
"ab",
"1",
"res = \"Yes\"",
"res",
"\"Yes\"",
"if i == \"b\":\n if ab < A+B and b < B:\n ab += 1\n b += 1\n res = \"Yes\"\n \n ",
"i == \"b\"",
"i",
"\"b\"",
"if ab < A+B and b < B:\n ab += 1\n b += 1\n res = \"Yes\"\n \n ",
"ab < A+B and b < B",
"ab < A+B",
"ab",
"A+B",
"A",
"B",
"b < B",
"b",
"B",
"ab += 1",
"ab",
"1",
"b += 1",
"b",
"1",
"res = \"Yes\"",
"res",
"\"Yes\"",
"print(res)",
"print",
"res",
"ab += 1",
"1",
"ab",
"res = \"Yes\"",
"\"Yes\"",
"res",
"ab = 0",
"0",
"ab",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"ab += 1",
"1",
"ab",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"s = list(input())",
"list(input())",
"s",
"res = \"No\"",
"\"No\"",
"res",
"b += 1",
"1",
"b",
"_,A,B = map(int,input().split())",
"map(int,input().split())",
"_",
"b = 0",
"0",
"b",
"res = \"Yes\"",
"\"Yes\"",
"res"
] | _,A,B = map(int,input().split())
s = list(input())
ab = 0
b = 0
for i in s:
res = "No"
if i == "a":
if ab < A+B:
ab += 1
res = "Yes"
if i == "b":
if ab < A+B and b < B:
ab += 1
b += 1
res = "Yes"
print(res) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
2,
13,
13,
0,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
14,
2,
2,
13,
17,
2,
13,
13,
0,
13,
17,
4,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
17,
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
],
[
73,
14
],
[
83,
16
],
[
92,
17
],
[
70,
19
],
[
76,
23
],
[
94,
26
],
[
30,
29
],
[
71,
29
],
[
29,
34
],
[
77,
37
],
[
80,
37
],
[
89,
37
],
[
74,
38
],
[
88,
40
],
[
29,
49
],
[
77,
52
],
[
80,
52
],
[
89,
52
],
[
74,
53
],
[
95,
55
],
[
86,
55
],
[
92,
56
],
[
85,
58
],
[
79,
61
],
[
70,
71
],
[
73,
74
],
[
76,
77
],
[
79,
80
],
[
97,
83
],
[
85,
86
],
[
88,
89
],
[
97,
92
],
[
94,
95
],
[
97,
98
]
] | [
"n,a,b = map(int, input().split())\nab = a+b\nS = input()\ntotal = 0\nb_total = 0\nfor s in S:\n if (s == \"a\" and total < ab):\n total += 1\n print(\"Yes\")\n elif (s == \"b\" and total < ab and b_total < b):\n b_total += 1\n total += 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",
"ab = a+b",
"ab",
"a+b",
"a",
"b",
"S = input()",
"S",
"input()",
"input",
"total = 0",
"total",
"0",
"b_total = 0",
"b_total",
"0",
"for s in S:\n if (s == \"a\" and total < ab):\n total += 1\n print(\"Yes\")\n elif (s == \"b\" and total < ab and b_total < b):\n b_total += 1\n total += 1\n print(\"Yes\")\n else:\n print(\"No\")",
"s",
"S",
"if (s == \"a\" and total < ab):\n total += 1\n print(\"Yes\")\n elif (s == \"b\" and total < ab and b_total < b):\n b_total += 1\n total += 1\n print(\"Yes\")\n else:\n print(\"No\")",
"s == \"a\" and total < ab",
"s == \"a\"",
"s",
"\"a\"",
"total < ab",
"total",
"ab",
"total += 1",
"total",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"elif (s == \"b\" and total < ab and b_total < b):\n b_total += 1\n total += 1\n print(\"Yes\")\n ",
"s == \"b\" and total < ab and b_total < b",
"s == \"b\" and total < ab",
"s == \"b\"",
"s",
"\"b\"",
"total < ab",
"total",
"ab",
"b_total < b",
"b_total",
"b",
"b_total += 1",
"b_total",
"1",
"total += 1",
"total",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"S = input()",
"input()",
"S",
"ab = a+b",
"a+b",
"ab",
"total = 0",
"0",
"total",
"total += 1",
"1",
"total",
"a,b = map(int, input().split())",
"map(int, input().split())",
"a",
"b_total += 1",
"1",
"b_total",
"total += 1",
"1",
"total",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"b_total = 0",
"0",
"b_total",
"n,a,b = map(int, input().split())",
"map(int, input().split())",
"n"
] | n,a,b = map(int, input().split())
ab = a+b
S = input()
total = 0
b_total = 0
for s in S:
if (s == "a" and total < ab):
total += 1
print("Yes")
elif (s == "b" and total < ab and b_total < b):
b_total += 1
total += 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,
0,
13,
18,
13,
13,
14,
2,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
2,
13,
2,
13,
13,
0,
13,
17,
4,
13,
17,
4,
13,
17,
14,
2,
2,
13,
2,
13,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
18,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
109,
2
],
[
109,
11
],
[
109,
12
],
[
85,
14
],
[
88,
18
],
[
106,
21
],
[
25,
24
],
[
110,
27
],
[
100,
29
],
[
86,
31
],
[
24,
32
],
[
101,
35
],
[
101,
42
],
[
89,
46
],
[
98,
46
],
[
95,
46
],
[
92,
48
],
[
83,
49
],
[
94,
51
],
[
89,
62
],
[
98,
62
],
[
95,
62
],
[
92,
64
],
[
83,
65
],
[
107,
67
],
[
104,
67
],
[
83,
68
],
[
97,
70
],
[
103,
73
],
[
109,
83
],
[
85,
86
],
[
88,
89
],
[
109,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
]
] | [
"n,a,b=map(int,input().split())\ns=input()\nc=0\nc_b=0\nfor i in range(n):\n \n p=s[i]\n if p=='c':\n print('No')\n elif p=='a':\n if c<a+b:\n c+=1\n print('Yes')\n else:\n print('No')\n else:\n if c<a+b and c_b<b:\n c+=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=0",
"c",
"0",
"c_b=0",
"c_b",
"0",
"for i in range(n):\n \n p=s[i]\n if p=='c':\n print('No')\n elif p=='a':\n if c<a+b:\n c+=1\n print('Yes')\n else:\n print('No')\n else:\n if c<a+b and c_b<b:\n c+=1\n c_b+=1\n print('Yes')\n else:\n print('No')",
"i",
"range(n)",
"range",
"n",
"p=s[i]",
"p",
"s[i]",
"s",
"i",
"if p=='c':\n print('No')\n elif p=='a':\n if c<a+b:\n c+=1\n print('Yes')\n else:\n print('No')\n else:\n if c<a+b and c_b<b:\n c+=1\n c_b+=1\n print('Yes')\n else:\n print('No')",
"p=='c'",
"p",
"'c'",
"print('No')",
"print",
"'No'",
"elif p=='a':\n if c<a+b:\n c+=1\n print('Yes')\n else:\n print('No')\n ",
"p=='a'",
"p",
"'a'",
"if c<a+b:\n c+=1\n print('Yes')\n else:\n print('No')\n ",
"c<a+b",
"c",
"a+b",
"a",
"b",
"c+=1",
"c",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"if c<a+b and c_b<b:\n c+=1\n c_b+=1\n print('Yes')\n else:\n print('No')",
"c<a+b and c_b<b",
"c<a+b",
"c",
"a+b",
"a",
"b",
"c_b<b",
"c_b",
"b",
"c+=1",
"c",
"1",
"c_b+=1",
"c_b",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"s=input()",
"input()",
"s",
"c=0",
"0",
"c",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"c+=1",
"1",
"c",
"c+=1",
"1",
"c",
"p=s[i]",
"s[i]",
"p",
"c_b+=1",
"1",
"c_b",
"c_b=0",
"0",
"c_b",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n"
] | n,a,b=map(int,input().split())
s=input()
c=0
c_b=0
for i in range(n):
p=s[i]
if p=='c':
print('No')
elif p=='a':
if c<a+b:
c+=1
print('Yes')
else:
print('No')
else:
if c<a+b and c_b<b:
c+=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,
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,
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,
4,
13,
17,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13
] | [
[
106,
2
],
[
106,
11
],
[
106,
12
],
[
88,
14
],
[
109,
18
],
[
89,
21
],
[
103,
23
],
[
115,
26
],
[
30,
29
],
[
110,
34
],
[
110,
38
],
[
29,
39
],
[
104,
43
],
[
92,
43
],
[
95,
43
],
[
107,
45
],
[
101,
46
],
[
94,
48
],
[
110,
59
],
[
29,
60
],
[
112,
63
],
[
104,
68
],
[
92,
68
],
[
95,
68
],
[
107,
70
],
[
101,
71
],
[
113,
73
],
[
116,
73
],
[
101,
74
],
[
91,
76
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
106,
98
],
[
106,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
],
[
112,
113
],
[
115,
116
]
] | [
"N,A,B = map(int,input().split())\nS = input()\nSS = list(S)\nCA = 0\nCB = 0\nfor i in range(len(SS)):\n if SS[i] =='a':\n if CA < A+B:\n CA +=1\n print('Yes')\n else:\n print('No')\n elif SS[i] == 'b':\n CB += 1\n if CA < A+B and CB <= B :\n CA +=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",
"SS = list(S)",
"SS",
"list(S)",
"list",
"S",
"CA = 0",
"CA",
"0",
"CB = 0",
"CB",
"0",
"for i in range(len(SS)):\n if SS[i] =='a':\n if CA < A+B:\n CA +=1\n print('Yes')\n else:\n print('No')\n elif SS[i] == 'b':\n CB += 1\n if CA < A+B and CB <= B :\n CA +=1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"i",
"range(len(SS))",
"range",
"len(SS)",
"len",
"SS",
"if SS[i] =='a':\n if CA < A+B:\n CA +=1\n print('Yes')\n else:\n print('No')\n elif SS[i] == 'b':\n CB += 1\n if CA < A+B and CB <= B :\n CA +=1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"SS[i] =='a'",
"SS[i]",
"SS",
"i",
"'a'",
"if CA < A+B:\n CA +=1\n print('Yes')\n else:\n print('No')\n ",
"CA < A+B",
"CA",
"A+B",
"A",
"B",
"CA +=1",
"CA",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif SS[i] == 'b':\n CB += 1\n if CA < A+B and CB <= B :\n CA +=1\n print('Yes')\n else:\n print('No')\n ",
"SS[i] == 'b'",
"SS[i]",
"SS",
"i",
"'b'",
"CB += 1",
"CB",
"1",
"if CA < A+B and CB <= B :\n CA +=1\n print('Yes')\n else:\n print('No')\n ",
"CA < A+B and CB <= B",
"CA < A+B",
"CA",
"A+B",
"A",
"B",
"CB <= B",
"CB",
"B",
"CA +=1",
"CA",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"S = input()",
"input()",
"S",
"CA +=1",
"1",
"CA",
"CA +=1",
"1",
"CA",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"CA = 0",
"0",
"CA",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"SS = list(S)",
"list(S)",
"SS",
"CB += 1",
"1",
"CB",
"CB = 0",
"0",
"CB"
] | N,A,B = map(int,input().split())
S = input()
SS = list(S)
CA = 0
CB = 0
for i in range(len(SS)):
if SS[i] =='a':
if CA < A+B:
CA +=1
print('Yes')
else:
print('No')
elif SS[i] == 'b':
CB += 1
if CA < A+B and CB <= B :
CA +=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,
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,
14,
2,
18,
13,
13,
17,
14,
2,
2,
13,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
14,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
0,
13,
17,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
117,
2
],
[
117,
11
],
[
117,
12
],
[
111,
14
],
[
84,
18
],
[
93,
21
],
[
106,
23
],
[
118,
24
],
[
102,
26
],
[
96,
29
],
[
33,
32
],
[
91,
35
],
[
112,
39
],
[
32,
40
],
[
85,
44
],
[
121,
44
],
[
94,
45
],
[
108,
47
],
[
112,
52
],
[
32,
53
],
[
85,
58
],
[
121,
58
],
[
94,
59
],
[
103,
61
],
[
88,
61
],
[
118,
62
],
[
114,
64
],
[
87,
67
],
[
120,
75
],
[
99,
81
],
[
84,
85
],
[
87,
88
],
[
117,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
117,
106
],
[
108,
109
],
[
111,
112
],
[
114,
115
],
[
117,
118
],
[
120,
121
]
] | [
"n,x,y=map(int,input().split())\ns= input()\nc=0\nd=x+y\ne = 0\nf= False\nfor i in range(n):\n if s[i]==\"a\":\n if c<d:\n f=True\n elif s[i]==\"b\":\n if c<d and e<y:\n f=True\n e+=1\n if f:\n print(\"Yes\")\n c+=1\n else:\n print(\"No\")\n f=False",
"n,x,y=map(int,input().split())",
"n",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"x",
"y",
"s= input()",
"s",
"input()",
"input",
"c=0",
"c",
"0",
"d=x+y",
"d",
"x+y",
"x",
"y",
"e = 0",
"e",
"0",
"f= False",
"f",
"False",
"for i in range(n):\n if s[i]==\"a\":\n if c<d:\n f=True\n elif s[i]==\"b\":\n if c<d and e<y:\n f=True\n e+=1\n if f:\n print(\"Yes\")\n c+=1\n else:\n print(\"No\")\n f=False",
"i",
"range(n)",
"range",
"n",
"if s[i]==\"a\":\n if c<d:\n f=True\n elif s[i]==\"b\":\n if c<d and e<y:\n f=True\n e+=1\n ",
"s[i]==\"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"if c<d:\n f=True\n ",
"c<d",
"c",
"d",
"f=True",
"f",
"True",
"elif s[i]==\"b\":\n if c<d and e<y:\n f=True\n e+=1\n ",
"s[i]==\"b\"",
"s[i]",
"s",
"i",
"\"b\"",
"if c<d and e<y:\n f=True\n e+=1\n ",
"c<d and e<y",
"c<d",
"c",
"d",
"e<y",
"e",
"y",
"f=True",
"f",
"True",
"e+=1",
"e",
"1",
"if f:\n print(\"Yes\")\n c+=1\n else:\n print(\"No\")\n ",
"f",
"print(\"Yes\")",
"print",
"\"Yes\"",
"c+=1",
"c",
"1",
"print(\"No\")",
"print",
"\"No\"",
"f=False",
"f",
"False",
"c=0",
"0",
"c",
"e+=1",
"1",
"e",
"n,x,y=map(int,input().split())",
"map(int,input().split())",
"n",
"d=x+y",
"x+y",
"d",
"f= False",
"False",
"f",
"f=False",
"False",
"f",
"e = 0",
"0",
"e",
"x,y=map(int,input().split())",
"map(int,input().split())",
"x",
"f=True",
"True",
"f",
"s= input()",
"input()",
"s",
"f=True",
"True",
"f",
"y=map(int,input().split())",
"map(int,input().split())",
"y",
"c+=1",
"1",
"c"
] | n,x,y=map(int,input().split())
s= input()
c=0
d=x+y
e = 0
f= False
for i in range(n):
if s[i]=="a":
if c<d:
f=True
elif s[i]=="b":
if c<d and e<y:
f=True
e+=1
if f:
print("Yes")
c+=1
else:
print("No")
f=False |
[
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,
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,
4,
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
] | [
[
104,
2
],
[
104,
11
],
[
104,
12
],
[
95,
14
],
[
101,
20
],
[
89,
23
],
[
27,
26
],
[
93,
29
],
[
96,
33
],
[
26,
34
],
[
102,
38
],
[
87,
38
],
[
108,
38
],
[
105,
40
],
[
84,
41
],
[
107,
43
],
[
96,
54
],
[
26,
55
],
[
102,
60
],
[
87,
60
],
[
108,
60
],
[
105,
62
],
[
84,
63
],
[
90,
65
],
[
99,
65
],
[
84,
66
],
[
86,
68
],
[
98,
71
],
[
104,
84
],
[
86,
87
],
[
89,
90
],
[
104,
93
],
[
95,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
]
] | [
"n,a,b=map(int,input().split())\ns=str(input())\no=0\ne=0\nfor i in range(n):\n if s[i]=='a':\n if o<a+b:\n o+=1\n print('Yes')\n else:\n print('No')\n elif s[i]=='b':\n if o<a+b and e<b:\n o+=1\n e+=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=str(input())",
"s",
"str(input())",
"str",
"input()",
"input",
"o=0",
"o",
"0",
"e=0",
"e",
"0",
"for i in range(n):\n if s[i]=='a':\n if o<a+b:\n o+=1\n print('Yes')\n else:\n print('No')\n elif s[i]=='b':\n if o<a+b and e<b:\n o+=1\n e+=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 o<a+b:\n o+=1\n print('Yes')\n else:\n print('No')\n elif s[i]=='b':\n if o<a+b and e<b:\n o+=1\n e+=1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"s[i]=='a'",
"s[i]",
"s",
"i",
"'a'",
"if o<a+b:\n o+=1\n print('Yes')\n else:\n print('No')\n ",
"o<a+b",
"o",
"a+b",
"a",
"b",
"o+=1",
"o",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif s[i]=='b':\n if o<a+b and e<b:\n o+=1\n e+=1\n print('Yes')\n else:\n print('No')\n ",
"s[i]=='b'",
"s[i]",
"s",
"i",
"'b'",
"if o<a+b and e<b:\n o+=1\n e+=1\n print('Yes')\n else:\n print('No')\n ",
"o<a+b and e<b",
"o<a+b",
"o",
"a+b",
"a",
"b",
"e<b",
"e",
"b",
"o+=1",
"o",
"1",
"e+=1",
"e",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"b=map(int,input().split())",
"map(int,input().split())",
"b",
"o+=1",
"1",
"o",
"e=0",
"0",
"e",
"n,a,b=map(int,input().split())",
"map(int,input().split())",
"n",
"s=str(input())",
"str(input())",
"s",
"e+=1",
"1",
"e",
"o=0",
"0",
"o",
"a,b=map(int,input().split())",
"map(int,input().split())",
"a",
"o+=1",
"1",
"o"
] | n,a,b=map(int,input().split())
s=str(input())
o=0
e=0
for i in range(n):
if s[i]=='a':
if o<a+b:
o+=1
print('Yes')
else:
print('No')
elif s[i]=='b':
if o<a+b and e<b:
o+=1
e+=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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
85,
2
],
[
85,
11
],
[
85,
12
],
[
97,
14
],
[
76,
18
],
[
94,
21
],
[
25,
24
],
[
98,
24
],
[
24,
28
],
[
77,
33
],
[
89,
33
],
[
95,
34
],
[
92,
34
],
[
83,
36
],
[
80,
37
],
[
88,
42
],
[
24,
49
],
[
77,
55
],
[
89,
55
],
[
95,
56
],
[
92,
56
],
[
83,
58
],
[
80,
59
],
[
95,
61
],
[
92,
61
],
[
80,
62
],
[
91,
67
],
[
76,
77
],
[
85,
80
],
[
85,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
]
] | [
"#B-Qualification simulator\nN, A, B = map(int, input().split())\nS = input()\na = 0\nb = 0\n\nfor i in S:\n if i == \"a\":\n if a + b < A + B:\n print (\"Yes\")\n a += 1\n else:\n print (\"No\")\n elif 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 S:\n if i == \"a\":\n if a + b < A + B:\n print (\"Yes\")\n a += 1\n else:\n print (\"No\")\n elif 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",
"S",
"if i == \"a\":\n if a + b < A + B:\n print (\"Yes\")\n a += 1\n else:\n print (\"No\")\n elif 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 == \"a\"",
"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 i == \"b\":\n if (a + b <A + B) and (b < B):\n print (\"Yes\")\n b += 1\n else:\n print (\"No\")\n ",
"i == \"b\"",
"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\"",
"a = 0",
"0",
"a",
"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",
"a += 1",
"1",
"a",
"b += 1",
"1",
"b",
"b = 0",
"0",
"b",
"S = input()",
"input()",
"S"
] | #B-Qualification simulator
N, A, B = map(int, input().split())
S = input()
a = 0
b = 0
for i in S:
if i == "a":
if a + b < A + B:
print ("Yes")
a += 1
else:
print ("No")
elif 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,
2,
17,
4,
13,
0,
13,
2,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
14,
2,
2,
2,
18,
13,
13,
17,
2,
13,
13,
40,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
2,
18,
13,
13,
17,
2,
13,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
10,
4,
13,
10,
2,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
2,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
84,
14
],
[
99,
20
],
[
82,
22
],
[
106,
23
],
[
90,
25
],
[
93,
28
],
[
32,
31
],
[
88,
36
],
[
85,
43
],
[
31,
44
],
[
94,
47
],
[
97,
47
],
[
103,
47
],
[
100,
48
],
[
91,
50
],
[
109,
50
],
[
106,
51
],
[
108,
56
],
[
102,
59
],
[
85,
65
],
[
31,
66
],
[
94,
69
],
[
97,
69
],
[
103,
69
],
[
100,
70
],
[
96,
75
],
[
105,
82
],
[
84,
85
],
[
105,
88
],
[
90,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
102,
103
],
[
105,
106
],
[
108,
109
]
] | [
"N,A,B=map(int,input().split())\nS=' '+input()\nAB=A+B\nj=1\nnum=0\nfor i in range(1,N+1):\n if S[i]=='b' and num<AB and j<=B:\n print('Yes')\n j+=1\n num+=1\n elif S[i]=='a' and num<AB:\n print('Yes')\n num+=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()",
"input",
"AB=A+B",
"AB",
"A+B",
"A",
"B",
"j=1",
"j",
"1",
"num=0",
"num",
"0",
"for i in range(1,N+1):\n if S[i]=='b' and num<AB and j<=B:\n print('Yes')\n j+=1\n num+=1\n elif S[i]=='a' and num<AB:\n print('Yes')\n num+=1\n else:\n print('No')",
"i",
"range(1,N+1)",
"range",
"1",
"N+1",
"N",
"1",
"if S[i]=='b' and num<AB and j<=B:\n print('Yes')\n j+=1\n num+=1\n elif S[i]=='a' and num<AB:\n print('Yes')\n num+=1\n else:\n print('No')",
"S[i]=='b' and num<AB and j<=B",
"S[i]=='b' and num<AB",
"S[i]=='b'",
"S[i]",
"S",
"i",
"'b'",
"num<AB",
"num",
"AB",
"j<=B",
"j",
"B",
"print('Yes')",
"print",
"'Yes'",
"j+=1",
"j",
"1",
"num+=1",
"num",
"1",
"elif S[i]=='a' and num<AB:\n print('Yes')\n num+=1\n ",
"S[i]=='a' and num<AB",
"S[i]=='a'",
"S[i]",
"S",
"i",
"'a'",
"num<AB",
"num",
"AB",
"print('Yes')",
"print",
"'Yes'",
"num+=1",
"num",
"1",
"print('No')",
"print",
"'No'",
"A,B=map(int,input().split())",
"map(int,input().split())",
"A",
"S=' '+input()",
"' '+input()",
"S",
"N,A,B=map(int,input().split())",
"map(int,input().split())",
"N",
"j=1",
"1",
"j",
"num=0",
"0",
"num",
"num+=1",
"1",
"num",
"AB=A+B",
"A+B",
"AB",
"num+=1",
"1",
"num",
"B=map(int,input().split())",
"map(int,input().split())",
"B",
"j+=1",
"1",
"j"
] | N,A,B=map(int,input().split())
S=' '+input()
AB=A+B
j=1
num=0
for i in range(1,N+1):
if S[i]=='b' and num<AB and j<=B:
print('Yes')
j+=1
num+=1
elif S[i]=='a' and num<AB:
print('Yes')
num+=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,
4,
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,
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,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
93,
14
],
[
84,
18
],
[
96,
21
],
[
94,
28
],
[
99,
30
],
[
85,
38
],
[
82,
38
],
[
76,
38
],
[
91,
40
],
[
103,
41
],
[
87,
43
],
[
75,
46
],
[
85,
55
],
[
82,
55
],
[
76,
55
],
[
91,
57
],
[
103,
58
],
[
97,
60
],
[
109,
60
],
[
103,
61
],
[
78,
63
],
[
81,
66
],
[
108,
69
],
[
79,
73
],
[
88,
73
],
[
100,
73
],
[
75,
76
],
[
78,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
105,
91
],
[
93,
94
],
[
96,
97
],
[
99,
100
],
[
105,
103
],
[
105,
106
],
[
108,
109
]
] | [
"N, A, B = map(int, input().split())\nS = input()\nn_passed = 0\nn_passed_abroad = 1\nfor i, s in enumerate(S):\n res = \"No\"\n if s == 'a':\n if n_passed < A+B:\n res = \"Yes\"\n n_passed += 1\n elif s == 'b':\n if (n_passed < A+B) and (n_passed_abroad <= B):\n res = \"Yes\"\n n_passed += 1\n n_passed_abroad += 1\n\n print(res)",
"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",
"n_passed = 0",
"n_passed",
"0",
"n_passed_abroad = 1",
"n_passed_abroad",
"1",
"for i, s in enumerate(S):\n res = \"No\"\n if s == 'a':\n if n_passed < A+B:\n res = \"Yes\"\n n_passed += 1\n elif s == 'b':\n if (n_passed < A+B) and (n_passed_abroad <= B):\n res = \"Yes\"\n n_passed += 1\n n_passed_abroad += 1\n\n print(res)",
"i",
"s",
"enumerate(S)",
"enumerate",
"S",
"res = \"No\"",
"res",
"\"No\"",
"if s == 'a':\n if n_passed < A+B:\n res = \"Yes\"\n n_passed += 1\n elif s == 'b':\n if (n_passed < A+B) and (n_passed_abroad <= B):\n res = \"Yes\"\n n_passed += 1\n n_passed_abroad += 1\n\n ",
"s == 'a'",
"s",
"'a'",
"if n_passed < A+B:\n res = \"Yes\"\n n_passed += 1\n ",
"n_passed < A+B",
"n_passed",
"A+B",
"A",
"B",
"res = \"Yes\"",
"res",
"\"Yes\"",
"n_passed += 1",
"n_passed",
"1",
"elif s == 'b':\n if (n_passed < A+B) and (n_passed_abroad <= B):\n res = \"Yes\"\n n_passed += 1\n n_passed_abroad += 1\n\n ",
"s == 'b'",
"s",
"'b'",
"if (n_passed < A+B) and (n_passed_abroad <= B):\n res = \"Yes\"\n n_passed += 1\n n_passed_abroad += 1\n\n ",
"(n_passed < A+B) and (n_passed_abroad <= B)",
"n_passed < A+B",
"n_passed",
"A+B",
"A",
"B",
"n_passed_abroad <= B",
"n_passed_abroad",
"B",
"res = \"Yes\"",
"res",
"\"Yes\"",
"n_passed += 1",
"n_passed",
"1",
"n_passed_abroad += 1",
"n_passed_abroad",
"1",
"print(res)",
"print",
"res",
"n_passed += 1",
"1",
"n_passed",
"res = \"Yes\"",
"\"Yes\"",
"res",
"n_passed += 1",
"1",
"n_passed",
"n_passed = 0",
"0",
"n_passed",
"res = \"Yes\"",
"\"Yes\"",
"res",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"S = input()",
"input()",
"S",
"n_passed_abroad = 1",
"1",
"n_passed_abroad",
"res = \"No\"",
"\"No\"",
"res",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"n_passed_abroad += 1",
"1",
"n_passed_abroad"
] | N, A, B = map(int, input().split())
S = input()
n_passed = 0
n_passed_abroad = 1
for i, s in enumerate(S):
res = "No"
if s == 'a':
if n_passed < A+B:
res = "Yes"
n_passed += 1
elif s == 'b':
if (n_passed < A+B) and (n_passed_abroad <= B):
res = "Yes"
n_passed += 1
n_passed_abroad += 1
print(res) |
[
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,
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,
2,
13,
13,
0,
13,
17,
0,
13,
17,
0,
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,
13,
17,
0,
13,
17,
4,
13,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
136,
2
],
[
136,
11
],
[
136,
12
],
[
139,
14
],
[
118,
20
],
[
109,
23
],
[
133,
26
],
[
30,
29
],
[
140,
34
],
[
140,
38
],
[
29,
39
],
[
100,
42
],
[
140,
47
],
[
29,
48
],
[
110,
52
],
[
131,
52
],
[
98,
52
],
[
128,
54
],
[
116,
55
],
[
103,
57
],
[
97,
60
],
[
106,
63
],
[
140,
68
],
[
29,
69
],
[
110,
74
],
[
131,
74
],
[
98,
74
],
[
128,
76
],
[
116,
77
],
[
134,
79
],
[
122,
79
],
[
116,
80
],
[
112,
82
],
[
130,
85
],
[
121,
88
],
[
124,
91
],
[
125,
95
],
[
113,
95
],
[
107,
95
],
[
104,
95
],
[
101,
95
],
[
119,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
106,
107
],
[
109,
110
],
[
112,
113
],
[
136,
116
],
[
118,
119
],
[
121,
122
],
[
124,
125
],
[
136,
128
],
[
130,
131
],
[
133,
134
],
[
136,
137
],
[
139,
140
]
] | [
"N, A, B = map(int, input().split())\nS = list(input())\nans = \"\"\ncnt = 0\nf = 0\n\nfor i in range(len(S)):\n if S[i] == \"c\":\n ans = \"No\"\n elif S[i] == \"a\":\n if cnt < A + B:\n ans = \"Yes\"\n cnt += 1\n else:\n ans = \"No\"\n elif S[i] == \"b\":\n if cnt < A + B and f < B:\n ans = \"Yes\"\n cnt += 1\n f += 1\n else:\n ans = \"No\"\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",
"ans = \"\"",
"ans",
"\"\"",
"cnt = 0",
"cnt",
"0",
"f = 0",
"f",
"0",
"for i in range(len(S)):\n if S[i] == \"c\":\n ans = \"No\"\n elif S[i] == \"a\":\n if cnt < A + B:\n ans = \"Yes\"\n cnt += 1\n else:\n ans = \"No\"\n elif S[i] == \"b\":\n if cnt < A + B and f < B:\n ans = \"Yes\"\n cnt += 1\n f += 1\n else:\n ans = \"No\"\n print(ans)",
"i",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if S[i] == \"c\":\n ans = \"No\"\n elif S[i] == \"a\":\n if cnt < A + B:\n ans = \"Yes\"\n cnt += 1\n else:\n ans = \"No\"\n elif S[i] == \"b\":\n if cnt < A + B and f < B:\n ans = \"Yes\"\n cnt += 1\n f += 1\n else:\n ans = \"No\"\n ",
"S[i] == \"c\"",
"S[i]",
"S",
"i",
"\"c\"",
"ans = \"No\"",
"ans",
"\"No\"",
"elif S[i] == \"a\":\n if cnt < A + B:\n ans = \"Yes\"\n cnt += 1\n else:\n ans = \"No\"\n ",
"S[i] == \"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"if cnt < A + B:\n ans = \"Yes\"\n cnt += 1\n else:\n ans = \"No\"\n ",
"cnt < A + B",
"cnt",
"A + B",
"A",
"B",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"ans = \"No\"",
"ans",
"\"No\"",
"elif S[i] == \"b\":\n if cnt < A + B and f < B:\n ans = \"Yes\"\n cnt += 1\n f += 1\n else:\n ans = \"No\"\n ",
"S[i] == \"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"if cnt < A + B and f < B:\n ans = \"Yes\"\n cnt += 1\n f += 1\n else:\n ans = \"No\"\n ",
"cnt < A + B and f < B",
"cnt < A + B",
"cnt",
"A + B",
"A",
"B",
"f < B",
"f",
"B",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"f += 1",
"f",
"1",
"ans = \"No\"",
"ans",
"\"No\"",
"print(ans)",
"print",
"ans",
"cnt += 1",
"1",
"cnt",
"ans = \"No\"",
"\"No\"",
"ans",
"ans = \"Yes\"",
"\"Yes\"",
"ans",
"ans = \"No\"",
"\"No\"",
"ans",
"cnt = 0",
"0",
"cnt",
"ans = \"Yes\"",
"\"Yes\"",
"ans",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"ans = \"\"",
"\"\"",
"ans",
"f += 1",
"1",
"f",
"ans = \"No\"",
"\"No\"",
"ans",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"cnt += 1",
"1",
"cnt",
"f = 0",
"0",
"f",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"S = list(input())",
"list(input())",
"S"
] | N, A, B = map(int, input().split())
S = list(input())
ans = ""
cnt = 0
f = 0
for i in range(len(S)):
if S[i] == "c":
ans = "No"
elif S[i] == "a":
if cnt < A + B:
ans = "Yes"
cnt += 1
else:
ans = "No"
elif S[i] == "b":
if cnt < A + B and f < B:
ans = "Yes"
cnt += 1
f += 1
else:
ans = "No"
print(ans)
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
13,
13,
13,
13,
0,
13,
4,
18,
4,
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,
4,
13,
17,
0,
13,
2,
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,
2,
13,
17,
0,
13,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
2,
13,
10,
17,
13,
10,
2,
13,
10,
17,
13,
10,
4,
13,
10,
2,
13,
10,
4,
13,
10,
4,
13
] | [
[
119,
2
],
[
119,
16
],
[
119,
17
],
[
110,
19
],
[
107,
26
],
[
101,
29
],
[
33,
32
],
[
117,
35
],
[
111,
39
],
[
32,
40
],
[
108,
44
],
[
105,
44
],
[
114,
44
],
[
120,
46
],
[
96,
47
],
[
113,
52
],
[
108,
54
],
[
105,
54
],
[
114,
54
],
[
111,
62
],
[
32,
63
],
[
108,
68
],
[
105,
68
],
[
114,
68
],
[
120,
70
],
[
96,
71
],
[
102,
73
],
[
99,
73
],
[
96,
74
],
[
104,
79
],
[
108,
81
],
[
105,
81
],
[
114,
81
],
[
98,
84
],
[
102,
86
],
[
99,
86
],
[
119,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
],
[
119,
117
],
[
119,
120
]
] | [
"n,a,b=list(map(int, input().strip().split()))\ns=input().strip()\nx=0\ny=0\nfor i in range(n):\n if s[i]=='a':\n if x<a+b:\n print(\"Yes\")\n x=x+1\n else:\n print(\"No\")\n elif s[i]=='b':\n if x<a+b and y<b:\n print(\"Yes\")\n x=x+1\n y=y+1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"n,a,b=list(map(int, input().strip().split()))",
"n",
"list(map(int, input().strip().split()))",
"list",
"map(int, input().strip().split())",
"map",
"int",
"input().strip().split()",
"().strip().split",
"().strip()",
"().strip",
"()",
"input",
"strip",
"split",
"a",
"b",
"s=input().strip()",
"s",
"input().strip()",
"().strip",
"()",
"input",
"strip",
"x=0",
"x",
"0",
"y=0",
"y",
"0",
"for i in range(n):\n if s[i]=='a':\n if x<a+b:\n print(\"Yes\")\n x=x+1\n else:\n print(\"No\")\n elif s[i]=='b':\n if x<a+b and y<b:\n print(\"Yes\")\n x=x+1\n y=y+1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"range(n)",
"range",
"n",
"if s[i]=='a':\n if x<a+b:\n print(\"Yes\")\n x=x+1\n else:\n print(\"No\")\n elif s[i]=='b':\n if x<a+b and y<b:\n print(\"Yes\")\n x=x+1\n y=y+1\n else:\n print(\"No\")\n else:\n print(\"No\")",
"s[i]=='a'",
"s[i]",
"s",
"i",
"'a'",
"if x<a+b:\n print(\"Yes\")\n x=x+1\n else:\n print(\"No\")\n ",
"x<a+b",
"x",
"a+b",
"a",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"x=x+1",
"x",
"x+1",
"x",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif s[i]=='b':\n if x<a+b and y<b:\n print(\"Yes\")\n x=x+1\n y=y+1\n else:\n print(\"No\")\n ",
"s[i]=='b'",
"s[i]",
"s",
"i",
"'b'",
"if x<a+b and y<b:\n print(\"Yes\")\n x=x+1\n y=y+1\n else:\n print(\"No\")\n ",
"x<a+b and y<b",
"x<a+b",
"x",
"a+b",
"a",
"b",
"y<b",
"y",
"b",
"print(\"Yes\")",
"print",
"\"Yes\"",
"x=x+1",
"x",
"x+1",
"x",
"1",
"y=y+1",
"y",
"y+1",
"y",
"1",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"b=list(map(int, input().strip().split()))",
"list(map(int, input().strip().split()))",
"b",
"y=y+1",
"y+1",
"y",
"y=0",
"0",
"y",
"x=x+1",
"x+1",
"x",
"x=0",
"0",
"x",
"s=input().strip()",
"input().strip()",
"s",
"x=x+1",
"x+1",
"x",
"n,a,b=list(map(int, input().strip().split()))",
"list(map(int, input().strip().split()))",
"n",
"a,b=list(map(int, input().strip().split()))",
"list(map(int, input().strip().split()))",
"a"
] | n,a,b=list(map(int, input().strip().split()))
s=input().strip()
x=0
y=0
for i in range(n):
if s[i]=='a':
if x<a+b:
print("Yes")
x=x+1
else:
print("No")
elif s[i]=='b':
if x<a+b and y<b:
print("Yes")
x=x+1
y=y+1
else:
print("No")
else:
print("No") |
[
7,
0,
13,
4,
18,
4,
13,
17,
13,
17,
41,
28,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
18,
13,
17,
0,
13,
4,
13,
17,
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,
40,
13,
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,
13,
13,
10,
18,
13,
10,
17,
13,
10,
18,
13,
10,
4,
13,
10,
18,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
128,
2
],
[
13,
12
],
[
129,
12
],
[
12,
17
],
[
116,
19
],
[
119,
22
],
[
117,
24
],
[
129,
24
],
[
131,
27
],
[
117,
29
],
[
129,
29
],
[
125,
32
],
[
117,
34
],
[
129,
34
],
[
134,
37
],
[
137,
42
],
[
122,
45
],
[
49,
48
],
[
135,
53
],
[
135,
57
],
[
48,
58
],
[
138,
62
],
[
144,
62
],
[
141,
62
],
[
132,
64
],
[
126,
65
],
[
140,
67
],
[
135,
78
],
[
48,
79
],
[
138,
84
],
[
144,
84
],
[
141,
84
],
[
132,
86
],
[
126,
87
],
[
123,
89
],
[
114,
89
],
[
126,
90
],
[
143,
92
],
[
113,
95
],
[
135,
106
],
[
48,
107
],
[
113,
114
],
[
116,
117
],
[
119,
120
],
[
122,
123
],
[
125,
126
],
[
128,
129
],
[
131,
132
],
[
134,
135
],
[
137,
138
],
[
140,
141
],
[
143,
144
]
] | [
"a = input(\"\").split(\" \")\na = [int(b) for b in a]\nN = a[0]\nA = a[1]\nB = a[2]\nS = input(\"\")\nn = 0\nnb = 1\nfor c in range(len(S)):\n if S[c] == \"a\":\n if n < (A + B):\n n += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"b\":\n if n < (A + B) and nb <= B:\n n += 1\n nb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"c\":\n print(\"No\")",
"a = input(\"\").split(\" \")",
"a",
"input(\"\").split(\" \")",
"(\"\").split",
"(\"\")",
"input",
"\"\"",
"split",
"\" \"",
"int(b) for b in a",
"for b in a",
"b",
"a",
"for b in a",
"int(b)",
"int",
"b",
"a = [int(b) for b in a]",
"a",
"[int(b) for b in a]",
"N = a[0]",
"N",
"a[0]",
"a",
"0",
"A = a[1]",
"A",
"a[1]",
"a",
"1",
"B = a[2]",
"B",
"a[2]",
"a",
"2",
"S = input(\"\")",
"S",
"input(\"\")",
"input",
"\"\"",
"n = 0",
"n",
"0",
"nb = 1",
"nb",
"1",
"for c in range(len(S)):\n if S[c] == \"a\":\n if n < (A + B):\n n += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"b\":\n if n < (A + B) and nb <= B:\n n += 1\n nb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"c\":\n print(\"No\")",
"c",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if S[c] == \"a\":\n if n < (A + B):\n n += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"b\":\n if n < (A + B) and nb <= B:\n n += 1\n nb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n elif S[c] == \"c\":\n print(\"No\")",
"S[c] == \"a\"",
"S[c]",
"S",
"c",
"\"a\"",
"if n < (A + B):\n n += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"n < (A + B)",
"n",
"A + B",
"A",
"B",
"n += 1",
"n",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[c] == \"b\":\n if n < (A + B) and nb <= B:\n n += 1\n nb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"S[c] == \"b\"",
"S[c]",
"S",
"c",
"\"b\"",
"if n < (A + B) and nb <= B:\n n += 1\n nb += 1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"n < (A + B) and nb <= B",
"n < (A + B)",
"n",
"A + B",
"A",
"B",
"nb <= B",
"nb",
"B",
"n += 1",
"n",
"1",
"nb += 1",
"nb",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[c] == \"c\":\n print(\"No\")",
"S[c] == \"c\"",
"S[c]",
"S",
"c",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"nb += 1",
"1",
"nb",
"a = [int(b) for b in a]",
"[int(b) for b in a]",
"a",
"N = a[0]",
"a[0]",
"N",
"nb = 1",
"1",
"nb",
"B = a[2]",
"a[2]",
"B",
"a = input(\"\").split(\" \")",
"input(\"\").split(\" \")",
"a",
"A = a[1]",
"a[1]",
"A",
"S = input(\"\")",
"input(\"\")",
"S",
"n = 0",
"0",
"n",
"n += 1",
"1",
"n",
"n += 1",
"1",
"n"
] | a = input("").split(" ")
a = [int(b) for b in a]
N = a[0]
A = a[1]
B = a[2]
S = input("")
n = 0
nb = 1
for c in range(len(S)):
if S[c] == "a":
if n < (A + B):
n += 1
print("Yes")
else:
print("No")
elif S[c] == "b":
if n < (A + B) and nb <= B:
n += 1
nb += 1
print("Yes")
else:
print("No")
elif S[c] == "c":
print("No") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
0,
13,
39,
0,
13,
17,
28,
13,
13,
4,
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,
40,
2,
4,
13,
13,
17,
13,
4,
13,
17,
0,
13,
17,
4,
18,
13,
13,
13,
4,
13,
17,
4,
13,
17,
10,
17,
13,
10,
17,
13,
10,
39,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
105,
2
],
[
105,
11
],
[
105,
12
],
[
96,
14
],
[
90,
18
],
[
99,
21
],
[
97,
28
],
[
100,
35
],
[
88,
35
],
[
85,
35
],
[
103,
37
],
[
94,
38
],
[
84,
43
],
[
100,
55
],
[
88,
55
],
[
85,
55
],
[
103,
57
],
[
94,
58
],
[
91,
63
],
[
94,
65
],
[
87,
70
],
[
91,
74
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
105,
94
],
[
96,
97
],
[
99,
100
],
[
105,
103
],
[
105,
106
]
] | [
"N,A,B = map(int,input().split())\nS = input()\nf = []\nok = 0\nfor i,s in enumerate(S):\n if s == \"a\":\n if ok < A + B:\n print(\"Yes\")\n ok += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ok < A + B and len(f) + 1 <= B:\n print(\"Yes\")\n ok += 1\n f.append(i)\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",
"f = []",
"f",
"[]",
"ok = 0",
"ok",
"0",
"for i,s in enumerate(S):\n if s == \"a\":\n if ok < A + B:\n print(\"Yes\")\n ok += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ok < A + B and len(f) + 1 <= B:\n print(\"Yes\")\n ok += 1\n f.append(i)\n else:\n print(\"No\")\n else:\n print(\"No\")",
"i",
"s",
"enumerate(S)",
"enumerate",
"S",
"if s == \"a\":\n if ok < A + B:\n print(\"Yes\")\n ok += 1\n else:\n print(\"No\")\n elif s == \"b\":\n if ok < A + B and len(f) + 1 <= B:\n print(\"Yes\")\n ok += 1\n f.append(i)\n else:\n print(\"No\")\n else:\n print(\"No\")",
"s == \"a\"",
"s",
"\"a\"",
"if ok < A + B:\n print(\"Yes\")\n ok += 1\n else:\n print(\"No\")\n ",
"ok < A + B",
"ok",
"A + B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"ok += 1",
"ok",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif s == \"b\":\n if ok < A + B and len(f) + 1 <= B:\n print(\"Yes\")\n ok += 1\n f.append(i)\n else:\n print(\"No\")\n ",
"s == \"b\"",
"s",
"\"b\"",
"if ok < A + B and len(f) + 1 <= B:\n print(\"Yes\")\n ok += 1\n f.append(i)\n else:\n print(\"No\")\n ",
"ok < A + B and len(f) + 1 <= B",
"ok < A + B",
"ok",
"A + B",
"A",
"B",
"len(f) + 1 <= B",
"len(f) + 1",
"len(f)",
"len",
"f",
"1",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"ok += 1",
"ok",
"1",
"f.append(i)",
"f.append",
"f",
"append",
"i",
"print(\"No\")",
"print",
"\"No\"",
"print(\"No\")",
"print",
"\"No\"",
"ok += 1",
"1",
"ok",
"ok += 1",
"1",
"ok",
"f = []",
"[]",
"f",
"B = map(int,input().split())",
"map(int,input().split())",
"B",
"S = input()",
"input()",
"S",
"ok = 0",
"0",
"ok",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"N,A,B = map(int,input().split())",
"map(int,input().split())",
"N"
] | N,A,B = map(int,input().split())
S = input()
f = []
ok = 0
for i,s in enumerate(S):
if s == "a":
if ok < A + B:
print("Yes")
ok += 1
else:
print("No")
elif s == "b":
if ok < A + B and len(f) + 1 <= B:
print("Yes")
ok += 1
f.append(i)
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,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
98,
2
],
[
98,
11
],
[
98,
12
],
[
113,
14
],
[
92,
20
],
[
101,
23
],
[
27,
26
],
[
96,
29
],
[
114,
33
],
[
26,
34
],
[
114,
42
],
[
26,
43
],
[
93,
47
],
[
108,
47
],
[
111,
47
],
[
90,
49
],
[
99,
50
],
[
110,
55
],
[
114,
63
],
[
26,
64
],
[
93,
69
],
[
108,
69
],
[
111,
69
],
[
90,
71
],
[
99,
72
],
[
102,
74
],
[
105,
74
],
[
99,
75
],
[
107,
80
],
[
104,
83
],
[
98,
90
],
[
92,
93
],
[
98,
96
],
[
98,
99
],
[
101,
102
],
[
104,
105
],
[
107,
108
],
[
110,
111
],
[
113,
114
]
] | [
"N, A, B = map(int, input().split())\nS = str(input())\n\ncount = 0\ncount_B = 0\n\nfor n in range(N):\n if S[n] == \"c\":\n print(\"No\")\n \n elif S[n] == \"a\":\n if count < A+B:\n print('Yes')\n count += 1\n else:\n print('No')\n \n elif S[n] == \"b\":\n if count < A+B and count_B < B:\n print('Yes')\n count += 1\n count_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 = str(input())",
"S",
"str(input())",
"str",
"input()",
"input",
"count = 0",
"count",
"0",
"count_B = 0",
"count_B",
"0",
"for n in range(N):\n if S[n] == \"c\":\n print(\"No\")\n \n elif S[n] == \"a\":\n if count < A+B:\n print('Yes')\n count += 1\n else:\n print('No')\n \n elif S[n] == \"b\":\n if count < A+B and count_B < B:\n print('Yes')\n count += 1\n count_B += 1\n else:\n print('No')",
"n",
"range(N)",
"range",
"N",
"if S[n] == \"c\":\n print(\"No\")\n \n elif S[n] == \"a\":\n if count < A+B:\n print('Yes')\n count += 1\n else:\n print('No')\n \n elif S[n] == \"b\":\n if count < A+B and count_B < B:\n print('Yes')\n count += 1\n count_B += 1\n else:\n print('No')",
"S[n] == \"c\"",
"S[n]",
"S",
"n",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif S[n] == \"a\":\n if count < A+B:\n print('Yes')\n count += 1\n else:\n print('No')\n \n ",
"S[n] == \"a\"",
"S[n]",
"S",
"n",
"\"a\"",
"if count < A+B:\n print('Yes')\n count += 1\n else:\n print('No')\n \n ",
"count < A+B",
"count",
"A+B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"count += 1",
"count",
"1",
"print('No')",
"print",
"'No'",
"elif S[n] == \"b\":\n if count < A+B and count_B < B:\n print('Yes')\n count += 1\n count_B += 1\n else:\n print('No')",
"S[n] == \"b\"",
"S[n]",
"S",
"n",
"\"b\"",
"if count < A+B and count_B < B:\n print('Yes')\n count += 1\n count_B += 1\n else:\n print('No')",
"count < A+B and count_B < B",
"count < A+B",
"count",
"A+B",
"A",
"B",
"count_B < B",
"count_B",
"B",
"print('Yes')",
"print",
"'Yes'",
"count += 1",
"count",
"1",
"count_B += 1",
"count_B",
"1",
"print('No')",
"print",
"'No'",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"count = 0",
"0",
"count",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"count_B = 0",
"0",
"count_B",
"count_B += 1",
"1",
"count_B",
"count += 1",
"1",
"count",
"count += 1",
"1",
"count",
"S = str(input())",
"str(input())",
"S"
] | N, A, B = map(int, input().split())
S = str(input())
count = 0
count_B = 0
for n in range(N):
if S[n] == "c":
print("No")
elif S[n] == "a":
if count < A+B:
print('Yes')
count += 1
else:
print('No')
elif S[n] == "b":
if count < A+B and count_B < B:
print('Yes')
count += 1
count_B += 1
else:
print('No') |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
4,
13,
4,
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,
4,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
97,
2
],
[
97,
11
],
[
97,
12
],
[
73,
14
],
[
76,
22
],
[
91,
25
],
[
29,
28
],
[
74,
28
],
[
28,
33
],
[
77,
36
],
[
86,
36
],
[
95,
36
],
[
80,
38
],
[
89,
39
],
[
94,
41
],
[
28,
50
],
[
77,
53
],
[
86,
53
],
[
95,
53
],
[
80,
55
],
[
89,
56
],
[
92,
58
],
[
83,
58
],
[
89,
59
],
[
85,
61
],
[
82,
64
],
[
73,
74
],
[
76,
77
],
[
97,
80
],
[
82,
83
],
[
85,
86
],
[
97,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
]
] | [
"# B - Qualification simulator\n\nN, A, B = map(int, input().split())\nS = list(str(input()))\n\ntotal = 0\ntotal_B = 0\nfor s in S:\n if s == 'a' and total < (A + B):\n total += 1\n print('Yes')\n elif s == 'b' and total < (A + B) and total_B < B:\n total += 1\n total_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 = list(str(input()))",
"S",
"list(str(input()))",
"list",
"str(input())",
"str",
"input()",
"input",
"total = 0",
"total",
"0",
"total_B = 0",
"total_B",
"0",
"for s in S:\n if s == 'a' and total < (A + B):\n total += 1\n print('Yes')\n elif s == 'b' and total < (A + B) and total_B < B:\n total += 1\n total_B += 1\n print('Yes')\n else:\n print('No') ",
"s",
"S",
"if s == 'a' and total < (A + B):\n total += 1\n print('Yes')\n elif s == 'b' and total < (A + B) and total_B < B:\n total += 1\n total_B += 1\n print('Yes')\n else:\n print('No') ",
"s == 'a' and total < (A + B)",
"s == 'a'",
"s",
"'a'",
"total < (A + B)",
"total",
"A + B",
"A",
"B",
"total += 1",
"total",
"1",
"print('Yes')",
"print",
"'Yes'",
"elif s == 'b' and total < (A + B) and total_B < B:\n total += 1\n total_B += 1\n print('Yes')\n ",
"s == 'b' and total < (A + B) and total_B < B",
"s == 'b' and total < (A + B)",
"s == 'b'",
"s",
"'b'",
"total < (A + B)",
"total",
"A + B",
"A",
"B",
"total_B < B",
"total_B",
"B",
"total += 1",
"total",
"1",
"total_B += 1",
"total_B",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"S = list(str(input()))",
"list(str(input()))",
"S",
"total = 0",
"0",
"total",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"total_B += 1",
"1",
"total_B",
"total += 1",
"1",
"total",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"total_B = 0",
"0",
"total_B",
"total += 1",
"1",
"total",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N"
] | # B - Qualification simulator
N, A, B = map(int, input().split())
S = list(str(input()))
total = 0
total_B = 0
for s in S:
if s == 'a' and total < (A + B):
total += 1
print('Yes')
elif s == 'b' and total < (A + B) and total_B < B:
total += 1
total_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,
17,
28,
13,
13,
14,
2,
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,
0,
13,
17,
4,
13,
17,
4,
13,
17,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13
] | [
[
87,
2
],
[
87,
11
],
[
87,
12
],
[
90,
14
],
[
81,
18
],
[
84,
21
],
[
25,
24
],
[
91,
24
],
[
82,
28
],
[
73,
28
],
[
76,
28
],
[
70,
30
],
[
79,
31
],
[
24,
34
],
[
75,
40
],
[
24,
45
],
[
85,
48
],
[
67,
48
],
[
79,
49
],
[
72,
54
],
[
66,
57
],
[
66,
67
],
[
87,
70
],
[
72,
73
],
[
75,
76
],
[
87,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
]
] | [
"N, A, B = map(int, input().split())\nS = input()\n\nac_count = 0\nac_b_count = 0\nfor s in S:\n if ac_count < A + B:\n if s == 'a':\n print('Yes')\n ac_count += 1\n\n elif s == 'b' and ac_b_count < B:\n print('Yes')\n ac_count += 1\n ac_b_count += 1\n\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",
"ac_count = 0",
"ac_count",
"0",
"ac_b_count = 0",
"ac_b_count",
"0",
"for s in S:\n if ac_count < A + B:\n if s == 'a':\n print('Yes')\n ac_count += 1\n\n elif s == 'b' and ac_b_count < B:\n print('Yes')\n ac_count += 1\n ac_b_count += 1\n\n else:\n print('No')\n else:\n print('No')",
"s",
"S",
"if ac_count < A + B:\n if s == 'a':\n print('Yes')\n ac_count += 1\n\n elif s == 'b' and ac_b_count < B:\n print('Yes')\n ac_count += 1\n ac_b_count += 1\n\n else:\n print('No')\n else:\n print('No')",
"ac_count < A + B",
"ac_count",
"A + B",
"A",
"B",
"if s == 'a':\n print('Yes')\n ac_count += 1\n\n elif s == 'b' and ac_b_count < B:\n print('Yes')\n ac_count += 1\n ac_b_count += 1\n\n else:\n print('No')\n ",
"s == 'a'",
"s",
"'a'",
"print('Yes')",
"print",
"'Yes'",
"ac_count += 1",
"ac_count",
"1",
"elif s == 'b' and ac_b_count < B:\n print('Yes')\n ac_count += 1\n ac_b_count += 1\n\n ",
"s == 'b' and ac_b_count < B",
"s == 'b'",
"s",
"'b'",
"ac_b_count < B",
"ac_b_count",
"B",
"print('Yes')",
"print",
"'Yes'",
"ac_count += 1",
"ac_count",
"1",
"ac_b_count += 1",
"ac_b_count",
"1",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"ac_b_count += 1",
"1",
"ac_b_count",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"ac_count += 1",
"1",
"ac_count",
"ac_count += 1",
"1",
"ac_count",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"ac_count = 0",
"0",
"ac_count",
"ac_b_count = 0",
"0",
"ac_b_count",
"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()
ac_count = 0
ac_b_count = 0
for s in S:
if ac_count < A + B:
if s == 'a':
print('Yes')
ac_count += 1
elif s == 'b' and ac_b_count < B:
print('Yes')
ac_count += 1
ac_b_count += 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,
2,
18,
13,
13,
17,
2,
2,
13,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
14,
2,
2,
2,
18,
13,
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,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13
] | [
[
94,
2
],
[
94,
11
],
[
94,
12
],
[
85,
14
],
[
88,
18
],
[
79,
21
],
[
25,
24
],
[
77,
27
],
[
86,
32
],
[
24,
33
],
[
89,
37
],
[
98,
37
],
[
80,
38
],
[
83,
38
],
[
92,
40
],
[
95,
41
],
[
97,
46
],
[
86,
53
],
[
24,
54
],
[
89,
58
],
[
98,
58
],
[
80,
59
],
[
83,
59
],
[
92,
61
],
[
95,
62
],
[
80,
64
],
[
83,
64
],
[
95,
65
],
[
82,
70
],
[
94,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
94,
92
],
[
94,
95
],
[
97,
98
]
] | [
"num, a ,b = map(int,input().split())\ns = input()\na_cnt = 0\nb_cnt = 0\nfor i in range(num):\n if s[i] == \"a\" and a_cnt + b_cnt < a + b:\n print(\"Yes\")\n a_cnt += 1\n elif s[i] == \"b\" and a_cnt + b_cnt < a + b and b_cnt < b:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")\n",
"num, a ,b = map(int,input().split())",
"num",
"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(num):\n if s[i] == \"a\" and a_cnt + b_cnt < a + b:\n print(\"Yes\")\n a_cnt += 1\n elif s[i] == \"b\" and a_cnt + b_cnt < a + b and b_cnt < b:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")",
"i",
"range(num)",
"range",
"num",
"if s[i] == \"a\" and a_cnt + b_cnt < a + b:\n print(\"Yes\")\n a_cnt += 1\n elif s[i] == \"b\" and a_cnt + b_cnt < a + b and b_cnt < b:\n print(\"Yes\")\n b_cnt += 1\n else:\n print(\"No\")",
"s[i] == \"a\" and a_cnt + b_cnt < a + b",
"s[i] == \"a\"",
"s[i]",
"s",
"i",
"\"a\"",
"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",
"elif s[i] == \"b\" and a_cnt + b_cnt < a + b and b_cnt < b:\n print(\"Yes\")\n b_cnt += 1\n ",
"s[i] == \"b\" and a_cnt + b_cnt < a + b and b_cnt < b",
"s[i] == \"b\" and a_cnt + b_cnt < a + b",
"s[i] == \"b\"",
"s[i]",
"s",
"i",
"\"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\"",
"num, a ,b = map(int,input().split())",
"map(int,input().split())",
"num",
"b_cnt = 0",
"0",
"b_cnt",
"b_cnt += 1",
"1",
"b_cnt",
"s = input()",
"input()",
"s",
"a_cnt = 0",
"0",
"a_cnt",
"a ,b = map(int,input().split())",
"map(int,input().split())",
"a",
"b = map(int,input().split())",
"map(int,input().split())",
"b",
"a_cnt += 1",
"1",
"a_cnt"
] | num, a ,b = map(int,input().split())
s = input()
a_cnt = 0
b_cnt = 0
for i in range(num):
if s[i] == "a" and a_cnt + b_cnt < a + b:
print("Yes")
a_cnt += 1
elif s[i] == "b" and a_cnt + b_cnt < a + b and b_cnt < b:
print("Yes")
b_cnt += 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,
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,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13
] | [
[
95,
2
],
[
95,
13
],
[
95,
14
],
[
77,
16
],
[
80,
20
],
[
83,
23
],
[
27,
26
],
[
78,
26
],
[
26,
31
],
[
81,
34
],
[
72,
34
],
[
93,
34
],
[
75,
36
],
[
87,
37
],
[
92,
42
],
[
26,
48
],
[
81,
51
],
[
72,
51
],
[
93,
51
],
[
75,
53
],
[
87,
54
],
[
84,
56
],
[
90,
56
],
[
87,
57
],
[
71,
62
],
[
89,
65
],
[
71,
72
],
[
95,
75
],
[
77,
78
],
[
80,
81
],
[
83,
84
],
[
95,
87
],
[
89,
90
],
[
92,
93
],
[
95,
96
]
] | [
"n,a,b = list(map(int, input().split()))\ns = input()\nsuccess = 0\nsuccess_b = 0\nfor S in s:\n if S == 'a' and success < a + b:\n print('Yes')\n success += 1\n elif S == 'b' and success < a + b and success_b < b:\n print('Yes')\n success += 1\n success_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",
"success = 0",
"success",
"0",
"success_b = 0",
"success_b",
"0",
"for S in s:\n if S == 'a' and success < a + b:\n print('Yes')\n success += 1\n elif S == 'b' and success < a + b and success_b < b:\n print('Yes')\n success += 1\n success_b += 1\n else:\n print('No')",
"S",
"s",
"if S == 'a' and success < a + b:\n print('Yes')\n success += 1\n elif S == 'b' and success < a + b and success_b < b:\n print('Yes')\n success += 1\n success_b += 1\n else:\n print('No')",
"S == 'a' and success < a + b",
"S == 'a'",
"S",
"'a'",
"success < a + b",
"success",
"a + b",
"a",
"b",
"print('Yes')",
"print",
"'Yes'",
"success += 1",
"success",
"1",
"elif S == 'b' and success < a + b and success_b < b:\n print('Yes')\n success += 1\n success_b += 1\n ",
"S == 'b' and success < a + b and success_b < b",
"S == 'b' and success < a + b",
"S == 'b'",
"S",
"'b'",
"success < a + b",
"success",
"a + b",
"a",
"b",
"success_b < b",
"success_b",
"b",
"print('Yes')",
"print",
"'Yes'",
"success += 1",
"success",
"1",
"success_b += 1",
"success_b",
"1",
"print('No')",
"print",
"'No'",
"success += 1",
"1",
"success",
"a,b = list(map(int, input().split()))",
"list(map(int, input().split()))",
"a",
"s = input()",
"input()",
"s",
"success = 0",
"0",
"success",
"success_b = 0",
"0",
"success_b",
"b = list(map(int, input().split()))",
"list(map(int, input().split()))",
"b",
"success_b += 1",
"1",
"success_b",
"success += 1",
"1",
"success",
"n,a,b = list(map(int, input().split()))",
"list(map(int, input().split()))",
"n"
] | n,a,b = list(map(int, input().split()))
s = input()
success = 0
success_b = 0
for S in s:
if S == 'a' and success < a + b:
print('Yes')
success += 1
elif S == 'b' and success < a + b and success_b < b:
print('Yes')
success += 1
success_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,
28,
13,
4,
13,
4,
13,
13,
14,
2,
2,
18,
13,
13,
17,
2,
2,
13,
13,
2,
13,
13,
0,
13,
17,
4,
13,
17,
14,
2,
2,
2,
18,
13,
13,
17,
2,
2,
13,
13,
2,
13,
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,
4,
13,
10,
4,
13
] | [
[
96,
2
],
[
96,
11
],
[
96,
12
],
[
99,
14
],
[
84,
18
],
[
81,
21
],
[
25,
24
],
[
100,
29
],
[
100,
34
],
[
24,
35
],
[
85,
39
],
[
91,
39
],
[
82,
40
],
[
88,
40
],
[
79,
42
],
[
97,
43
],
[
90,
45
],
[
100,
55
],
[
24,
56
],
[
85,
60
],
[
91,
60
],
[
82,
61
],
[
88,
61
],
[
79,
63
],
[
97,
64
],
[
82,
66
],
[
88,
66
],
[
97,
67
],
[
87,
69
],
[
96,
79
],
[
81,
82
],
[
84,
85
],
[
87,
88
],
[
90,
91
],
[
96,
94
],
[
96,
97
],
[
99,
100
]
] | [
"N,A,B = map(int,input().split())\nS = input()\ncountA = 0\ncountB = 0\n\nfor i in range(len(S)):\n if S[i] == 'a' and countA + countB < A + B:\n countA += 1\n print('Yes')\n elif S[i] == 'b' and countA + countB < A + B and countB < B:\n countB += 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(len(S)):\n if S[i] == 'a' and countA + countB < A + B:\n countA += 1\n print('Yes')\n elif S[i] == 'b' and countA + countB < A + B and countB < B:\n countB += 1\n print('Yes')\n else:\n print('No')",
"i",
"range(len(S))",
"range",
"len(S)",
"len",
"S",
"if S[i] == 'a' and countA + countB < A + B:\n countA += 1\n print('Yes')\n elif S[i] == 'b' and countA + countB < A + B and countB < B:\n countB += 1\n print('Yes')\n else:\n print('No')",
"S[i] == 'a' and countA + countB < A + B",
"S[i] == 'a'",
"S[i]",
"S",
"i",
"'a'",
"countA + countB < A + B",
"countA + countB",
"countA",
"countB",
"A + B",
"A",
"B",
"countA += 1",
"countA",
"1",
"print('Yes')",
"print",
"'Yes'",
"elif S[i] == 'b' and countA + countB < A + B and countB < B:\n countB += 1\n print('Yes')\n ",
"S[i] == 'b' and countA + countB < A + B and countB < B",
"S[i] == 'b' and countA + countB < A + B",
"S[i] == 'b'",
"S[i]",
"S",
"i",
"'b'",
"countA + countB < A + B",
"countA + countB",
"countA",
"countB",
"A + B",
"A",
"B",
"countB < B",
"countB",
"B",
"countB += 1",
"countB",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"A,B = map(int,input().split())",
"map(int,input().split())",
"A",
"countB = 0",
"0",
"countB",
"countA = 0",
"0",
"countA",
"countB += 1",
"1",
"countB",
"countA += 1",
"1",
"countA",
"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"
] | N,A,B = map(int,input().split())
S = input()
countA = 0
countB = 0
for i in range(len(S)):
if S[i] == 'a' and countA + countB < A + B:
countA += 1
print('Yes')
elif S[i] == 'b' and countA + countB < A + B and countB < B:
countB += 1
print('Yes')
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,
4,
13,
13,
14,
2,
2,
13,
17,
2,
13,
2,
13,
13,
0,
13,
17,
4,
13,
17,
9,
14,
2,
13,
17,
0,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
0,
13,
17,
4,
13,
17,
9,
4,
13,
17,
10,
4,
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
] | [
[
100,
2
],
[
100,
11
],
[
100,
12
],
[
76,
14
],
[
79,
20
],
[
94,
23
],
[
77,
30
],
[
80,
37
],
[
83,
37
],
[
89,
37
],
[
98,
39
],
[
101,
40
],
[
88,
42
],
[
91,
53
],
[
80,
58
],
[
83,
58
],
[
89,
58
],
[
98,
60
],
[
101,
61
],
[
92,
63
],
[
95,
63
],
[
101,
64
],
[
82,
66
],
[
76,
77
],
[
79,
80
],
[
82,
83
],
[
100,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
100,
98
],
[
100,
101
]
] | [
"N, A, B = map(int, input().split())\nS = list(input())\n\nanswer = 0\nb_list = 0\nfor idx, moji in enumerate(S):\n if moji == \"a\" and answer < A + B:\n answer += 1\n print(\"Yes\")\n continue\n elif moji == \"b\":\n b_list += 1\n if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\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 = list(input())",
"S",
"list(input())",
"list",
"input()",
"input",
"answer = 0",
"answer",
"0",
"b_list = 0",
"b_list",
"0",
"for idx, moji in enumerate(S):\n if moji == \"a\" and answer < A + B:\n answer += 1\n print(\"Yes\")\n continue\n elif moji == \"b\":\n b_list += 1\n if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\n continue\n print(\"No\")",
"idx",
"moji",
"enumerate(S)",
"enumerate",
"S",
"if moji == \"a\" and answer < A + B:\n answer += 1\n print(\"Yes\")\n continue\n elif moji == \"b\":\n b_list += 1\n if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\n continue\n ",
"moji == \"a\" and answer < A + B",
"moji == \"a\"",
"moji",
"\"a\"",
"answer < A + B",
"answer",
"A + B",
"A",
"B",
"answer += 1",
"answer",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"continue",
"elif moji == \"b\":\n b_list += 1\n if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\n continue\n ",
"moji == \"b\"",
"moji",
"\"b\"",
"b_list += 1",
"b_list",
"1",
"if answer < A + B and b_list <= B:\n answer += 1\n print(\"Yes\")\n continue\n ",
"answer < A + B and b_list <= B",
"answer < A + B",
"answer",
"A + B",
"A",
"B",
"b_list <= B",
"b_list",
"B",
"answer += 1",
"answer",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"continue",
"print(\"No\")",
"print",
"\"No\"",
"S = list(input())",
"list(input())",
"S",
"answer = 0",
"0",
"answer",
"answer += 1",
"1",
"answer",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"answer += 1",
"1",
"answer",
"b_list += 1",
"1",
"b_list",
"b_list = 0",
"0",
"b_list",
"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 = list(input())
answer = 0
b_list = 0
for idx, moji in enumerate(S):
if moji == "a" and answer < A + B:
answer += 1
print("Yes")
continue
elif moji == "b":
b_list += 1
if answer < A + B and b_list <= B:
answer += 1
print("Yes")
continue
print("No")
|
[
7,
12,
13,
0,
13,
4,
18,
4,
18,
4,
13,
13,
13,
17,
13,
13,
0,
13,
39,
4,
13,
13,
4,
13,
13,
4,
13,
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,
14,
2,
2,
13,
13,
2,
13,
13,
0,
13,
2,
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,
2,
13,
17,
4,
13,
17,
4,
13,
17,
4,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
14
],
[
5,
15
],
[
18,
17
],
[
4,
21
],
[
17,
21
],
[
14,
24
],
[
28,
24
],
[
15,
27
],
[
18,
28
],
[
18,
29
],
[
32,
31
],
[
39,
38
],
[
42,
41
],
[
45,
44
],
[
31,
49
],
[
31,
53
],
[
44,
54
],
[
38,
59
],
[
65,
59
],
[
41,
60
],
[
94,
60
],
[
28,
62
],
[
14,
62
],
[
29,
63
],
[
15,
63
],
[
66,
65
],
[
38,
67
],
[
65,
67
],
[
31,
78
],
[
44,
79
],
[
38,
85
],
[
65,
85
],
[
41,
86
],
[
94,
86
],
[
28,
88
],
[
14,
88
],
[
29,
89
],
[
15,
89
],
[
41,
91
],
[
94,
91
],
[
29,
92
],
[
15,
92
],
[
95,
94
],
[
41,
96
],
[
94,
96
],
[
111,
108
]
] | [
"\ndef resolve():\n n, a, b = input().strip().split(' ')\n n, a, b = [int(n), int(a), int(b)]\n s = input().strip()\n a_passed = 0\n b_passed = 0\n for i in range(len(s)):\n if s[i] == 'a':\n if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')\nresolve()",
"def resolve():\n n, a, b = input().strip().split(' ')\n n, a, b = [int(n), int(a), int(b)]\n s = input().strip()\n a_passed = 0\n b_passed = 0\n for i in range(len(s)):\n if s[i] == 'a':\n if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"resolve",
"n, a, b = input().strip().split(' ')",
"n",
"input().strip().split(' ')",
"().strip().split",
"().strip()",
"().strip",
"()",
"input",
"strip",
"split",
"' '",
"a",
"b",
"n, a, b = [int(n), int(a), int(b)]",
"n",
"[int(n), int(a), int(b)]",
"int(n)",
"int",
"n",
"int(a)",
"int",
"a",
"int(b)",
"int",
"b",
"a",
"b",
"s = input().strip()",
"s",
"input().strip()",
"().strip",
"()",
"input",
"strip",
"a_passed = 0",
"a_passed",
"0",
"b_passed = 0",
"b_passed",
"0",
"for i in range(len(s)):\n if s[i] == 'a':\n if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 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 a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"s[i] == 'a'",
"s[i]",
"s",
"i",
"'a'",
"if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n ",
"a_passed + b_passed < a + b",
"a_passed + b_passed",
"a_passed",
"b_passed",
"a + b",
"a",
"b",
"a_passed = a_passed + 1",
"a_passed",
"a_passed + 1",
"a_passed",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n ",
"s[i] == 'b'",
"s[i]",
"s",
"i",
"'b'",
"if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n ",
"a_passed + b_passed < a + b and b_passed < b",
"a_passed + b_passed < a + b",
"a_passed + b_passed",
"a_passed",
"b_passed",
"a + b",
"a",
"b",
"b_passed < b",
"b_passed",
"b",
"b_passed = b_passed + 1",
"b_passed",
"b_passed + 1",
"b_passed",
"1",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"print('No')",
"print",
"'No'",
"resolve()",
"resolve",
"def resolve():\n n, a, b = input().strip().split(' ')\n n, a, b = [int(n), int(a), int(b)]\n s = input().strip()\n a_passed = 0\n b_passed = 0\n for i in range(len(s)):\n if s[i] == 'a':\n if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"def resolve():\n n, a, b = input().strip().split(' ')\n n, a, b = [int(n), int(a), int(b)]\n s = input().strip()\n a_passed = 0\n b_passed = 0\n for i in range(len(s)):\n if s[i] == 'a':\n if a_passed + b_passed < a + b:\n a_passed = a_passed + 1\n print('Yes')\n else:\n print('No')\n elif s[i] == 'b':\n if a_passed + b_passed < a + b and b_passed < b:\n b_passed = b_passed + 1\n print('Yes')\n else:\n print('No')\n else:\n print('No')",
"resolve"
] |
def resolve():
n, a, b = input().strip().split(' ')
n, a, b = [int(n), int(a), int(b)]
s = input().strip()
a_passed = 0
b_passed = 0
for i in range(len(s)):
if s[i] == 'a':
if a_passed + b_passed < a + b:
a_passed = a_passed + 1
print('Yes')
else:
print('No')
elif s[i] == 'b':
if a_passed + b_passed < a + b and b_passed < b:
b_passed = b_passed + 1
print('Yes')
else:
print('No')
else:
print('No')
resolve()
|
[
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,
0,
13,
17,
28,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
2,
2,
13,
2,
13,
13,
40,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
13,
17,
14,
2,
13,
2,
13,
13,
4,
13,
17,
0,
13,
17,
4,
13,
17,
17,
10,
17,
13,
10,
17,
13,
10,
13,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
13,
13,
10,
17,
13,
10,
13,
13
] | [
[
4,
3
],
[
3,
12
],
[
112,
14
],
[
112,
16
],
[
112,
17
],
[
103,
19
],
[
88,
23
],
[
109,
26
],
[
104,
33
],
[
89,
48
],
[
92,
48
],
[
101,
48
],
[
107,
50
],
[
95,
51
],
[
110,
53
],
[
98,
53
],
[
95,
54
],
[
97,
59
],
[
100,
62
],
[
89,
73
],
[
92,
73
],
[
101,
73
],
[
107,
75
],
[
95,
76
],
[
91,
81
],
[
88,
89
],
[
91,
92
],
[
112,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
],
[
112,
107
],
[
109,
110
],
[
112,
113
]
] | [
"N,A,B = [ int(i) for i in input().split() ]\nS = input()\n\npassCount = 0\noverseaPassCount = 1\nfor k,v in enumerate(S):\n if v == \"c\":\n print(\"No\")\n elif v == \"b\":\n if passCount<A+B and overseaPassCount<=B :\n print(\"Yes\")\n overseaPassCount += 1\n passCount += 1\n else:\n print(\"No\")\n elif v == \"a\":\n if passCount<A+B :\n print(\"Yes\")\n passCount += 1\n else:\n print(\"No\")\n\n else :\n None\n",
"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",
"N,A,B = [ int(i) for i in input().split() ]",
"N",
"[ int(i) for i in input().split() ]",
"A",
"B",
"S = input()",
"S",
"input()",
"input",
"passCount = 0",
"passCount",
"0",
"overseaPassCount = 1",
"overseaPassCount",
"1",
"for k,v in enumerate(S):\n if v == \"c\":\n print(\"No\")\n elif v == \"b\":\n if passCount<A+B and overseaPassCount<=B :\n print(\"Yes\")\n overseaPassCount += 1\n passCount += 1\n else:\n print(\"No\")\n elif v == \"a\":\n if passCount<A+B :\n print(\"Yes\")\n passCount += 1\n else:\n print(\"No\")\n\n else :\n None",
"k",
"v",
"enumerate(S)",
"enumerate",
"S",
"if v == \"c\":\n print(\"No\")\n elif v == \"b\":\n if passCount<A+B and overseaPassCount<=B :\n print(\"Yes\")\n overseaPassCount += 1\n passCount += 1\n else:\n print(\"No\")\n elif v == \"a\":\n if passCount<A+B :\n print(\"Yes\")\n passCount += 1\n else:\n print(\"No\")\n\n else :\n None",
"v == \"c\"",
"v",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"elif v == \"b\":\n if passCount<A+B and overseaPassCount<=B :\n print(\"Yes\")\n overseaPassCount += 1\n passCount += 1\n else:\n print(\"No\")\n ",
"v == \"b\"",
"v",
"\"b\"",
"if passCount<A+B and overseaPassCount<=B :\n print(\"Yes\")\n overseaPassCount += 1\n passCount += 1\n else:\n print(\"No\")\n ",
"passCount<A+B and overseaPassCount<=B",
"passCount<A+B",
"passCount",
"A+B",
"A",
"B",
"overseaPassCount<=B",
"overseaPassCount",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"overseaPassCount += 1",
"overseaPassCount",
"1",
"passCount += 1",
"passCount",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif v == \"a\":\n if passCount<A+B :\n print(\"Yes\")\n passCount += 1\n else:\n print(\"No\")\n\n ",
"v == \"a\"",
"v",
"\"a\"",
"if passCount<A+B :\n print(\"Yes\")\n passCount += 1\n else:\n print(\"No\")\n\n ",
"passCount<A+B",
"passCount",
"A+B",
"A",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"passCount += 1",
"passCount",
"1",
"print(\"No\")",
"print",
"\"No\"",
"None",
"passCount = 0",
"0",
"passCount",
"passCount += 1",
"1",
"passCount",
"B = [ int(i) for i in input().split() ]",
"[ int(i) for i in input().split() ]",
"B",
"overseaPassCount += 1",
"1",
"overseaPassCount",
"passCount += 1",
"1",
"passCount",
"S = input()",
"input()",
"S",
"A,B = [ int(i) for i in input().split() ]",
"[ int(i) for i in input().split() ]",
"A",
"overseaPassCount = 1",
"1",
"overseaPassCount",
"N,A,B = [ int(i) for i in input().split() ]",
"[ int(i) for i in input().split() ]",
"N"
] | N,A,B = [ int(i) for i in input().split() ]
S = input()
passCount = 0
overseaPassCount = 1
for k,v in enumerate(S):
if v == "c":
print("No")
elif v == "b":
if passCount<A+B and overseaPassCount<=B :
print("Yes")
overseaPassCount += 1
passCount += 1
else:
print("No")
elif v == "a":
if passCount<A+B :
print("Yes")
passCount += 1
else:
print("No")
else :
None
|
[
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,
2,
13,
13,
28,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
2,
13,
13,
4,
18,
13,
13,
17,
0,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
13,
2,
13,
13,
4,
18,
13,
13,
17,
0,
13,
17,
0,
13,
17,
4,
18,
13,
13,
17,
4,
13,
4,
18,
17,
13,
13,
10,
4,
13,
10,
39,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
2,
13
] | [
[
118,
2
],
[
118,
11
],
[
118,
12
],
[
121,
14
],
[
100,
20
],
[
124,
23
],
[
103,
26
],
[
127,
29
],
[
98,
31
],
[
113,
32
],
[
35,
34
],
[
122,
34
],
[
34,
38
],
[
101,
42
],
[
34,
48
],
[
125,
51
],
[
116,
51
],
[
110,
51
],
[
128,
52
],
[
101,
55
],
[
109,
59
],
[
34,
65
],
[
125,
68
],
[
116,
68
],
[
110,
68
],
[
128,
69
],
[
104,
71
],
[
107,
71
],
[
113,
72
],
[
101,
75
],
[
115,
79
],
[
106,
82
],
[
101,
86
],
[
101,
95
],
[
118,
98
],
[
100,
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 = list(input())\n\nresult = []\ncnt = 0\ncnt_b = 0\nlimit = a + b\n\nfor student in s:\n if student == \"c\":\n result.append(\"No\")\n elif (student == \"a\") & (cnt < limit):\n result.append(\"Yes\")\n cnt += 1\n elif (student == \"b\") & (cnt < limit) & (cnt_b < b):\n result.append(\"Yes\")\n cnt += 1\n cnt_b += 1\n else:\n result.append(\"No\")\nprint(\"\\n\".join(result))",
"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",
"result = []",
"result",
"[]",
"cnt = 0",
"cnt",
"0",
"cnt_b = 0",
"cnt_b",
"0",
"limit = a + b",
"limit",
"a + b",
"a",
"b",
"for student in s:\n if student == \"c\":\n result.append(\"No\")\n elif (student == \"a\") & (cnt < limit):\n result.append(\"Yes\")\n cnt += 1\n elif (student == \"b\") & (cnt < limit) & (cnt_b < b):\n result.append(\"Yes\")\n cnt += 1\n cnt_b += 1\n else:\n result.append(\"No\")",
"student",
"s",
"if student == \"c\":\n result.append(\"No\")\n elif (student == \"a\") & (cnt < limit):\n result.append(\"Yes\")\n cnt += 1\n elif (student == \"b\") & (cnt < limit) & (cnt_b < b):\n result.append(\"Yes\")\n cnt += 1\n cnt_b += 1\n else:\n result.append(\"No\")",
"student == \"c\"",
"student",
"\"c\"",
"result.append(\"No\")",
"result.append",
"result",
"append",
"\"No\"",
"elif (student == \"a\") & (cnt < limit):\n result.append(\"Yes\")\n cnt += 1\n ",
"(student == \"a\") & (cnt < limit)",
"student == \"a\"",
"student",
"\"a\"",
"cnt < limit",
"cnt",
"limit",
"result.append(\"Yes\")",
"result.append",
"result",
"append",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"elif (student == \"b\") & (cnt < limit) & (cnt_b < b):\n result.append(\"Yes\")\n cnt += 1\n cnt_b += 1\n ",
"(student == \"b\") & (cnt < limit) & (cnt_b < b)",
"(student == \"b\") & (cnt < limit)",
"student == \"b\"",
"student",
"\"b\"",
"cnt < limit",
"cnt",
"limit",
"cnt_b < b",
"cnt_b",
"b",
"result.append(\"Yes\")",
"result.append",
"result",
"append",
"\"Yes\"",
"cnt += 1",
"cnt",
"1",
"cnt_b += 1",
"cnt_b",
"1",
"result.append(\"No\")",
"result.append",
"result",
"append",
"\"No\"",
"print(\"\\n\".join(result))",
"print",
"\"\\n\".join(result)",
"\"\\n\".join",
"\"\\n\"",
"join",
"result",
"a, b = map(int, input().split())",
"map(int, input().split())",
"a",
"result = []",
"[]",
"result",
"cnt_b = 0",
"0",
"cnt_b",
"cnt_b += 1",
"1",
"cnt_b",
"cnt += 1",
"1",
"cnt",
"b = map(int, input().split())",
"map(int, input().split())",
"b",
"cnt += 1",
"1",
"cnt",
"n, a, b = map(int, input().split())",
"map(int, input().split())",
"n",
"s = list(input())",
"list(input())",
"s",
"cnt = 0",
"0",
"cnt",
"limit = a + b",
"a + b",
"limit"
] | n, a, b = map(int, input().split())
s = list(input())
result = []
cnt = 0
cnt_b = 0
limit = a + b
for student in s:
if student == "c":
result.append("No")
elif (student == "a") & (cnt < limit):
result.append("Yes")
cnt += 1
elif (student == "b") & (cnt < limit) & (cnt_b < b):
result.append("Yes")
cnt += 1
cnt_b += 1
else:
result.append("No")
print("\n".join(result)) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
31,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
0,
13,
17,
14,
2,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
13,
10,
4,
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,
17,
13,
10,
17,
13
] | [
[
79,
2
],
[
79,
11
],
[
79,
12
],
[
16,
14
],
[
91,
19
],
[
82,
22
],
[
26,
25
],
[
70,
28
],
[
92,
32
],
[
95,
32
],
[
74,
32
],
[
68,
34
],
[
77,
35
],
[
25,
38
],
[
97,
41
],
[
73,
44
],
[
25,
49
],
[
83,
52
],
[
89,
52
],
[
77,
53
],
[
85,
55
],
[
94,
58
],
[
88,
61
],
[
86,
65
],
[
98,
65
],
[
71,
65
],
[
79,
68
],
[
70,
71
],
[
73,
74
],
[
79,
77
],
[
79,
80
],
[
82,
83
],
[
85,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
]
] | [
"N,A,B = map(int, input().split())\n*S, = input()\n\ncount = 0\nbi = 0\nfor s in S:\n ans = 'No'\n if count < A+B:\n if s == 'a':\n ans = 'Yes'\n count += 1\n if s == 'b' and bi < B:\n ans = 'Yes'\n count += 1\n bi += 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, = input()",
"*S",
"S",
"input()",
"input",
"count = 0",
"count",
"0",
"bi = 0",
"bi",
"0",
"for s in S:\n ans = 'No'\n if count < A+B:\n if s == 'a':\n ans = 'Yes'\n count += 1\n if s == 'b' and bi < B:\n ans = 'Yes'\n count += 1\n bi += 1\n print(ans)",
"s",
"S",
"ans = 'No'",
"ans",
"'No'",
"if count < A+B:\n if s == 'a':\n ans = 'Yes'\n count += 1\n if s == 'b' and bi < B:\n ans = 'Yes'\n count += 1\n bi += 1\n ",
"count < A+B",
"count",
"A+B",
"A",
"B",
"if s == 'a':\n ans = 'Yes'\n count += 1\n ",
"s == 'a'",
"s",
"'a'",
"ans = 'Yes'",
"ans",
"'Yes'",
"count += 1",
"count",
"1",
"if s == 'b' and bi < B:\n ans = 'Yes'\n count += 1\n bi += 1\n ",
"s == 'b' and bi < B",
"s == 'b'",
"s",
"'b'",
"bi < B",
"bi",
"B",
"ans = 'Yes'",
"ans",
"'Yes'",
"count += 1",
"count",
"1",
"bi += 1",
"bi",
"1",
"print(ans)",
"print",
"ans",
"A,B = map(int, input().split())",
"map(int, input().split())",
"A",
"ans = 'No'",
"'No'",
"ans",
"count += 1",
"1",
"count",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"N,A,B = map(int, input().split())",
"map(int, input().split())",
"N",
"bi = 0",
"0",
"bi",
"ans = 'Yes'",
"'Yes'",
"ans",
"bi += 1",
"1",
"bi",
"count = 0",
"0",
"count",
"count += 1",
"1",
"count",
"ans = 'Yes'",
"'Yes'",
"ans"
] | N,A,B = map(int, input().split())
*S, = input()
count = 0
bi = 0
for s in S:
ans = 'No'
if count < A+B:
if s == 'a':
ans = 'Yes'
count += 1
if s == 'b' and bi < B:
ans = 'Yes'
count += 1
bi += 1
print(ans) |
[
7,
15,
13,
12,
13,
12,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
13,
12,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
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,
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,
40,
13,
2,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
10,
4,
13,
10,
12,
13,
10,
12,
13,
10,
17,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
12,
13,
10,
17,
13,
10,
4,
13,
10,
12,
13,
10,
4,
13
] | [
[
10,
9
],
[
107,
13
],
[
9,
16
],
[
22,
21
],
[
107,
25
],
[
21,
30
],
[
139,
34
],
[
137,
36
],
[
139,
37
],
[
139,
38
],
[
115,
40
],
[
107,
42
],
[
112,
44
],
[
124,
47
],
[
51,
50
],
[
116,
50
],
[
50,
54
],
[
113,
58
],
[
119,
58
],
[
131,
58
],
[
140,
60
],
[
134,
61
],
[
130,
66
],
[
50,
73
],
[
113,
78
],
[
119,
78
],
[
131,
78
],
[
140,
80
],
[
134,
81
],
[
125,
83
],
[
122,
83
],
[
134,
85
],
[
118,
91
],
[
121,
97
],
[
139,
104
],
[
112,
113
],
[
115,
116
],
[
118,
119
],
[
121,
122
],
[
124,
125
],
[
130,
131
],
[
139,
134
],
[
139,
140
]
] | [
"import sys\ndef rs(): return sys.stdin.readline().rstrip()\ndef ri(): return int(rs())\ndef rs_(): return [_ for _ in rs().split()]\ndef ri_(): return [int(_) for _ in rs().split()]\n\nN, A, B = ri_()\nS = rs()\na = 0\nb = 0\nfor i in S:\n if i == 'a':\n if a < A + B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif i == 'b':\n if a < A + B and b <= B - 1:\n print('Yes')\n a += 1\n else:\n print('No')\n b += 1\n else:\n print('No')",
"import sys",
"sys",
"def rs(): return sys.stdin.readline().rstrip()",
"rs",
"def ri(): return int(rs())",
"ri",
"_ for _ in rs().split()",
"for _ in rs().split()",
"_",
"rs().split()",
"().split",
"()",
"rs",
"split",
"for _ in rs().split()",
"_",
"def rs_(): return [_ for _ in rs().split()]",
"rs_",
"int(_) for _ in rs().split()",
"for _ in rs().split()",
"_",
"rs().split()",
"().split",
"()",
"rs",
"split",
"for _ in rs().split()",
"int(_)",
"int",
"_",
"def ri_(): return [int(_) for _ in rs().split()]",
"ri_",
"N, A, B = ri_()",
"N",
"ri_()",
"ri_",
"A",
"B",
"S = rs()",
"S",
"rs()",
"rs",
"a = 0",
"a",
"0",
"b = 0",
"b",
"0",
"for i in S:\n if i == 'a':\n if a < A + B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif i == 'b':\n if a < A + B and b <= B - 1:\n print('Yes')\n a += 1\n else:\n print('No')\n b += 1\n else:\n print('No')",
"i",
"S",
"if i == 'a':\n if a < A + B:\n print('Yes')\n a += 1\n else:\n print('No')\n elif i == 'b':\n if a < A + B and b <= B - 1:\n print('Yes')\n a += 1\n else:\n print('No')\n b += 1\n else:\n print('No')",
"i == 'a'",
"i",
"'a'",
"if a < A + B:\n print('Yes')\n a += 1\n else:\n print('No')\n ",
"a < A + B",
"a",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"a += 1",
"a",
"1",
"print('No')",
"print",
"'No'",
"elif i == 'b':\n if a < A + B and b <= B - 1:\n print('Yes')\n a += 1\n else:\n print('No')\n b += 1\n ",
"i == 'b'",
"i",
"'b'",
"if a < A + B and b <= B - 1:\n print('Yes')\n a += 1\n else:\n print('No')\n ",
"a < A + B and b <= B - 1",
"a < A + B",
"a",
"A + B",
"A",
"B",
"b <= B - 1",
"b",
"B - 1",
"B",
"1",
"print('Yes')",
"print",
"'Yes'",
"a += 1",
"a",
"1",
"print('No')",
"print",
"'No'",
"b += 1",
"b",
"1",
"print('No')",
"print",
"'No'",
"N, A, B = ri_()",
"ri_()",
"N",
"def rs(): return sys.stdin.readline().rstrip()",
"def rs(): return sys.stdin.readline().rstrip()",
"rs",
"def ri(): return int(rs())",
"def ri(): return int(rs())",
"ri",
"a = 0",
"0",
"a",
"S = rs()",
"rs()",
"S",
"a += 1",
"1",
"a",
"b += 1",
"1",
"b",
"b = 0",
"0",
"b",
"def rs_(): return [_ for _ in rs().split()]",
"def rs_(): return [_ for _ in rs().split()]",
"rs_",
"a += 1",
"1",
"a",
"B = ri_()",
"ri_()",
"B",
"def ri_(): return [int(_) for _ in rs().split()]",
"def ri_(): return [int(_) for _ in rs().split()]",
"ri_",
"A, B = ri_()",
"ri_()",
"A"
] | import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]
N, A, B = ri_()
S = rs()
a = 0
b = 0
for i in S:
if i == 'a':
if a < A + B:
print('Yes')
a += 1
else:
print('No')
elif i == 'b':
if a < A + B and b <= B - 1:
print('Yes')
a += 1
else:
print('No')
b += 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,
4,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
40,
2,
13,
13,
2,
13,
13,
4,
13,
17,
4,
13,
17,
0,
13,
17,
14,
2,
18,
13,
13,
17,
0,
13,
17,
14,
2,
40,
2,
13,
13,
2,
13,
13,
40,
13,
13,
4,
13,
17,
4,
13,
17,
0,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
4,
13,
10,
4,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13,
10,
17,
13
] | [
[
102,
2
],
[
102,
11
],
[
102,
12
],
[
90,
14
],
[
117,
20
],
[
117,
23
],
[
27,
26
],
[
94,
29
],
[
91,
33
],
[
26,
34
],
[
105,
37
],
[
106,
42
],
[
112,
42
],
[
97,
42
],
[
118,
43
],
[
109,
43
],
[
115,
43
],
[
100,
45
],
[
103,
46
],
[
96,
54
],
[
91,
59
],
[
26,
60
],
[
114,
63
],
[
112,
69
],
[
97,
69
],
[
106,
69
],
[
115,
70
],
[
118,
70
],
[
109,
70
],
[
100,
72
],
[
103,
73
],
[
115,
75
],
[
118,
75
],
[
109,
75
],
[
103,
76
],
[
108,
84
],
[
90,
91
],
[
102,
94
],
[
96,
97
],
[
102,
100
],
[
102,
103
],
[
105,
106
],
[
108,
109
],
[
117,
112
],
[
114,
115
],
[
117,
118
]
] | [
"N, A, B = map(int, input().split())\nS = str(input())\na = b = 0\nfor i in range(N):\n \n if S[i] == 'a':\n a += 1\n if a + b <= A + B:\n print('Yes')\n else:\n print('No')\n a -= 1\n elif S[i] == 'b':\n b += 1\n if a + b <= A + B and b <= B:\n print('Yes')\n else:\n print('No')\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 = str(input())",
"S",
"str(input())",
"str",
"input()",
"input",
"a = b = 0",
"a",
"0",
"= b = 0",
"b",
"0",
"for i in range(N):\n \n if S[i] == 'a':\n a += 1\n if a + b <= A + B:\n print('Yes')\n else:\n print('No')\n a -= 1\n elif S[i] == 'b':\n b += 1\n if a + b <= A + B and b <= B:\n print('Yes')\n else:\n print('No')\n b -= 1\n else:\n print('No')",
"i",
"range(N)",
"range",
"N",
"if S[i] == 'a':\n a += 1\n if a + b <= A + B:\n print('Yes')\n else:\n print('No')\n a -= 1\n elif S[i] == 'b':\n b += 1\n if a + b <= A + B and b <= B:\n print('Yes')\n else:\n print('No')\n b -= 1\n else:\n print('No')",
"S[i] == 'a'",
"S[i]",
"S",
"i",
"'a'",
"a += 1",
"a",
"1",
"if a + b <= A + B:\n print('Yes')\n else:\n print('No')\n a -= 1\n ",
"a + b <= A + B",
"a + b",
"a",
"b",
"A + B",
"A",
"B",
"print('Yes')",
"print",
"'Yes'",
"print('No')",
"print",
"'No'",
"a -= 1",
"a",
"1",
"elif S[i] == 'b':\n b += 1\n if a + b <= A + B and b <= B:\n print('Yes')\n else:\n print('No')\n b -= 1\n ",
"S[i] == 'b'",
"S[i]",
"S",
"i",
"'b'",
"b += 1",
"b",
"1",
"if a + b <= A + B and b <= B:\n print('Yes')\n else:\n print('No')\n b -= 1\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'",
"print('No')",
"print",
"'No'",
"b -= 1",
"b",
"1",
"print('No')",
"print",
"'No'",
"S = str(input())",
"str(input())",
"S",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"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",
"a += 1",
"1",
"a",
"b -= 1",
"1",
"b",
"a = b = 0",
"0",
"a",
"b += 1",
"1",
"b",
"b = 0",
"0",
"b"
] | N, A, B = map(int, input().split())
S = str(input())
a = b = 0
for i in range(N):
if S[i] == 'a':
a += 1
if a + b <= A + B:
print('Yes')
else:
print('No')
a -= 1
elif S[i] == 'b':
b += 1
if a + b <= A + B and b <= B:
print('Yes')
else:
print('No')
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,
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,
40,
13,
13,
4,
13,
17,
0,
13,
17,
0,
13,
17,
4,
13,
17,
14,
2,
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
] | [
[
97,
2
],
[
97,
11
],
[
97,
12
],
[
91,
14
],
[
94,
18
],
[
82,
21
],
[
25,
24
],
[
92,
24
],
[
24,
28
],
[
95,
32
],
[
101,
32
],
[
89,
32
],
[
98,
34
],
[
86,
35
],
[
88,
40
],
[
24,
47
],
[
95,
52
],
[
101,
52
],
[
89,
52
],
[
98,
54
],
[
86,
55
],
[
83,
57
],
[
104,
57
],
[
86,
58
],
[
100,
63
],
[
103,
66
],
[
24,
73
],
[
97,
80
],
[
82,
83
],
[
97,
86
],
[
88,
89
],
[
91,
92
],
[
94,
95
],
[
97,
98
],
[
100,
101
],
[
103,
104
]
] | [
"N, A, B = map(int, input().split())\nS = input()\n\ncount_all = 0\nrank_b = 1\nfor c in S:\n if c == \"a\":\n if count_all < (A + B):\n print(\"Yes\")\n count_all += 1\n else:\n print(\"No\")\n elif c == \"b\":\n if count_all < (A + B) and (rank_b <= B):\n print(\"Yes\")\n count_all += 1\n rank_b += 1\n else:\n print(\"No\")\n elif c == \"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",
"count_all = 0",
"count_all",
"0",
"rank_b = 1",
"rank_b",
"1",
"for c in S:\n if c == \"a\":\n if count_all < (A + B):\n print(\"Yes\")\n count_all += 1\n else:\n print(\"No\")\n elif c == \"b\":\n if count_all < (A + B) and (rank_b <= B):\n print(\"Yes\")\n count_all += 1\n rank_b += 1\n else:\n print(\"No\")\n elif c == \"c\":\n print(\"No\")",
"c",
"S",
"if c == \"a\":\n if count_all < (A + B):\n print(\"Yes\")\n count_all += 1\n else:\n print(\"No\")\n elif c == \"b\":\n if count_all < (A + B) and (rank_b <= B):\n print(\"Yes\")\n count_all += 1\n rank_b += 1\n else:\n print(\"No\")\n elif c == \"c\":\n print(\"No\")",
"c == \"a\"",
"c",
"\"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 c == \"b\":\n if count_all < (A + B) and (rank_b <= B):\n print(\"Yes\")\n count_all += 1\n rank_b += 1\n else:\n print(\"No\")\n ",
"c == \"b\"",
"c",
"\"b\"",
"if count_all < (A + B) and (rank_b <= B):\n print(\"Yes\")\n count_all += 1\n rank_b += 1\n else:\n print(\"No\")\n ",
"count_all < (A + B) and (rank_b <= B)",
"count_all < (A + B)",
"count_all",
"A + B",
"A",
"B",
"rank_b <= B",
"rank_b",
"B",
"print(\"Yes\")",
"print",
"\"Yes\"",
"count_all += 1",
"count_all",
"1",
"rank_b += 1",
"rank_b",
"1",
"print(\"No\")",
"print",
"\"No\"",
"elif c == \"c\":\n print(\"No\")",
"c == \"c\"",
"c",
"\"c\"",
"print(\"No\")",
"print",
"\"No\"",
"N, A, B = map(int, input().split())",
"map(int, input().split())",
"N",
"rank_b = 1",
"1",
"rank_b",
"B = map(int, input().split())",
"map(int, input().split())",
"B",
"count_all += 1",
"1",
"count_all",
"S = input()",
"input()",
"S",
"count_all = 0",
"0",
"count_all",
"A, B = map(int, input().split())",
"map(int, input().split())",
"A",
"count_all += 1",
"1",
"count_all",
"rank_b += 1",
"1",
"rank_b"
] | N, A, B = map(int, input().split())
S = input()
count_all = 0
rank_b = 1
for c in S:
if c == "a":
if count_all < (A + B):
print("Yes")
count_all += 1
else:
print("No")
elif c == "b":
if count_all < (A + B) and (rank_b <= B):
print("Yes")
count_all += 1
rank_b += 1
else:
print("No")
elif c == "c":
print("No")
|
[
7,
17,
12,
13,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
18,
4,
13,
39,
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,
29,
4,
13,
10,
12,
13
] | [
[
8,
7
],
[
15,
14
],
[
22,
21
],
[
29,
28
],
[
7,
35
],
[
29,
37
],
[
29,
38
],
[
41,
40
],
[
7,
43
],
[
48,
47
],
[
51,
50
],
[
54,
53
],
[
28,
56
],
[
40,
61
],
[
53,
62
],
[
47,
65
],
[
92,
65
],
[
70,
65
],
[
37,
67
],
[
38,
68
],
[
71,
70
],
[
40,
80
],
[
53,
81
],
[
47,
84
],
[
92,
84
],
[
70,
84
],
[
37,
86
],
[
38,
87
],
[
50,
89
],
[
95,
89
],
[
38,
90
],
[
93,
92
],
[
96,
95
],
[
108,
105
]
] | [
"'''\nCreated on 2020/08/19\n\n@author: harurun\n'''\ndef main():\n import sys\n pin=sys.stdin.readline\n pout=sys.stdout.write\n perr=sys.stderr.write\n\n N,A,B=map(int,pin().split())\n S=pin()[:-1]\n cnt=0\n cn=0\n for i in range(N):\n if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n return \n\nmain()",
"'''\nCreated on 2020/08/19\n\n@author: harurun\n'''",
"def main():\n import sys\n pin=sys.stdin.readline\n pout=sys.stdout.write\n perr=sys.stderr.write\n\n N,A,B=map(int,pin().split())\n S=pin()[:-1]\n cnt=0\n cn=0\n for i in range(N):\n if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n return ",
"main",
"import sys",
"sys",
"pin=sys.stdin.readline",
"pin",
"sys.stdin.readline",
"sys.stdin",
"sys",
"stdin",
"readline",
"pout=sys.stdout.write",
"pout",
"sys.stdout.write",
"sys.stdout",
"sys",
"stdout",
"write",
"perr=sys.stderr.write",
"perr",
"sys.stderr.write",
"sys.stderr",
"sys",
"stderr",
"write",
"N,A,B=map(int,pin().split())",
"N",
"map(int,pin().split())",
"map",
"int",
"pin().split()",
"().split",
"()",
"pin",
"split",
"A",
"B",
"S=pin()[:-1]",
"S",
"pin()[:-1]",
"()",
"pin",
":-1",
"-1",
"cnt=0",
"cnt",
"0",
"cn=0",
"cn",
"0",
"for i in range(N):\n if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"i",
"range(N)",
"range",
"N",
"if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n ",
"S[i]==\"a\" and cnt<A+B",
"S[i]==\"a\"",
"S[i]",
"S",
"i",
"\"a\"",
"cnt<A+B",
"cnt",
"A+B",
"A",
"B",
"cnt+=1",
"cnt",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n ",
"S[i]==\"b\" and cnt<A+B and cn<B",
"S[i]==\"b\" and cnt<A+B",
"S[i]==\"b\"",
"S[i]",
"S",
"i",
"\"b\"",
"cnt<A+B",
"cnt",
"A+B",
"A",
"B",
"cn<B",
"cn",
"B",
"cnt+=1",
"cnt",
"1",
"cn+=1",
"cn",
"1",
"print(\"Yes\")",
"print",
"\"Yes\"",
"print(\"No\")",
"print",
"\"No\"",
"return",
"main()",
"main",
"def main():\n import sys\n pin=sys.stdin.readline\n pout=sys.stdout.write\n perr=sys.stderr.write\n\n N,A,B=map(int,pin().split())\n S=pin()[:-1]\n cnt=0\n cn=0\n for i in range(N):\n if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n return ",
"def main():\n import sys\n pin=sys.stdin.readline\n pout=sys.stdout.write\n perr=sys.stderr.write\n\n N,A,B=map(int,pin().split())\n S=pin()[:-1]\n cnt=0\n cn=0\n for i in range(N):\n if S[i]==\"a\" and cnt<A+B:\n cnt+=1\n print(\"Yes\")\n elif S[i]==\"b\" and cnt<A+B and cn<B:\n cnt+=1\n cn+=1\n print(\"Yes\")\n else:\n print(\"No\")\n return ",
"main"
] | '''
Created on 2020/08/19
@author: harurun
'''
def main():
import sys
pin=sys.stdin.readline
pout=sys.stdout.write
perr=sys.stderr.write
N,A,B=map(int,pin().split())
S=pin()[:-1]
cnt=0
cn=0
for i in range(N):
if S[i]=="a" and cnt<A+B:
cnt+=1
print("Yes")
elif S[i]=="b" and cnt<A+B and cn<B:
cnt+=1
cn+=1
print("Yes")
else:
print("No")
return
main()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.