Problem:


Score : 100 points

Problem Statement

You are given three integers A, B and C.

Determine if there exists an equilateral triangle whose sides have lengths A, B and C.

Constraints

All values in input are integers.

1 \leq A,B,C \leq 100

Input

Input is given from Standard Input in the following format:

A B C

Output

If there exists an equilateral triangle whose sides have lengths A, B and C, print Yes; otherwise, print No.

Sample Input 1

2 2 2

Sample Output 1

Yes

There exists an equilateral triangle whose sides have lengths 2, 2 and 2.

Sample Input 2

3 4 5

Sample Output 2

No

There is no equilateral triangle whose sides have lengths 3, 4 and 5.



Sample input:
2 2 2


Sample output:
Yes

Submission status: Runtime Error

Solution code:
N, Q = (int(i) for i in input().split())  
s = input()
s="!"+s+"?"
spells = [input().split() for _ in range(Q)]
 
masu=[1]*(N+2)
for spell in spells:
   t=spell[0]
   d=spell[1]
   indexes = [i for i, x in enumerate(s) if x == t]
   if d=="R":
      for index in indexes:
         index=index+1
         masu[index]+=masu[index-1]
         masu[index-1]=0
   else:
      for index in indexes:
         masu[index]+=masu[index+1]
         masu[index+1]=0
 
masu.pop(0)
masu.pop(N)
print(sum(masu)-1)

Submission status: Runtime Error

Solution code:
N, Q = (int(i) for i in input().split())  
s = input()
s="!"+s+"?"
spells = [input().split() for _ in range(Q)]
 
masu=[1]*(N+2)
for spell in spells:
   t=spell[0]
   d=spell[1]
   indexes = [i for i, x in enumerate(s) if x == t]
   if d=="R":
      for index in indexes:
         index=index+1
         masu[index]+=masu[index-1]
         masu[index-1]=0
   else:
      for index in indexes:
         masu[index]+=masu[index+1]
         masu[index+1]=0
 
masu.pop(0)
masu.pop(N)
print(sum(masu)+1)

Submission status: Runtime Error

Solution code:
n, q = (int(x) for x in input().split())
s = input().rstrip()

masu_s = []
masu_g = []
for i in range(n):
	masu_s.append(s[i])
	masu_g.append(1)

for i in range(q):
	t, d = input().split()

	count = 0
	for j in range(n):
		if masu_s[j] == t:
			if d == 'R':
				if j == n-1:
					masu_g[j] = 0
				elif masu_g[j] > 0:
					count = masu_g[j]
					masu_g[j+1] += count
					masu_g[j] = 0
			else:
				if j == 0:
					masu_g[j] = 0
				elif masu_g[j] > 0:
					count = masu_g[j]
					masu_g[j-1] += count
					masu_g[j] = 0
			count = 0

for i in masu_g:
	count += i

print(count)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s = input()

cell = [1 for _ in range(N)]
cell_type = {}
for idx, c in enumerate(s):
    if c in cell_type:
        cell_type[c].append(idx)
    else:
        cell_type[c] = [idx]

for _ in range(Q):
    t, d = input().split()
    if t not in cell_type:
        continue
    if d == 'L':
        for i in range(len(cell_type[t])):
            c = cell_type[t][i]
            if c != 0:
                cell[c-1] += cell[c]
            cell[c] = 0
    else:
        for i in range(len(cell_type[t])-1, -1, -1):
            c = cell_type[t][i]
            if c != N - 1:
                cell[c+1] += cell[c]
            cell[c] = 0

ans = 0
for c in cell:
    ans += c
print(ans)

Submission status: Runtime Error

Solution code:
n, q = (int(x) for x in input().split())
s = input().rstrip()

masu_s = []
masu_g = []
for i in range(n):
	masu_s.append(s[i])
	masu_g.append(1)

