TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()

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


s = input()

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

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
str = input()
if str.count('A') % 2 == 1:
    print('Yes')
else:
    print('No')

str = input()
if str.count('A') == 3 or str.count('A') == 0:
    print('No')
else:
    print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
n,a,b=map(int,input().split())
w='z'*a+'x'*b
f=''
for i in range(1000):
    f+=w
    d=f[:n]
print(d.count('z'))

s=input()
if s =='AAA' or s=='BBB':
    print('No')
else:
    print('Yes')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
def judgeServe(strs: str) -> str:
  if s.count('A') > 0 and s.count('A') < 3:
    return 'Yes'
  else:
    return 'No'

strs = input()
print(judgeServe(strs))
  
    

strs = input()
count_A = strs.count('A')
if count_A > 0 and count_A < 3:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()
 
if S == 'AAA' or 'BBB':
    print('No')
else:
    print('Yes')

if S == AAA or BBB:
    print('No')
else:
    print('Yes')

S = input()
 
if S == 'AAA' or 'BBB':
    print('No')
if S == 'AAB' or 'ABA' or 'ABB' or 'BAA' or 'BBA' or 'BAB':
    print('Yes')

S = input()

if S == AAA or BBB:
    print('No')
else:
    print('Yes')

S = input()
 
if (S == 'AAA') or (S == 'BBB'):
    print('No')
else:
    print('Yes')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()
if s == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')

s = input()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = str(input())
if S[1] + S[2] == 'A':
    print('Yes')
elif S[2] + S[3] == 'B':
    print('Yes')
else:
    print('No')

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

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = str(input())

if S[0] == S[1] == S[2]:
  print("Yes")
else:
  print("No")

i = list(map(int, input().split()))

N = int(i[0])
A = int(i[1])
B = int(i[2])

count_blue = 0

syou = N // (A + B)
amari = N % (A + B)

if amari > A:
    count_blue = A * syou + A
else:
    count_blue = A * syou + amari
   
print(count_blue)

from decimal import *
import math

i = list(map(int, input().split()))
A = Decimal(i[0])
B = Decimal(i[1])

A_min = A // Decimal("0.08")
A_max = math.ceil(Decimal(A + 1) / Decimal("0.08"))
B_min = B // Decimal("0.1")
B_max = math.ceil(Decimal(B+1) / Decimal(0.1))

if A_max < B_min:
    print(-1)
elif A_min > B_max:
    print(-1)
elif A_min < B_min:
    print(B_min)
else:
    print(A_min)

i = list(map(int, input().split()))

N = int(i[0])
A = int(i[1])
B = int(i[2])

count_blue = 0

syou = N // (A + B)
amari = N % (A + B)

if amari > A:
    count_blue = A * syou + A
else:
    count_blue = A * syou + amari
    
count_blue

S = str(input())
 
if S[0] == S[1] == S[2]:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s=input()

if s.count("A")==3 or s.count("B")==3:
	print("Yes")
    
else:
	print("No")

s=input()
 
if s.count("A")==3 or s.count("B")==3:
	print("No")
    
else:
	print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()
if S[0] ==  S[1] ==  S[2]:
  print('Yes')
else:
  print('No')

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

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
A,B=map(int,input().split())
for x in range(10*B,10*B+10):
    if A*100/8<=x<A*100/8+100/8:
        print(x)
        exit()
print("-1")

A,B=map(int,input().split())
for x in range(10*B,10*B+10):
    if A*100/8<=x<=A*100/8+100/8:
        print(x)
        exit()
print("-1")

S=input()
if S=="AAA" or S=="BBB":
    print("No")
else:
    print("Yes")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
# coding: utf-8

s=str(input())

if s=="AAA" or s="BBB":
    print("No")
else:
    print("Yes")

# coding: utf-8

s=str(input())

if s=="AAA" or s=="BBB":
    print("No")
else:
    print("Yes")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
