Problem:


Score : 200 points

Problem Statement

There are N people numbered 1 to N. Each person wears a red hat or a blue hat.

You are given a string s representing the colors of the people. Person i wears a red hat if s_i is R, and a blue hat if s_i is B.

Determine if there are more people wearing a red hat than people wearing a blue hat.

Constraints

1 \leq N \leq 100

|s| = N

s_i is R or B.

Input

Input is given from Standard Input in the following format:

N
s

Output

If there are more people wearing a red hat than there are people wearing a blue hat, print Yes; otherwise, print No.

Sample Input 1

4
RRBR

Sample Output 1

Yes

There are three people wearing a red hat, and one person wearing a blue hat.

Since there are more people wearing a red hat than people wearing a blue hat, the answer is Yes.

Sample Input 2

4
BRBR

Sample Output 2

No

There are two people wearing a red hat, and two people wearing a blue hat.

Since there are as many people wearing a red hat as people wearing a blue hat, the answer is No.



Sample input:
4
RRBR


Sample output:
Yes

Submission status: Runtime Error

Solution code:
input = input()
splited = input.splitlines()
fl = splited[0]
sl = splited[1]
red = "R"
blue = "B"
numred = sl.count(red)
numblue = sl.count(blue)
if int(numred) > numblue:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
input1 = input()
N = int(input1)
input2 = input()
S = list(input2)
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)

Submission status: Runtime Error

Solution code:
N = input()
s = input()

r = 0
b = 0
for s_i in s:
    if s_i == 'R':
	r += 1
    else:
	b += 1

if r > b:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
s = [i for i in input().split()]

red = count('R')
blue = count('B')

if red > blue:
  print('Yes')
else:
  print ('No')

Submission status: Runtime Error

Solution code:
s = input()
r_cnt = 0
b_cnt = 0
for color in s:
  if color == 'R':
    r_cnt += 1
    if r_cnt > (s.length/2):
      print('Yes')
      break
  else:
    b_cnt += 1
    if b_cnt > (s.length/2):
      print('No')
      break
else:
  if r_cnt > b_cnt:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
S = [*input()]
R = S.count("R")
B = S.count("B")
if R>B:
  print("Yes")
elif R==B:
  print("No")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b=input().split()
s=list(b)
x=s.count('R')
y=s.count('B')
if x>y:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
input1 = input()
N = int(input1)
input2 = input()
S = input2

R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)

Submission status: Runtime Error

Solution code:
s = input()
r_cnt = 0
b_cnt = 0
for color in s:
  if color == 'R':
    r_cnt += 1
    if r_cnt > (s.length/2):
      print('Yes')
      break
  else:
    b_cnt += 1
    if b_cnt > (s.length/2):
      print('No')
      break

Submission status: Runtime Error

Solution code:
n=int(input())
sring=input()
cnt=0
for color in string:
  if color == "R":
    cnt += 1
  else:
    cnt += -1

if cnt > 0:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
#s = input().split()
print(s)
r = 0
b = 0
for i in s:
    if i == "R":
        r += 1
    if i == "B":
        b += 1

if r <= b:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N = int(input())
S = input().split("")
R = S.count("R")
B = S.count("B")
if R>B:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
N=int(input())
hats=input()
 
red=0
for hat in range(len(hats)):
   if hat=="R":
      red++
 
if red>N-red:
   print("Yes")
else:
   print("No")

Submission status: Runtime Error

Solution code:
input1 = input()
N = int(input1)
input2 = input()
S = input2
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)

Submission status: Runtime Error

Solution code:
N = int(input())
a = 0
for i in input():
    if(i == R):
        a += 1
print("Yes" if N/2 < a else "No")

Submission status: Runtime Error

Solution code:
n = int(input())
st = input()
i = o
le = len(st)
r = 0
b = 0
while i < le:
  if st[i] == "R":
    r += 1
  else:
    b += 1
  i += 1
if r > b:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
input = input()
N = int(input)
input = input()
S = input
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)

Submission status: Runtime Error

Solution code:
num = int(input())
hats = input()

rhat = len([hat for hat in fats if hat == "R"])
bhat = len([hat for hat in fats if hat == "B"])

if rhat > bhat:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
S = [*input()]
R = S.count("R")
B = S.count("B")
if R>B:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
input = input().split()
N = int(input[0])
S = input[1]
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
if R > B:
  h = 'Yes'
print(h)

Submission status: Runtime Error

Solution code:
    input_lines = input()
    n = int(input_lines)
    input_lines = input()
    r_i = 0
    b_i = 0
    for c in s:
        if c == 'R':
            r_i += 1
        if c == 'B':
            b_i += 1
        
    if r_i > b_i:
        print('Yes')
    else:
        print('No')

Submission status: Runtime Error

Solution code:
input = input().split()
N = int(input[0])
S = input[1]
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
 
if R > B:
  h = 'Yes'
 
print(h)

Submission status: Runtime Error

Solution code:
N=int(input())
hats=list(map(int, input().split()))

red=0
for hat in hats:
   if hat=="R":
      red++

if red>N-red:
   print("Yes")
else:
   print("No")

Submission status: Runtime Error

Solution code:
input = input().split()
N = int(input[0])
S = input(1)

R = 0
B = 0
h = 'No'

for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1

if R > B:
  h = 'Yes'

print(h)

Submission status: Runtime Error

Solution code:
input_lines = input()
n = int(input_lines)
input_lines = input()
r_i = 0
b_i = 0
for c in s:
    if c == 'R':
        r_i += 1
    if c == 'B':
        b_i += 1
    
if r_i > b_i:
    print(''Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
_ = input()
input_string = input()

if input_string.count('R') > input_string.count('B')
    print("Yes")
else:
    print("No")

exit(0)

Submission status: Runtime Error

Solution code:
s = input()
for color in s:

Submission status: Runtime Error

Solution code:
l = int(input())
s = input()
r  = l.count("R")
b = l.count("B")
if (r > b):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = input()
x= input()

count = 0
me = 0
for i in range(n):
  if x[i] == "R":
    count +=1
  else:
    me +=1
    

if count > me:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = int(input())
s = list(input())
r = s.count("R")
if s-r < r:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
n = input()
s = raw_input().strip()
r = 0
for i in xrange(n):
  if s[i] == 'R': r += 1
  else: b += 1

if r > b: print "Yes"
else: print "No"

Submission status: Runtime Error

Solution code:
4
RRBR

Submission status: Runtime Error

Solution code:
n=int(input())
s = str(input())
count=0
for i in range(n):
    if s[i]=='R':
        count+=1
        
if count > n-count:
    printr('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
n=int(input())
s=list(input())
for i in s:
  if 'R'==i:
    cnt+=1
if cnt<n-cnt:
  print('B')
else:
  print('R')

Submission status: Runtime Error

Solution code:
Jupyter Notebook
Untitled
(unsaved changes)
Current Kernel Logo
Python 3 
File
Edit
View
Insert
Cell
Kernel
Widgets
Help

A, B, C = list(map(int, input().split()))

if A == B and B == C:
    re = 'Yes'
else:
    re = 'No'
    
print(re)
A, B, C = list(map(int, input().split()))
​
if A == B and B == C:
    re = 'Yes'
else:
    re = 'No'
    
print(re)
3 4 5
No
1
N = int(input())
s = input()
​
R = 0
B = 0
for c in s:
    if c == 'R':
        R += 1
    else:
        B +=1
        
if R > B:
    re = 'Yes'
else:
    re = 'No'
    
print(re)
4
BRBR
No
​