for i in range(q):
	t, d = input().split()

	count = 0
	for j in range(n):
		if masu_s[j] == t:
			if d == 'R':
				if j == n-1:
					masu_g[j] = 0
				elif masu_g[j] > 0:
					count = masu_g[j]
					masu_g[j+1] += count
					masu_g[j] = 0
			elif d == 'L':
				if j == 0:
					masu_g[j] = 0
				elif masu_g[j] > 0:
					count = masu_g[j]
					masu_g[j-1] += count
					masu_g[j] = 0
			count = 0

for i in masu_g:
	count += i

print(count)

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split())
s=list(input())
g = [1] * (N + 2)
for i in range(Q):
    Point, RL = input().split()
    for j in range(len(s)):
        if Point == s[j]:
            if RL=="L":
                g[j] = g[j] + g[j+1]
                g[j+1] = 0
            else:
                g[j+2] = g[j+2] + g[j+1]
                g[j+1] = 0
            g[0] = 0
            g[N+1] = 0
print(sum(g))

Submission status: Runtime Error

Solution code:
N, Q = map(int, input().split(" "))     # マス数、呪文回数
s = input()   # マス文字
g_list = []
for i in range(len(s)):
    g_list.append([s[i], 1])
s_list = {}
for i in range(len(s)):
    s_list.setdefault(s[i], []).append(i)
sum = len(s)

# 動かす
def move(d, str):
    i = g_list[str][1]
    g_list[str][1] = 0
    if d == "L":
        if str == 0:
            sum -= i
            return
        g_list[str-1][1] += i
    else:
        if str == N-1:
            sum -= i
            return
        g_list[str+1][1] += i
    # print(g_list)


for i in range(Q):
    t, d = list(input().split(" "))
    for str in s_list[t]:
        print(str)
        if g_list[str][0] == t:
            move(d, str)
        else:
            continue

Submission status: Runtime Error

Solution code:
N,Q = map(int, input().split())
s = input()
gorem=[1]*len(s)
t = [input().split(" ") for i in range(Q)]
for i in t:
    tmp=[j for j in range(len(s)) if s[j]==i[0]]
    if i[1]=='L':
        for _ in tmp:
            if _ == 0:
                gorem[_]=0
            else:
                gorem[_-1]+=gorem[_]
                gorem[_]-=gorem[_]
    else:
        for _ in tmp:
            if _ == len(s)-1:
                gorem[_]=0
               
            else:
                gorem[_+1]+=gorem[_]
                gorem[_]-=gorem[_]
print(sum(gorem))

Submission status: Runtime Error

Solution code:
N = int(input())
s = str(input())
red = 0
blue = 0
if "R" in s:
    red += 1
elif "B" in s:
    blue += 1

if red > blue:
    print("Yes")
elif red == blue or red < blue:
    print("No")

Submission status: Runtime Error

Solution code:
N,Q=input().split()
N=int(N)
Q=int(Q)
s=input()
t=['']*Q
d=['']*Q
for i in range(Q):
    t[i],d[i]=input().split()

    
t.reverse()
d.reverse()

golem=set()

for i in range(Q):
    tmp=set()
    for gtmp in golem:
        if gtmp>1:
            if s[gtmp-1]==t[i] and d[i]=='R':
                tmp.add(gtmp-1)
        if gtmp<N-1:
            if s[gtmp+1]==t[i] and d[i]=='L':
                tmp.add(gtmp+1)
    golem=golem.union(tmp)
    if t[i]==s[0] and d[i]=='L':
        golem.add(0)
    elif t[i]==s[-1] and d[i]=='R':
        golem.add(N-1)

        
print(N-len(golem))

Submission status: Runtime Error

Solution code:
N,Q = map(int,input().split()) #Nマス Q呪文回数
s = input()
g_num = [1 for i in range(N)]

def sposi(t):
    s_list = []
    s_size = len(s)
    for ss in range(s_size):
        if s[ss]==t:
            s_list.append(ss)
    return s_list
  