N, A, B = map(int, input().split())

q = int(N / (A+B))
r = N%(A+B)

print(q*A + min(A, r))

S = input()
Q = int(input())
hanten = 1
front = []
back = []
for _ in range(Q):
    q = list(map(str, input().split()))
    if q[0]=='1':
        hanten *= -1
    else:
        if hanten==1:
            if q[1]=='1':
                front.append(q[2])
            else:
                back.append(q[2])
        else:
            if q[1]=='1':
                back.append(q[2])
            else:
                front.append(q[2])


if hanten==1:
    print(''.join(list(reversed(front)) + list(S) + back))
else:
    print(''.join(list(reversed(back+list(S)))+front))

S = input()
Q = int(input())
for _ in range(Q):
    q = list(map(str, input().split()))
    if q[0]=='1':
        list(S).reverse()
        S = ''.join(S)
    else:
        if q[1]=='1':
            S = q[2] + S
        else:
            S = S + q[2]

print(S)

print('Yes' if len(set(input()))==2 else 'No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()
q_number = int(input())
reverse_flag = 1
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    if int(temp[1])*reverse_flag == 1 or int(temp[1])*reverse_flag == -2:
      s = temp[2] + s
    else:
      s = s + temp[2]      
      
if reverse_flag == -1:
  s = s[::-1]
print(s)

s = input()
q_number = int(input())
reverse_flag = 1
head = ""
tail = ""
for i in range(q_number):
  temp = input().split()
  if temp[0] == "1": 
    reverse_flag = reverse_flag * -1
  else:
    headstails = int(temp[1])*reverse_flag 
    if headstails == 1 or headstails == -2:
      head = temp[2] + head
    else:
      tail = tail + temp[2]
      
if reverse_flag == 1:
  print(head+s+tail)
else:
  print(tail[::-1]+s[::-1]+head[::-1])
        
       

s = input()
q_number = int(input())
 
queries = [input().split() for dummy in range(q_number)]
flag = 1
count = 0
for i in range(q_number):
  if queries[i][0] == "1": 
    flag = flag * -1
    count += 1
  else:
    if int(queries[i][1])*flag == 1 or -2:
      s = queries[i][2] + s
    else:
      s = s + queries[i][2]      

      
if flag == -1:
  s = s[::-1]

print(s)

a = input()
if "A" in a and "B" in a:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):

S = input()


list_S = list(S)

AorB = S_list[0]
counter = 0
for i in range(len(S_list)):
  if(AorB == S_list[i]):
    counter =+ 1

if(counter == len(S_list)):
  print("No")
else:
  print("Yes")


S = input()
 

S_list = list(S)
 
AorB = S_list[0]
counter = 0
for i in range(len(S_list)):
  if(AorB == S_list[i]):
    counter = counter + 1
 
if(counter == len(S_list)):
  print("No")
else:
  print("Yes")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()

if S ==  'AAA' or S == 'BBB':
    print('NO')
else:
    print('YES')

n,a,b = map(int, input().split())
m = 0
ans = 0
c = 0

while m < n:
    if c == 0:
        if m + a <= n:
            ans = ans + a
        else:
            ans = ans + n - m
        c = 1
        m = m + a
    else:
        c = 0
        m = m + b
    
print(ans)

S = input()

if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
import random
import numpy as np
A = 1
B = 2
S =[A,B]
x = np.random.choice(S)
y = np.random.choice(S)
z = np.random.choice(S)
if x == y == z:
    print("Yes")
else:
    print("No")

S = input()
if S == str("AAA"):
    print("No")
elif S == str("BBB"):
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()

if S.count('A') or S.count('B') == 3:
    print('No')
else:
    print('Yes')

S = input()

if S.count('A') or S.count('B') == 3:
    print('No')
else:
    print('Yes')

S = input()

if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S=input()
if S=AAA or S=BBB:
  print("No")