for q in range(Q):
    t,d = map(str,input().split())
    s_posi = sposi(t)
    for k in s_posi:
      	if g_num[k]!=0:
            if k==0 and d=='L':
                g_num[k]-=1
            elif (k==N-1 or k==-1) and d=='R':
                g_num[k]-=1
            elif d=='L':
                g_num[k]-=1
                g_num[k-1]+=1
            elif d=='R':
                g_num[k]-=1
                g_num[k+1]+=1
golem = 0
for i in range(len(g_num)):
    golem+= g_num[i]
print(golem)

Submission status: Runtime Error

Solution code:
n,q=map(int,input().split())
s=list(input())
stage=[1]*n
for i in range(q):
  v = input().split()
  for j in range(n):
    if s[j]==v[0]:
      if v[1]=="L":
        if j!=0:
          stage[j-1]+=stage[j]
        stage[j]=0
      else:
        if j!=n-1:
          stage[j+1]+=stage[j]
        stage[j]=0
print(sum(stage))

Submission status: Runtime Error

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

N1 = int(N)/2

import math
N1= math.ceil(N1)
N1= int(N1)-1

list_s = list(s)
list_s.sort()
X = list_s[N1]

if X=='R':
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

N1 = int(N)/2

import math
N1= math.ceil(N1)
N1= int(N1)-1
print(N1)

list_s = list(s)
list_s.sort()
X = list_s[N1]

if X=='R':
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N, Q = [int(i) for i in input().split()]
g = [1] * N

s = input()
dict = {}
for i in range(N):
  if s[i] not in dict:
    dict[s[i]] = []
  dict[s[i]].append({ "L": i - 1, "R": i + 1, "P": i })

for i in range(Q):
  t_i, d_i = input().split()
  if t_i not in dict:
    continue
  for x in dict[t_i]:
    if x[d_i] < 0:
      g[x["P"]] = 0
      continue
    elif x[d_i] >= N:
      g[x["P"]] = 0
      continue
    else:
      g[x[d_i]] += g[x["P"]]
      g[x["P"]] = 0

print(sum(g))

Submission status: Runtime Error

Solution code:
 def main(A, B, C):
    if(A==B and B==C):
        print("Yes")
    else:
        print("No")
     
 if __name__ == "__main__":
    main(A, B, C)

Submission status: Runtime Error

Solution code:
a, b, c = [int(i) for i in input().split(" ")]
if a == b and b == c
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import numpy as np
N,Q = map(int,input().split(' '))
s = input()
td = [input().split(' ') for i in [0]*Q]

l = np.array([1] * (N+2))

dic = {}

for c in s:
	if not c in dic:
		dic[c] = np.array([i for i,c2 in enumerate(s) if c == c2])

for t,d in td:
	if not t in s:
		continue
	indeces = dic[t]
	if d == 'L':
		ap = l[indeces+1]
		l[indeces+1] = 0
		l[indeces] += ap
	else:
		ap = l[indeces+1]
		l[indeces+1] = 0
		l[indeces+2] += ap

print(sum(l[1:-1]))

Submission status: Runtime Error

Solution code:
N,Q = map(int, input().split())
s = input()
gorem = []
for _ in range(len(s)):
    gorem.append(1)
t = [input().split(" ") for i in range(Q)]
for i in t:
    tmp = []
    for j in range(len(s)):
        if s[j]==i[0]:
            tmp.append(j)
    if i[1]=='L':
        for _ in tmp:
            if _ == 0:
                gorem[_]=0
            else:
                gorem[_-1]+=gorem[_]
                gorem[_]-=gorem[_]
    else:
        for _ in tmp:
            if _ == len(s)-1:
                gorem[_]=0
               
            else:
                gorem[_+1]+=gorem[_]
                gorem[_]-=gorem[_]
                
print(sum(gorem))

Submission status: Runtime Error

Solution code:
anohito  = input("")
binohito = input("")
sinohito = input("")

if anohito == binohito == sinohito :
  print("Yes")

else :
  print('No')

Submission status: Runtime Error

Solution code:
l = []
l= list(map(int,input().split()))

if a == b and a == c
	print("Yes")
else:
  	print("No")

Submission status: Runtime Error

Solution code:
# your code goes here
import numpy as np

n, q = list(map(int, input().split(" ")))
s = input()
ans = np.ones(n)
m = {}
for i in range(len(s)):
	if s[i] in m:
		m[s[i]].append(i)
	else:
		m[s[i]] = [i]

for i in range(q):
	t, d = input().split(" ")
	if not t in m:
		continue
	if d == "L":
		for j in m[t]:
			if j == 0:
				ans[j] = 0
			else:
				ans[j-1] += ans[j]
				ans[j] = 0
	else:
		for j in m[t][::-1]:
			if j == n-1:
				ans[j] = 0
			else:
				ans[j+1] += ans[j]
				ans[j] = 0
				
print(int(np.sum(ans)))

Submission status: Runtime Error

Solution code:
n,q = map(int, input().split())
s = input()
listA = [list(map(str, input().split())) for i in range(q)]
listB =[]
for l in range(n):
    listB.append(1)

def sakana(listC, y):
    if y==0:
        listC[0]=0
    elif y!=0:
        listC[y-1]=listC[y-1]+listC[y]
        listC[y]=0
        
def sakanasan(listD, z):
    if z==n-1 :
        listD[n-1]=0
    elif z!=n-1 :
        listD[z+1]=listD[z+1]+listD[z]
        listD[z]=0

for j in range(q):
    for k in range(n):
        if s[k]==listA[j][0] and listA[j][1]=="L":
            sakana(listB, k)
        elif s[n-1-k]==listA[j][0] and listA[j][1]=="R":
            sakanasan(listB, n-1-k)
print(sum(listB))

Submission status: Runtime Error

Solution code:
score list = [2,2,2]
print “Yes”

Submission status: Runtime Error

Solution code:
import numpy as np

n, q= map(int, input().split())
s = input()

masu = np.ones(n+2)
def my_index_multi(l, x):
    return [i+1 for i, _x in enumerate(l) if _x == x]

for i in range(q):
    t, d = map(str, input().split())
    
    index = my_index_multi(s, t)

    if d == "R":
        tmp = masu[index]
        masu[index] = 0
        t_index = list(map(lambda x: x + 1, index))
        masu[t_index] += tmp
    else:
        tmp = masu[index]
        masu[index] = 0
        t_index = list(map(lambda x: x - 1, index))
        masu[t_index] += tmp       

print(int(np.sum(masu[1:n+1])))

Submission status: Runtime Error

Solution code:
class grid:
    def __init__(self, word):
        self.word = word
        self.has_golem = 1
        self.will_move_golem = 0


def move_golem(text, dir):
    for i in range(n):
        if grids[i].word == text and grids[i].has_golem != 0:
            move_golem = grids[i].has_golem
            grids[i].has_golem = 0
            if(dir == 'L' and i != 0):
                grids[i-1].will_move_golem += move_golem
            if(dir == 'R' and i != n-1):
                grids[i+1].will_move_golem += move_golem
        else:
            continue
    for g in grids:
        g.has_golem += g.will_move_golem
        g.will_move_golem = 0

def answer():
    sum_golem = 0
    for g in grids:
        sum_golem += g.has_golem

    return sum_golem

n, q = map(int, input().split())
s = input()

grids = []
for i in range(n):
    grids.append(grid(s[i]))

for i in range(q):
    text, dir = input().split()
    move_golem(text, dir)

print(answer())

Submission status: Runtime Error

Solution code:

from collections import defaultdict

N, Q = input().split(' ')
N, Q = int(N), int(Q)
S = input().replace('\r', '').replace('\n', '')