else:
  print("Yes")

S=input()
if S="AAA" or S="BBB":
  print("No")
else:
  print("Yes")

S=input()
if S==AAA or S==BBB:
  print("No")
else:
  print("Yes")

S=input()
if S=="AAA" or S=="BBB":
  print("No")
else:
  print("Yes")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()
if s[0] == s[1] and s[1] == s[2]:
    print('Yes')
else:
    print('No')

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

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
a = input()
c = 'No'
for i in range(2):
  if a[i] == a[i+1]:
    c = 'Yes'
    break
print(c)

a = input()
c = 'No'
for i in range(2):
  if a[i] != a[i+1]:
    c = 'Yes'
    break
print(c)

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()

if S=='AAA' or S=='BBB':
  print('Yes')
else:
  print('No')

S = input()

if S=='AAA' or S=='BBB':
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()

if (s=='AAA') or (S=='BBB'):
  print('No')
  exit()
else:
  print('Yes')

s = input()

if (s == 'AAA' ) or (s == 'BBB') :
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = str(input())
print('Yes' if S[2]==S[3] and S[4]==S[5] else 'No')

S = input()

if len(S)==3 and S.count('A')==2 or S.count('B')==2:
    print('Yes')

else:
    print('No')
    

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
if S == 'AAA' or S == 'BBB':
  print('No')
else:
  print('Yes')

S = input()
if S == 'AAA' or S == 'BBB':
  print('No')
else:
  print('Yes')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()

if s[0]==s[1]==s[2]:
  print("Yes")
else:
  print("No")

s = input()

if s[0]==s[1]==s[2]:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()
if (S=="AAA")or(S=="BBB"):
    print("Yes")
else:
    print("No")

S = input()
if (S=="AAA")or(S=="BBB"):
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):

#include <string>
#include <algorithm>
using namespace std;

string S[3];
int N;

for(i=0; i<N; i++) cin >> S[i];
if(S[0] == S[1] == S[2]);
  print("Yes")