char_map = defaultdict(list)
for i, ch in enumerate(S):
    char_map[ch].append(i)
direct_map = {'L': -1, 'R': 1}

gorem_list = [1 for ch in S]
for i in range(Q):
    t, d = input().replace('\r', '').replace('\n', '').split(' ')

    for j in char_map[t]:
        dest = j + direct_map[d]
        if dest >= 0 and dest < N:
            gorem_list[dest] += gorem_list[j]

        gorem_list[j] = 0

print(sum(gorem_list))

Submission status: Runtime Error

Solution code:
def main():
    N, Q = input().split()
    N = int(N)
    Q = int(Q)
    G = [1] * N
    S = input()
    for _ in range(Q):
        t, d = input().split()
        if d == "L":
            # for i in range(0,N):
            for i in range(0,Q):
                if S[i] == t and G[i] > 0:
                    if i == 0:
                        G[i] = 0
                    else:
                        G[i-1] = G[i-1] + G[i]
                        G[i] = 0

        else: # "R"
            # for i in range(N-1,-1,-1):
            for i in range(N-1,N-Q-1,-1):
                if S[i] == t and G[i] > 0:
                    if i == N-1:
                        G[i] = 0
                    else:
                        G[i+1] = G[i+1] + G[i]
                        G[i] = 0
        #print(G)
    print(sum(G))

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:

from collections import defaultdict

N, Q = input().split(' ')
N, Q = int(N), int(Q)
S = input().replace('\r', '').replace('\n', '')

char_map = defaultdict(list)
for i, ch in enumerate(S):
    char_map[ch].append(i)
direct_map = {'L': -1, 'R': 1}

gorem_list = [1 for ch in S]
for i in range(Q):
    t, d = input().replace('\r', '').replace('\n', '').split(' ')

    for j in char_map[t]:
        dest = j + direct_map[d]
        if dest >= 0 and dest < N:
            gorem_list[dest] += gorem_list[j]

        gorem_list[j] = 0


print(sum(gorem_list))

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

if A==B and B==C:
    print("Yes")

else:print("No")

Submission status: Runtime Error

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

char = {}
for i, c in enumerate(s):
    if c not in char.keys():
        char[c] = [i]
    else:
        char[c] = char[c] + [i]

count = [1] * N
out = 0
for _ in range(Q):
    A, L = input().split()
    try:
        idx = char[A]
    except KeyError:
        continue

    if L == "L":
        for ix in idx:
            temp = count[ix]
            count[ix] = 0
            if ix == 0:
                out += temp
            else:
                count[ix - 1] += temp
    else:
        for ix in idx:
            temp = count[ix]
            count[ix] = 0
            if ix == N - 1:
                out += temp
            else:
                count[ix + 1] += temp

print(N - out)

Submission status: Runtime Error

Solution code:
a = input()
b = a.sprit()
if b[0] == b[1]:
     if b[1] == b[2]:
         print('Yes')
     else:
         print('No')
else:
     print('No')

Submission status: Runtime Error

Solution code:
a = input()
a.sprit()
if a[0] == a[1]:
     if a[1] == a[2]:
         print('Yes')
     else:
         print('No')
else:
     print('No')

Submission status: Runtime Error

Solution code:
A = raw_input()
B = raw_input()
C = raw_input()

if(A == B && B == C):
 print “Yes”
else:
 print “No”

Submission status: Runtime Error

Solution code:
A = raw_input()
B = raw_input()
C = raw_input()

if(A == B && B == C):
 print(“Yes”)
else:
 print(“No”)

Submission status: Runtime Error

Solution code:
A = input()
B = input()
C = input()

if(A == B && B == C):
 print(“Yes”)
else:
 print(“No”)

Submission status: Runtime Error

Solution code:
import sys

A, B, C = input().split()

if a == b:
    if a == c:
        print('YES')
        sys.exit()

print('NO')

Submission status: Runtime Error

Solution code:
N, Q  = [int(a) for a in input().split()]
s = input()
s_dict = {c:[] for c in set('ABCDEFGHIJKLMNOPQRSTUVWXYZ')}
for i, c in enumerate(s):
    s_dict[c].append(i+1)
g = [1] * (N+2)

for _ in range(Q):
    row = input()
    c, lr = row.split()
    for i in s_dict[c]:
        mover = g[i]
        g[i] -= mover
        if lr == 'L':
            g[i-1] += mover
        else:
            g[i+1] += mover

print(sum(g[1:-1]))

Submission status: Runtime Error

Solution code:
from collections import defaultdict

N, Q = map(int,input().split())
s = [_ for _ in input()]
td = [[_ for _ in input().split()] for _ in range(Q)]
GOL = [1 for _ in range(N)]

listS = defaultdict(list)
for i, word in enumerate(s):
    listS[word[0]].append(i)

for t, d in td:
    dictS = listS.get(t)
    if dictS == None:
        continue
    for idx in dictS:
        if (idx == 0 and d == "L") or (idx == N - 1 and d == "R"):
            pass
        else:
            if d == "L":
                GOL[idx - 1] += GOL[idx]
            else:
                GOL[idx + 1] += GOL[idx]

        GOL[idx] = 0

print(sum(GOL))

Submission status: Runtime Error

Solution code:
def regtri(a, b, c):
    if a == b && b == c:
        returm 'Yes'
    else:
        return 'No'

a, b, c = (int(i) for i in input().split())
regtri(a, b, c)

Submission status: Runtime Error

Solution code:
input_num = int(input())
input_color = input()
r_num = 0
b_num = 0
for color in input_color:
    if color == "R":
        r_num += 1
    if color == "B":
        b_num += 1
if r_num > b_num:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

t = ["a"]*Q
d = ["b"]*Q
for i in range(Q):
	t[i],d[i] = input().split()
c = [1]*N
flux = [0]*N

for i in range(Q):
	flux = [0]*N
	for j in range(N):
		if s[j] == t[i] and d[i] == "R":
			flux[j] += -c[j]
			if j != N-1:
				flux[j+1] += c[j]
		if s[j] == t[i] and d[i] == "L":
			flux[j] = -c[j]
			if j != 0:
				flux[j-1] += c[j]
	for j in range(N):
		c[j] += flux[j]
	#print(c)
ans = sum(c)
print(ans)

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())
if a==b==c:

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-

nq = input().split()
s = input()
td = []
for i in range(int(nq[1])):
    td.append(input().split())

g_list = [1] * int(nq[0])

for i in range(0, int(nq[1])):
    for j in range(0, int(nq[0])):
        if td[i][0] == s[j]:
            if td[i][1] == 'R':
                if j != int(nq[0]) -1:
                    g_list[j+1] += g_list[j]
                g_list[j] = 0
            else:
                if j != 0:
                    g_list[j-1] += g_list[j]
                g_list[j] = 0
#    print(g_list)

print(sum(g_list))

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
A=int(a)
B=int(b)
C=int(c)

if A=B and B=C and A>0:
    print("Yes")

else:print("No")

Submission status: Runtime Error

Solution code:
def main(A, B, C):
      2     if(A==B && B==C):
      3         print("Yes")
      4     else:
      5         print("No") 
      6     
      7 if __name__ == "__main__":
      8     main(A, B, C)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
A=int(a)
B=int(b)
C=int(c)

if A=B and B=C:
    print("Yes")

else:print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
A=int(a)
B=int(b)
C=int(c)

if A+B>C and A+C>B and B+C>A:
    print("Yes")

else:print("No")

Submission status: Runtime Error

Solution code:
N,Q=map(int, input().split())
s=list(input())
box=[1]*(N+2)
for _ in range(Q):
    k=1
    t,d=map(str, input().split())
    for j in s:
        if t == j:
            if box[k] > 0:
                if d =='L':
                    box[k-1]+=box[k]
                    box[k]=0
                else:
                    box[k+1]+=box[k]
                    box[k]=0
        k+=1