else;
  print("No)


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

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S=input('S')
if S[0]==S[1] and S[1]==S[2]:
    print('No')
else:
    print('Yes')

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

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s=input()
if s.count("A")==3 or s.count("B")==3:
    print("Yes")
else:
    print("No")

s=input()
if s.count("A")==3 or s.count("B")==3:
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
from Collections import Counter
s=input()
c=Counter(s)
if(len(c.keys())==1):
  print ("No")
else:
  print ("Yes")

from collections import Counter
s=input()
c=Counter(s)
if(len(c.keys())==1):
    print ("No")
else:
    print ("Yes")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
from collections import deque
S = deque(list(input().strip()))
Q = int(input().strip())
flag = 1
for i in range(Q):
  line = input().strip()
  if len(line) == 1:
    flag = 1 - flag
  else:
    _, F, C = line.strip().split()
    if flag:
      if int(F) == 1:
        S.appendleft(C)
      else:
        S.append(C)
    else:
      if int(F) == 1:
        S.append(C)
      else:
        S.appendleft(C)

if flag:
  print(''.join(S))
else:
  print(''.join(S[::-1]))
    

print('Yes' if len(set(input().strip())) > 1 else 'No')

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = int(input())
if S == "AAA" or S == "BBB":
  print("No")
else:
  print("Yes")

S = input()
if S == "AAA" or S == "BBB":
  print("No")
else:
  print("Yes")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
def fun():
    cin=str(input())
    if cin[1] == cin[2] and cin[0] == cin[1]:
        return False
    else:
        return True
fun()

i = input()
if i=='AAA' or i=='BBB':
  print('no')
else:
  print('yes')

i = input()
if i=='AAA' or i=='BBB':
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
N = input()
if N in 'A' and N in 'B':
  print('Yes')
else:
  print('No')


N = input()
if N in A and N in B:
  print('Yes')
else:
  print('No')

N = input()
if 'A' in N  and 'B' in N:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S = input()
for _ in range(int(input())):
    l = input().split()
    if len(l) == 1:
        S = S[::-1]
    else:
        if l[1] == "1":
            S = l[2] + S
        else:
            S = S + l[2]
print(S)

if len(set(input())) == 1:
    print("No")
else:
    print("Yes")


Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
import sys
A,B = map(int,input().split())
if A<13:
  print(-1)
  sys.exit()
last = 2000

for i in range(last):
  mA = int(i*0.08)
  mB = int(i*0.10)
  print(mA,mB,i)

  
  if mA==A and mB==B:
    print("match")
    print(i)
    break
  if i==last-1:
    print("-1")

s = input()
if s=="AAA" or s=="BBB":
  print("No")
else:
  print("Yes")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
# ABC158
# A Station and Bus
import re
s = input()
x = s[0]
m = re.match(x+x+x,s)
if m:
    print("Yes")
    exit()
print("No")


import re
s = input()
x = s[0]
m = re.match(x+x+x,s)
if m:
    print("No")
    exit()
print("Yes")


Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
N,A,B = map(int,input().split())

Line1 = ("b"*A+"r"*B)
Line2 = ("b"*A+"r"*B)
Cnt = 0
while Cnt < N/(A+B):
	Line2 += Line1
	Cnt += 1

print(Line2[:N].count("b"))


N,A,B = map(int,input().split())
One_line = ""
Line = ("b"*A+"r"*B)
Cnt = 0
while Cnt < N:
	One_line += Line
	Cnt += (A + B)

print(One_line[:N].count("b"))


S = input()
if S == "AAA" or S == "BBB":
	print("No")
else:
	print("Yes")


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()
if s == 'AAA':
	print('Yes')
if s == 'BBB'
	print('Yes')
else:
	print('No')
    


s = input()

if s == 'AAA':
	print('No')
  elif s == 'BBB':
      print('No')
  else:
      print('Yes')


s = input()

if s == 'AAA':
	print('No')
elif s == 'BBB':
	print('No')
else:
	print('Yes')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s = input()
if len(set(s)) == 1:
  print("Yes")
else:
  print("No")


s = input()
if len(set(s)) == 1:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
chaine = input()
repA = 0
repB = 0

for i in chaine:
  if i=='A':
    repA += 1 
  else: 
    repB += 1 

if repB==3 or repA==3:
  print("No")
else:
  print("yes")

chaine = input()
repA = 0
repB = 0

for i in chaine:
  if i=='A':
    repA += 1 
  else: 
    repB += 1 

if repB==3 or repA==3:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
S=str(input())
Q=int(input())
which=0
front=""
back=""
for i in range(Q):
    a=list(map(str,input().split()))
    if a==["1"]:
        which+=1
        which%=2
        continue
    else:
        if which==0:
            if a[1]=="1":
                front=a[2]+front
            if a[1]=="2":
                back+=a[2]
        if which==1:
            if a[1]=="1":
                back+=a[2]
            if a[1]=="2":
                front=a[2]+front
S=front+S+back
if which==1:
    print(S[::-1])
if which==0:
    print(S)

check=str(input())
if check=="AAA" or check=="BBB":
    print("No")
else:
    print("Yes")

Verdicts: Runtime Error

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
n=input()
cnta=0
cntb=0
for e in n:
  if e=="A":
    cnta+=1
  elif e=="B":
    cntb+=1
if cnta==3 or cntb==3:
  print('Yes')
else:
  print('No')

n=input()
cnta=0
cntb=0
for e in n:
  if e=="A":
    cnta+=1
  elif e=="B":
    cntb+=1
if cnta==0 or cntb==0:
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: In AtCoder City, there are three stations numbered 1, 2, and 3.  Each of these stations is operated by one of the two railway companies, A and B. A string S of length 3 represents which company operates each station. If S_i is `A`, Company A operates Station i; if S_i is `B`, Company B operates Station i.  To improve the transportation condition, for each pair of a station operated by Company A and one operated by Company B, there will be a bus service connecting them.  Determine if there is a pair of stations that will be connected by a bus service.

Submission attempts (in order):
s=input()
print("YNeos"[s=="AAA" or s=="BBB"])

s=input()
print("YNeos"[s=="AAA" or s=="BBB"::2])

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
n, a, b = map(int, input().split())
x="b"*a+"r"*b
x= x*(10**100)
strx = x[0:n]
def split(w):
    return [all for all in w]
def countX(lst, x): 
    return lst.count(x) 
listx = split(strx)
print(countX(listx))

n, a, b = map(int, input().split())
x="b"*a+"r"*b
x= x*(10**5)
strx = x[0:n]
def split(w):
    return [all for all in w]
def countX(lst, x): 
    return lst.count(x) 
listx = split(strx)
print(countX(listx))

n,a,b = map(int,input().split())
x = n//(a+b)
if n - x*(a+b) > a:
    Y =a
else:
    Y=n - x*(a+b)
print(a*x+Y)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
N,A,B=map(int,input().split())
if  A==0:
    print(0)
elif N==A+B:
    print(A)
elif N<=A:
    print(N)
else N>A+B:
    print(N-B)

N,A,B=map(int,input().split())
print(N//(A+B)*A+min(N%(A+B),A))

Verdicts: Runtime Error

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
n,a,b=map(int,input().split())
if n-a<=0:
    print(n)
else:
    print(a)


n,a,b=map(int,input().split())
if n%(a+b)<a:
    print((n//(a+b))*a+n%(a+b))
else:
    print(((n//(a+b))*a+a))



Verdicts: Wrong Answer

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
n, blue, red = map(int,input().split())
sum = blue + red
if blue == 0:
    print(0)
    exit()
if sum > n:
    plus = n - sum
    print(blue + plus)


n, blue, red = map(int,input().split())
sum = blue + red

count = n // (blue + red)
amari = n % (blue + red)

if amari > blue:
    amari = blue

print(amari + count * blue)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
n,a,b=map(int,input().split())
x=a+b
r=int(n/x)
if n%x!=0:
	s=a*r+(n%x-b)
else:
  s=a*r
  
print(s)


n, a, b = map(int, input().split())
m = int(n / (a+b))
s=n%(a+b)
if a>=s:
  print(m*a + (n - m * (a+b)))
else:
  print(m*a+a)
  


Verdicts: Wrong Answer

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
n, a, b = map(int, input().split())
print(n, a, b)
balls = str()

while len(balls) < n:
    for i in range(a):
        balls = balls + 'a'
        if len(balls) == n:
            break
    for i in range(b):
        balls = balls + 'b'
        if len(balls) == n:
            break
print(balls.count('a'))


n, a, b = map(int, input().split())
unit = a + b
unitCount = int(n / unit)
rem = int(n % unit)
if rem > a:
    rem = a
print(a * unitCount + rem)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi has many red balls and blue balls. Now, he will place them in a row.  Initially, there is no ball placed.  Takahashi, who is very patient, will do the following operation 10^{100} times:    * Place A blue balls at the end of the row of balls already placed. Then, place B red balls at the end of the row.  How many blue balls will be there among the first N balls in the row of balls made this way?

Submission attempts (in order):
# coding: utf-8

def main()
  n, b, r = map(int, input().split())

  x = n // (b + r)

  if n % (b + r) > b:
      print(x * b + b)

  else:
      print((x * b) + (n % (b + r)))
      

if __name__ == '__main__':
    main()
    

# coding: utf-8

n, b, r = map(int, input().split())

x = n // (b + r)

if n % (b + r) > b:
    print(x * b + b)
   
else:
    print((x * b) + (n % (b + r)))


Verdicts: Runtime Error

Accepted