print(sum(box[1:N+1]))

Submission status: Runtime Error

Solution code:
i = int(input())
str = input()
r_count = 0

for color in str:
    if color == 'R':
        r_count+=1

if r_count * 2 > i:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:

ABC = input().split()
list_ABC= list(ABC)
​
if list_ABC[0] == list_ABC[1] and list_ABC[0] == list_ABC[2]:
    print('Yes')
else:
    print('No')
2 2 2

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
if a = b & a = c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
n, q = [int(x) for x in input().split()]
s = input()
td = [input().split() for _ in range(q)]
lo, hi = 0, n-1

for t, d in reversed(td):
    if d == "L" and s[lo] == t:
        lo += 1
    elif d == "R" and s[hi] == t:
        hi -= 1
    if lo >= hi:
        print(0)
        break
else:
    print(hi-lo+1)

Submission status: Runtime Error

Solution code:
a,b,c=map(int.input())
if a==b==c:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
a,b,c=map(int.input())
if a=b=c:
    print("YES")
else:
    print("NO")

Submission status: Runtime Error

Solution code:
N,Q = map(int,input().split(" "))
s_lst = list(input().rstrip())

pos_cnt=[1 for _ in range(N+2)]
c_ind_dict = {c:[] for c in set(s_lst)}
for i,c in enumerate(s_lst):
	c_ind_dict[c].append(i+1)

for _ in range(Q):
	c,d = input().split(" ")
	if c not in c_ind_dict.keys():
		continue
	for ind in  c_ind_dict[c]:
		if d == "L":
			pos_cnt[ind - 1] += pos_cnt[ind]
			pos_cnt[ind] = 0
		else:
			pos_cnt[ind + 1] += pos_cnt[ind]
			pos_cnt[ind] = 0

print(sum(pos_cnt[1:N+1]))

Submission status: Runtime Error

Solution code:
import sys

def main():
    args = sys.argv
    if args[1] == args[2] and args[2] == args[3]:
        print("Yes")
	else:
        print("No")

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split( ))
if A == B & B==C:
        print('Yes')
    else: 
        print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
s = input()
r = 0
b = 0
for cap in s:
    if cap == 'R':
        r+=1
    elif cap == 'B':
        b+=1
if r>b:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
x = A
y = B
z = C

if x == y and y == z:
   print("Yes")
else:
   print("No")

Submission status: Runtime Error

Solution code:
N = int(input())
str =input()

S = str.count("R")
if S > N//2 :
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys

def main():
	args = sys.argv

	if args[1] == args[2] and args[2] == args[3]:
  		print("Yes")
	else:
  		print("No")

if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
a = [int(each) for each in input().split()]

N, Q = a[0], a[1]

s = input()

remains = int(N)

state = [1] * N

for q in range(Q):
    t = input().split()
    # 対象マスを選定
    for i, st in enumerate(s):
        if st == t[0]:
            golems = state[i]
            state[i] = 0
            if i == 0 and t[1] == 'L' or i == int(N) - 1 and t[1] == 'R':
                remains -= golems
            else:
                if t[1] == 'R':
                    state[i + 1] += golems
                else:
                    state[i - 1] += golems
print(remains)

Submission status: Runtime Error

Solution code:
list = [2,2,2]
print “yes”

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())

if A+B>C and A+C>B and B+C>A:
    print("Yes")

else:print("No")

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

if args[1] == args[2] and args[2] == args[3]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
num1 = A
num2 = B
num3 = C

if num1 = num2 = num3:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

if args[1] == args[2] and args[2] == args[3]:
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
a,b,c = input().sprit()
if(a== b == c):
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
if A = B = C:
   print("Yes")
else:
   print("No")

Submission status: Runtime Error

Solution code:
s = map(int, input().strip().split())
if s[2] == s[0] and s[2] == s[1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c = map ( int , input () .split())
if a==b && b==c :
    print ("Yes")
else :
    print ("No")

Submission status: Runtime Error

Solution code:
# # # coding=utf-8
# # # Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


def solve(A, B, C):
    if set([A, B, C]) < 3:
        print 'Yes'
    else:
        print 'N0'

solve(A, B, C)

Submission status: Runtime Error

Solution code:
N = int(input())

num=0

for s in input():
    if s=="R":
        num+=1
    else:
        num-=1

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

Submission status: Runtime Error

Solution code:
a = input()
a.sprit
if a[0] == a[1]:
     if a[1] == a[2]:
         print('Yes')
     else:
         print('No')
else:
     print('No')

Submission status: Runtime Error

Solution code:
A, B, C = (int, input().split())

if A == B == C:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

val = [int(args[1]),int(args[2]),int(args[3])]

for i in val:
    if 1 >= i and i <= 100:
        print('No')
        sys.exit()

if val[0] == val[1] and val[1] == val[2]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())

if a=b and b=c and a=c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())

if a=b and b=c a=c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
a = input()
a.sprit
if a[0] == a[1]:
    if a[1] == a[2]:
        print('yes')
    else:
        print('no')
else:
    print('no')

Submission status: Runtime Error

Solution code:
a,b,c = map(int, input().split())

if a=b=c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
N=int(input())
s=input()
if s.count('R')>s.count('B'):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())

if a == b and b == c:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A,B,C= input().split()

if (A==B) and (B==C):
    print(‘Yes’)
else:
    print(‘No’)

Submission status: Runtime Error

Solution code:
# # # coding=utf-8
# # # Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


def solve(A, B, C):
    if A == B == C
        print 'YES'
    else:
        print 'NO'

solve(A, B, C)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3

s = map(int, input().strip().split())
if s[2] == s[0] and s[2] == s[1]:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
A, B, C = (int, input().split())

if A == B == C :
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

Solution code:
abc=input().split()
if abc[0] == abc[1] and abc[1]==abc[2]
    print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

r = 0
b = 0
for c in s:
    if c = "R":
        r = r + 1
    else:
        b = b + 1
if r > b:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a=b:
  if b=c:
    if a=c:
      print('Yes')
    else:
      print('No')
  else:
    print('No')
else:
  print('No')

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
if A == B and B == C and C == A:
    print(Yes)
print(No)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split())
if a=b=c:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
if A == B:
    if B==C:
        print(‘Yes’)
    else:
        print(‘No’)
else:
    print(‘No’)

Submission status: Runtime Error

Solution code:
a,b,c = input()

if (a == b)  & (b == c) &(c == a):
    print('yes')
else :
    print( 'no')

Submission status: Runtime Error

Solution code:
a,b,c = map(int,input().split())
if a+b>c and a+c>b and b+c>a:
  if a=b=c:
    print('Yes')
  else:
    print('No')

Submission status: Runtime Error

Solution code:
if x[0] == sum(x) / len(x):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

Solution code:
ABC = import()
list_ABC= list(ABC)

A_ = list_ABC[1] + list_ABC[2]
B_ = list_ABC[2] + list_ABC[0]
C_ = list_ABC[0] + list_ABC[1]

if A_>list_ABC[0] and B_>list_ABC[1] and C_>list_ABC[2]:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A, B, C = map(int, input().split())
if A == B and B == C:
    print(Yes)
elif A!=B or B!=C or C!=A:
    print(No)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = int(input())
if A == B and B == C:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
A, B, C = input(int()).split()
if A == B:
    if B==C:
        print(‘Yes’)
    else:
        print(‘No’)
else:
    print(‘No’)

Submission status: Runtime Error

Solution code:
a,b,c=input()

if a == b and b == c:
    print("Yes")
else:
    print("No")