TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There is a building with n rooms, numbered 1 to n.  We can move from any room to any other room in the building.  Let us call the following event a **move** : a person in some room i goes to another room j~ (i \neq j).  Initially, there was one person in each room in the building.  After that, we know that there were exactly k moves happened up to now.  We are interested in the number of people in each of the n rooms now. How many combinations of numbers of people in the n rooms are possible?  Find the count modulo (10^9 + 7).

Submission attempts (in order):
#input
n, k = map(int, input().split())

#output
mod = pow(10, 9) + 7

def cmb(n, r):
    res = 1
    fac = 1
    for i in range(r):
        res *= (n-i)
        res %= mod
        fac *= (i+1)
        fac %= mod
    return res*pow(fac, mod-2, mod) % mod

if n <= k-1:
    print(cmb(2*n-1, n))
else:
    answer = 0
    for m in range(k+1):
        answer += cmb(n, m)*cmb(n-1, a) % mod

print(answer % mod)

#input
n, k = map(int, input().split())

#output
mod = pow(10, 9) + 7

def cmb(n, r):
    res = 1
    fac = 1
    for i in range(r):
        res *= (n-i)
        res %= mod
        fac *= (i+1)
        fac %= mod
    return res*pow(fac, mod-2, mod) % mod

if n <= k-1:
    print(cmb(2*n-1, m))
else:
    answer = 0
    for m in range(k+1):
        answer += cmb(n, m)*cmb(n-1, a) % mod

print(answer % mod)

#input
n, k = map(int, input().split())

#output
mod = pow(10, 9) + 7

n_ = 4*10**5 + 5
fun = [1]*(n_+1)
for i in range(1,n_+1):
    fun[i] = fun[i-1]*i%mod
rev = [1]*(n_+1)
rev[n_] = pow(fun[n_],mod-2,mod)
for i in range(n_-1,0,-1):
    rev[i] = rev[i+1]*(i+1)%mod
def cmb(n,r):
    if n <= 0 or r < 0 or r > n: return 0
    return fun[n]*rev[r]%mod*rev[n-r]%mod

if n <= k-1:
    print(cmb(2*n-1, n))
else:
    answer = 0
    for m in range(k+1):
        answer += cmb(n, m)*cmb(n-1, m) % mod
        answer %= mod
    print(answer)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There is a building with n rooms, numbered 1 to n.  We can move from any room to any other room in the building.  Let us call the following event a **move** : a person in some room i goes to another room j~ (i \neq j).  Initially, there was one person in each room in the building.  After that, we know that there were exactly k moves happened up to now.  We are interested in the number of people in each of the n rooms now. How many combinations of numbers of people in the n rooms are possible?  Find the count modulo (10^9 + 7).

Submission attempts (in order):
Point = complex


N, *XY = map(int, open(0).read().split())

P = [Point(x, y) for x, y in zip(*[iter(XY)] * 2)]

def max_distance(center):
    return max(abs(center - p) for p in P)

def ternary_search(f, left, right, MAX_ITER=100):
    for _ in range(MAX_ITER):
        m1 = (left * 2 + right) / 3
        m2 = (left + right * 2) / 3
        if f(m1) < f(m2):
            right = m2
        else:
            left = m1
    return f(left)

def g(x):
    return ternary_search(lambda y: max_distance(Point(x, y)), -1000, 1000)

print(ternary_search(g, -1000, 1000))

mod = 10 ** 9 + 7

class ModComb:
    def __init__(self, MAX, mod=10 ** 9 + 7):
        fac = [1, 1]
        finv = [1, 1]
        inv = [0, 1]
        for i in range(2, MAX):
            fac.append(fac[i - 1] * i % mod)
            inv.append(mod - inv[mod % i] * (mod // i) % mod)
            finv.append(finv[i - 1] * inv[i] % mod)
        self.fac, self.finv, self.mod = fac, finv, mod

    def nCk(self, n, k):
        if n < k or n < 0 or k < 0:
            return 0
        fac, finv, mod = self.fac, self.finv, self.mod
        return fac[n] * (finv[k] * finv[n - k] % mod) % mod


N, K = map(int, input().split())

mc = ModComb(2 * N)

ans = mc.nCk(2 * N - 1, N - 1)
if K + 1 < N:
    ans += sum((mod - mc.nCk(N, i)) * mc.nCk(N - 1, i) % mod for i in range(K + 1, N)) % mod

print(ans % mod)

Verdicts: Runtime Error

Accepted
Problem: There is a building with n rooms, numbered 1 to n.  We can move from any room to any other room in the building.  Let us call the following event a **move** : a person in some room i goes to another room j~ (i \neq j).  Initially, there was one person in each room in the building.  After that, we know that there were exactly k moves happened up to now.  We are interested in the number of people in each of the n rooms now. How many combinations of numbers of people in the n rooms are possible?  Find the count modulo (10^9 + 7).

Submission attempts (in order):
n, k = map( int, input().split() )
mod = 10 ** 9 + 7

numer = [ 1 ] * ( n + 1 )
demon = [ 1 ] * ( n + 1 )

for i in range( 1, n + 1 ):
  numer[ i + 1 ] = ( numer[ i ] * i ) % mod

demon[ n ] = pow( numer[ n ], mod - 2, mod )
for i in range( n, 0, -1 ):
  demon[ i - 1 ] = ( demon[ i ] * i ) % mod
  
def nCr( n, r ):
  if r < 1:
    return 0
  return ( numer[ n ] * demon[ r ] % mod ) * demon[ n - r ] % mod

ans = 0
for i in range( min( k, n - 1 ) + 1 ):
  ans = ( ans + nCr( n, i ) * nCr( n -1, i ) % mod
print( ans )


n, k = map( int, input().split() )
mod = 10 ** 9 + 7

numer = [ 1 ] * ( n + 1 )
demon = [ 1 ] * ( n + 1 )

for i in range( 1, n + 1 ):
  numer[ i ] = numer[ i - 1 ] * i % mod

demon[ n ] = pow( numer[ n ], mod - 2, mod )
for i in range( n, 0, -1 ):
  demon[ i + 1 ] = ( demon[ i ] * i ) % mod

def nCr( n, r ):
  if r < 1:
    return 1
  return ( numer[ n ] * demon[ r ] % mod ) * demon[ n - r ] % mod

ans = 0
for i in range( max( k, n - 1) + 1 ):
  ans = ans + nCr( n, i ) * nCr( n - 1, i - 1 )
print( ans )

n, k = map( int, input().split() )
mod = 10 ** 9 + 7
 
numer = [ 1 ] * ( n + 1 )
demon = [ 1 ] * ( n + 1 )
 
for i in range( 1, n + 1 ):
  numer[ i ] = numer[ i - 1 ] * i % mod

demon[ n ] = pow( numer[ n ], mod - 2, mod )
for i in range( n, 0, -1 ):
  demon[ i + 1 ] = ( demon[ i - 1 ] * i ) % mod

def nCr( n, r ):
  if r < 1:
    return 1
  return ( numer[ n ] * demon[ r ] % mod ) * demon[ n - r ] % mod
 
ans = 0
for i in range( max( k, n - 1) + 1 ):
  ans = ans + nCr( n, i ) * nCr( n - 1, i - 1 )
print( ans )

n, k = map( int, input().split() )
mod = 10 ** 9 + 7

f = [ 1 ] * ( n + 1 ) 
inv = [ 1 ] * ( n + 1 )

for i in range( 1, n + 1 ):
  f[ i ] = ( f[ i - 1 ] * i ) % mod
  
inv[ n ] = pow( f[ n ], mod - 2, mod )
for i in range( n, 0, - 1 ):
  inv[ i - 1 ] = ( inv[ i ] * i ) % mod
  
def nCr( n, r ):
  if r < 1:
    return 1
  return ( f[ n ] * inv[ r ] % mod ) * inv[ n - r ] % mod

ans = 0
for i in range( min( k, n - 1 ) + 1 ):
  ans = ( ans + nCr( n, i ) * nCr( n - 1, i ) ) % mod
  
print( ans )




Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There is a building with n rooms, numbered 1 to n.  We can move from any room to any other room in the building.  Let us call the following event a **move** : a person in some room i goes to another room j~ (i \neq j).  Initially, there was one person in each room in the building.  After that, we know that there were exactly k moves happened up to now.  We are interested in the number of people in each of the n rooms now. How many combinations of numbers of people in the n rooms are possible?  Find the count modulo (10^9 + 7).

Submission attempts (in order):
def modinv(a,m):
    return pow(a,m-2,m)


n,k = map(int,input().split())
P = 10**9+7

if n-1 <= k:

    ans = 1
    for i in range(1,n):
        ans = ans*(N+1-i)*modinv(i,P)%P

else:
    ans = 0
    nCl = 1
    n1Cl = 1
    for l in range(1,k+1):
        nCl = nCl*(n+1-l)*modinv(l,P)%P
        n1Cl = n1Cl*(n-l)*modinv(l,P)%P
        ans = (ans+nCl*n1Cl)%P

print((ans+1)%P)



def comb_list(n, r, mod):
    ret = [1]
    for i in range(1, r+1):
        ret.append(ret[-1] * (n+1-i) * pow(i, mod-2, mod) % mod)
    return ret

n,k = map(int,input().split())
mod = 10**9+7

r = min(k,n-1)
ans = 0
nCl = comb_list(n, r, mod)
n1Cl = comb_list(n-1, r, mod)

for i in range(r+1):
    ans = (ans + nCl[i] * n1Cl[i]) % mod

print(ans)


Verdicts: Runtime Error

Accepted
Problem: There is a building with n rooms, numbered 1 to n.  We can move from any room to any other room in the building.  Let us call the following event a **move** : a person in some room i goes to another room j~ (i \neq j).  Initially, there was one person in each room in the building.  After that, we know that there were exactly k moves happened up to now.  We are interested in the number of people in each of the n rooms now. How many combinations of numbers of people in the n rooms are possible?  Find the count modulo (10^9 + 7).

Submission attempts (in order):
N,K=map(int, input().split())
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
n= 2*10 ** 5  
fact = [1, 1]  
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  
 
for i in range(2, n + 1):
  fact.append((fact[-1] * i) % p)
  inv.append((-inv[p % i] * (p // i)) % p)
  factinv.append((factinv[-1] * inv[-1]) % p)



zeros=min(K, N-1)
ans=0
for i in range(1,zeros+1):
    ans+=(cmb(N,i,p)*cmb(i+N-i-1, i, p))%p
    #print(pow(N-i, i, p))
    ans%=p

print(ans)

N,K=map(int, input().split())
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % p

p = 10 ** 9 + 7
n= 2*10 ** 5  
fact = [1, 1]  
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod p)
inv = [0, 1]  
 
for i in range(2, n + 1):
  fact.append((fact[-1] * i) % p)
  inv.append((-inv[p % i] * (p // i)) % p)
  factinv.append((factinv[-1] * inv[-1]) % p)



zeros=min(K, N-1)
ans=1
for i in range(1,zeros+1):
    ans+=(cmb(N,i,p)*cmb(i+N-i-1, i, p))%p
    #print(pow(N-i, i, p))
    ans%=p

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):
# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.readline
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import combinations
import numpy as np
def run():
    k,q = map(int, sysread().split())
    d = list(map(int,sysread().split()))
    d = np.array(d, dtype=np.uint32)

    def check(n ,x, m):
        _d = d % m
        d0 = d % m == 0
        # n_step
        n_d = (n-1) // k
        n_rest = (n-1) % k
        x %= m
        _d_rest, d0_rest = 0, 0
        if n_rest != 0:
            _d_rest = _d[:n_rest].sum()
            d0_rest = d0[:n_rest].sum()

        a_last = x + n_d * _d.sum() + _d_rest
        n_step = a_last // m
        # n_same
        n_same = n_d * d0.sum() + d0_rest

        return n-1 - n_same - n_step


    for _ in range(q):
        n,x,m = map(int, sysread().split())
        print(check(n, x, m))

if __name__ == "__main__":
    run()

# coding: utf-8
import sys
#from operator import itemgetter
sysread = sys.stdin.readline
#from heapq import heappop, heappush
#from collections import defaultdict
sys.setrecursionlimit(10**7)
#import math
#from itertools import combinations
import numpy as np
def run():
    k,q = map(int, sysread().split())
    d = list(map(int,sysread().split()))
    d = np.array(d, dtype=np.uint64)

    def check(n ,x, m):
        _d = d % m
        d0 = d % m == 0
        # n_step
        n_d = (n-1) // k
        n_rest = (n-1) % k
        x %= m
        _d_rest, d0_rest = 0, 0
        if n_rest != 0:
            _d_rest = _d[:n_rest].sum()
            d0_rest = d0[:n_rest].sum()

        a_last = x + n_d * _d.sum() + _d_rest
        n_step = a_last // m
        # n_same
        n_same = n_d * d0.sum() + d0_rest

        return n-1 - n_same - n_step


    for _ in range(q):
        n,x,m = map(int, sysread().split())
        print(int(check(n, x, m)))

if __name__ == "__main__":
    run()

Verdicts: Wrong Answer

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):
k, q = map(int, input().split())
d = list(map(int, input().split()))
queries = [tuple(map(int, input().split())) for _ in range(q)]

for n, x, m in queries:
    x_mod = x % m
    d_mod = [elem % m for elem in d]

    rem = n % k
    rem_d_mod = d_mod[-rem:]

    print(n - (x + sum(d_mod) * (n // k) + sum(rem_d_mod)) // m - d_mod.count(0) * (n // k) - rem_d_mod.count(0))


import numpy as np


k, q = map(int, input().split())
d = np.array(list(map(int, input().split()))).astype(np.int64)
queries = [tuple(map(int, input().split())) for _ in range(q)]

for n, x, m in queries:
    d_mod = d % m
    quotient, rem = divmod(n - 1, k)
    rem_d_mod = d_mod[:rem]
    print(quotient * np.count_nonzero(d_mod) + np.count_nonzero(rem_d_mod)
          - (x % m + quotient * d_mod.sum() + rem_d_mod.sum()) // m)


Verdicts: Wrong Answer

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):
import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

k,q=map(int,readline().split())
D=list(map(int,readline().split()))
NXM = map(int, read().split())

NXM=iter(NXM)
NXM=zip(NXM,NXM,NXM)

for n,x,m in NXM:
    tmpD=D%m
    SD=np.array([0]+tmpD,dtype=np.int64)
    SD=np.cumsum(SD)
    n-=1
    x=x%m
    x+=SD[-1]*(n//k)
    x+=SD[n%k]
    count=tmpD.count(0)*(n//k)
    count+=tmpD[:n%k].count(0)
    ans=n-x//m-count
    print(ans)

k,q=map(int,input().split())
D=list(map(int,input().split()))
NXM = map(int, open(0).read().split())

NXM=iter(NXM)
NXM=zip(NXM,NXM,NXM)

for n,x,m in NXM:
    tmpD=list(map(lambda x:x%m,D))
    SD=[0]+tmpD
    n-=1
    for i in range(1,k):
        SD[i+1]+=SD[i]
    x=x%m
    x+=SD[-1]*(n//k)
    x+=SD[n%k]
    count=tmpD.count(0)*(n//k)
    count+=tmpD[:n%k].count(0)
    ans=n-x//m-count
    print(ans)

import sys
import numpy as np
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

k,q=map(int,readline().split())
D=np.array(readline().split(),dtype=np.int64)
NXM = map(int, read().split())

NXM=iter(NXM)
NXM=zip(NXM,NXM,NXM)

for n,x,m in NXM:
    tmpD=D%m
    SD=np.hstack((np.zeros(1,dtype=np.int64), tmpD))
    SD=np.cumsum(SD)
    n-=1
    x=x%m
    x+=SD[-1]*(n//k)
    x+=SD[n%k]
    count=(k-np.count_nonzero(tmpD))*(n//k)
    count+=n%k-np.count_nonzero(tmpD[:n%k])
    ans=n-x//m-count
    print(ans)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):

import numpy as np
def resolve():
    K, Q = map(int, input().split())
    D = np.array(input().split(), dtype=np.int64)


    for _ in range(Q):
        n, x, m = map(int, input().split())
        
        
        E = D % m
        acc_E = np.cumsum(E)

        
        loop, rem = divmod(n - 1, K)
        tot = x % m + acc_E[-1] * loop

        
        zero = [int(e == 0) for e in E]
        zero_acc = np.cumsum(zero)
        tot_zero = zero_acc[-1] * loop

        if rem > 0:
            tot += acc_E[rem-1]
            tot_zero += zero_acc[rem - 1]
        dame = tot // m
        print(n - 1 - dame - tot_zero)

if __name__ == "__main__":
    
import numpy as np
def resolve():
    K, Q = map(int, input().split())
    D = np.array(input().split(), dtype=np.int64)


    for _ in range(Q):
        n, x, m = map(int, input().split())
        
        
        E = D % m
        acc_E = np.cumsum(E)

        
        loop, rem = divmod(n - 1, K)
        tot = x % m + acc_E[-1] * loop

        
        zero = [int(e == 0) for e in E]
        zero_acc = np.cumsum(zero)
        tot_zero = zero_acc[-1] * loop

        if rem > 0:
            tot += acc_E[rem-1]
            tot_zero += zero_acc[rem - 1]
        dame = tot // m
        print(n - 1 - dame - tot_zero)

if __name__ == "__main__":
    resolve()



import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
inp = sys.stdin.buffer.readline

import numpy as np
def resolve():
    K, Q = map(int, inp().split())
    D = np.array(inp().split(), dtype=np.int64)
    nxm = [list(map(int, inp().split())) for _ in range(Q)]

    for n, x, m in nxm:
        
        
        E = D % m
        acc_E = np.cumsum(E)

        
        loop, rem = divmod(n - 1, K)
        tot = x % m + acc_E[-1] * loop

        
        zero_acc = np.cumsum(E == 0).astype(np.int64)
        tot_zero = zero_acc[-1] * loop

        if rem > 0:
            tot += acc_E[rem-1]
            tot_zero += zero_acc[rem - 1]
        dame = tot // m
        print(n - 1 - dame - tot_zero)

if __name__ == "__main__":
    resolve()

Verdicts: Runtime Error

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):
import numpy as np

k, q = map(int, input().split())
d = np.array(list(map(int, input().split())))

for i in range(q):
  n, x, m = map(int, input().split())
  mod_d = d % m
  modsum_d = mod_d.cumsum()
  _q, _m = divmod(n - 1, k)
  
  ans = modsum_d[k - 1] * _q
  if _m > 0:
    ans += modsum_d[_m - 1]
  ans = n - (ans + x % m) // m - np.count_nonzero(mod_d == 0) * _q
  if _m > 0:
    ans -= np.count_nonzero(mod_d[0 : _m] == 0)
  print(ans)

import numpy as np

k, q = map(int, input().split())
d = np.array(list(map(int, input().split())))

for i in range(q):
  n, x, m = map(int, input().split())
  mod_d = d % m
  modsum_d = mod_d.cumsum()
  _q, _m = divmod(n - 1, k)
  
  ans = modsum_d[k - 1] * _q
  if _m > 0:
    ans += modsum_d[_m - 1]
  ans = n - 1 - (ans + x % m) // m - np.count_nonzero(mod_d == 0) * _q
  if _m > 0:
    ans -= np.count_nonzero(mod_d[0 : _m] == 0)
  print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have a sequence of k numbers: d_0,d_1,...,d_{k - 1}.  Process the following q queries in order:    * The i-th query contains three integers n_i, x_i, and m_i. Let a_0,a_1,...,a_{n_i - 1} be the following sequence of n_i numbers: \begin{eqnarray} a_j = \begin{cases} x_i & ( j = 0 ) \\\ a_{j - 1} + d_{(j - 1)~\textrm{mod}~k} & ( 0 < j \leq n_i - 1 ) \end{cases}\end{eqnarray} Print the number of j~(0 \leq j < n_i - 1) such that (a_j~\textrm{mod}~m_i) < (a_{j + 1}~\textrm{mod}~m_i).  Here (y~\textrm{mod}~z) denotes the remainder of y divided by z, for two integers y and z~(z > 0).

Submission attempts (in order):
def main():
  import numpy as np
  k, q = map(int, input().split())
  d = np.array(list(map(int, input().split())))
  for i in range(q):
    n, x, m = map(int, input().split())
    x %= m
    d_mod = d % m
    zero_d = k - np.count_nonzero(d_mod)
    d_mod_sum = np.sum(d_mod) + m * zero_d
    rep = (n-1) // k
    rem = (n-1) % k
    zero_rem = len(d_mod[:rem]) - np.count_nonzero(d_mod[:rem])
    rem_sum = np.sum(d_mod[:rem]) + m * zero_rem
    ans = n - 1 - (x + d_mod_sum * rep + rem_sum) // m
    print(ans)
    print(rem_sum)
if __name__ == '__main__':
  main()

def main():
  import numpy as np
  k, q = map(int, input().split())
  d = np.array(list(map(int, input().split())))
  for i in range(q):
    n, x, m = map(int, input().split())
    x %= m
    d_mod = d % m
    zero_d = k - np.count_nonzero(d_mod)
    d_mod_sum = np.sum(d_mod) + m * zero_d
    rep = (n-1) // k
    rem = (n-1) % k
    zero_rem = len(d_mod[:rem]) - np.count_nonzero(d_mod[:rem])
    rem_sum = np.sum(d_mod[:rem]) + m * zero_rem
    ans = n - 1 - (x + d_mod_sum * rep + rem_sum) // m
    print(ans)
if __name__ == '__main__':
  main()

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a, b, c = map(int, input)
if a==b or b==c or c==a:
  print("Yes")
else:
  print("No")

a, b, c = map(int, input().split())
if a==b and b==c:
    print("No")
elif a==b or b==c or c==a:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c = map(int,input().split())

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

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

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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=map(int,input().split())
if(a==b and b==c):
  print("Yes")
else:
  print("No"

a,b,c=map(int,input().split())
if(a==b and b==c):
    print("No")
elif(a==b or b==c or c==a):
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n=int(input())
a = [input() for i in range(n)]
b = sorted(list(set(a)))
d = {}
for i in b:
    t = a.count(i)
    d.setdefault(t,[])
    d[t].append(i)

for i in d[max(d.keys())]:
    print(i)


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

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


Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a, b, c = input().split()

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

a, b, c = input().split()
 
if a == b and a != c:
  print('Yes')
elif b == c and b != a:
  print('Yes')
elif c == a and c != b:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c = map(int,input().split())
if a==b==c:
  print("No")
elif a==b or b==c or a==c:
  print("No")
else:
  print("Yes")

a,b,c = map(int,input().split())
if a==b==c:
  print("No")
elif a!=b and b!=c and a!=c:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
A, B, C = map(int, input().split())
if A == B and B == C:
    print('Yes')
else:
    print('No')

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

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a, b, c = map(int, input().split())

s = set([a,b,c])
if len(s) == 2:
    print("YES")
else:
    print("NO")

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

s = set([a,b,c])
if len(s) == 2:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

a, b, c = [int(v) for v in input().split()]

if a == b and a != c:
    print("YES")
    exit()

if b == c and b != a:
    print("YES")
    exit()

if c == a and c != b:
    print("YES")
    exit()

print("NO")


#from math import sqrt
#from heapq import heappush, heappop
#from collections import deque

a, b, c = [int(v) for v in input().split()]

if a == b and b != c:
    print("Yes")
    exit()

if b == c and c != a:
    print("Yes")
    exit()

if c == a and a != b:
    print("Yes")
    exit()

print("No")


Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=input().split()
if a==b==c or a!=b!=c:
  print('No')
else:
  print('Yes')

a,b,c=input().split()
if a==b==c or a!=b!=c!=a:
  print('No')
else:
  print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=input().split()
if (a==b and b==c) or (a!=b and b!=c):
  print("No")
else:
  print("Yes")

a,b,c=input().split()
if (a==b and b==c) or (a!=b and b!=c and c!=a):
  print("No")
else:
  print("Yes")


Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
list_num  = input().split(' ')
if len(set(list_num))==2:
    print('YES')
else:
    print('NO')

list_num  = input().split(' ')
if len(set(list_num))==2:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n=int(input())
L={}
c=0
for i in range (n):
    s=input()
    if s in L:
        L[s]+=1
    else:
        L.update({s:1})
        c+=1
M=list(L.values())
C=list(L.keys())
b=max(M)
F=[]
for i in range(c):
    if M[i]==b:
        F+=[C[i]]
F.sort()
for i in F:
    print(i)
        
    


A,B,C=map(int,input().split())
print((A==B and B!=C or A==C and C!=B or B==C and B!=A) and "Yes" or "No")


Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=map(int,input().split())
if a==b and a!=c:
  print("yes")
elif a==c and a!=b:
  print("yes")
elif c==b and a!=c:
  print("yes")
else:
  print("no")

a,b,c=map(int,input().split())
if a==b and a!=c:
  print("Yes")
elif a==c and a!=b:
  print("Yes")
elif c==b and a!=c:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
#include <bits/stdc++.h>
using namespace std;




#define FORE(i, b) for(auto &i:b)
#define REP(i, b) FOR(i, 0, b)
#define REPN(i, b) FORN(i, 0, b)
#define SQ(i) (i*i)
#define ALL(a) a.begin(), a.end()
#define ALLA(a,n) a, a+n
#define SORT(a) sort(ALL(a))
#define SORTA(a, n) sort(ALLA(a, n))
#define REV(a) reverse(ALL(a))
#define REVA(a, n) reverse(ALLA(a, n))
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define IN(a, b) (a.find(b) != a.end())
#define BACK(a) a.back(); a.RB()
#define QBACK(a) a.top(); a.pop()
#define PRINT(a) FORE(i, a) cout << i << " "; cout << endl


#define RB  pop_back
#define RF  pop_front
#define INS insert
#define F   first
#define S   second




#define IO ios_base::sync_with_stdio(false); cin.tie(NULL)

typedef long long ll;
typedef unsigned long long ull;

typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<ll> vll;
typedef pair<int,int> pi;
typedef pair<double,double> pd;
typedef pair<ll,ll> pll;
typedef queue<int> qi;
typedef queue<double> qd;
typedef queue<ll> qll;
typedef US<int> si;
typedef US<double> sd;
typedef US<ll> sll;
typedef vector<vi> mi;
typedef vector<vd> md;
typedef vector<vll> mll;
typedef vector<pi> vpi;
typedef vector<pd> vpd;
typedef vector<pll> vpll;

int main(){
  IO; ll t; sll V;
  REP(i,3){cin >> t; V.INS(t);}
  cout << (V.size() == 2 ? "Yes":"No");
}


v = set(map(int, input().strip().split()))
print("Yes" if len(v) == 2 else "No")


Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n=int(input())
A=list(map(int,input().split()))
ans="APPROVED"
for i in A:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
           
            break
print(ans)
            


l=set(map(int,input().split()))
if len(l)==2:
    print("Yes")
else:
    print("No")



Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a = int(input())
b = int(input())
c = int(input())

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


#include<stdio.h>
void main( )
{
int e,f,g;
scanf("%d%d%d", &e, &f, &g);
int count = 0;
if( e==f && f!=g)
count=1;
if( f==g && g!=f)
count=1;
if( g==e && e!=f)
count=1;

if(count==1)
{
 printf("Yes");
}
else
{
printf("No");
}
}

def poor(a,b,c):
    if (a==b and a!=c) or (b==c and b!=a) or (a==c&&a!=b):
        print("Yes")
    else:
        print("No")
        
A,B,C = input().split()
a = A
b = B
c = C
d = poor(a,b,c)
print(d)

a=int(input())
b=int(input())
c=int(input())
if a==b or b==c or a==c:
    if not(a==b and b==c):
        print("Yes")
    else:
        print("No")
else:
    print("No")

#include <stdio.h>

int main()
{
    int a,b,c;
    scanf("%d %d %d", &a, &b, &c);
    if((a==b && a != c) || (a==c && a != b) || (c==b && a != c))
    printf("Yes");
    else
    printf("No");

    return 0;
}

a,b,c=input().split()
a=int(a)
b=int(b)
c=int(c)
if a==b:
    if b==c: 
        print('NO')
    else:
        print('YES')
elif b==c:
    if a==c: 
        print('NO')
    else:
        print('YES')
elif a==c:
    if b==c:
        print('NO')
    else:
        print('YES')
else:
    print('NO')




triple = input().split()
triple.sort()
if (triple [0] == triple [2]) :
    print('No')
elif (triple[0] == triple [1] or triple[1] == triple [2]) :
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n = list(map(int, input().split()))
if n[0] !== n[1]:
    print("Yes")
    exit(0)
if n[0] !== n[2]:
    print("Yes")
    exit(0)
print("No")

n = list(map(int, input().split()))
if n[0] == n[1]:
    if n[0] == n[2]:
        print("Yes")
        exit()
print("No")

n = list(map(int, input().split()))
if n[0] == n[1]:
    if n[0] == n[2]:
        print("Yes")
print("No")

n = list(map(int, input().split()))
if n[0] == n[1] == n[2]:
    print("Yes")
print("No")

n = list(map(int, input().split()))
if n[0] == n[1]:
    if n[0] == n[2]:
    print("Yes")
print("No")

n = list(map(int, input().split()))
if n[0] !== n[1]:
    print("Yes")
    return
if n[0] !== n[2]:
    print("Yes")
    return
print("No")

n = list(map(int, input().split()))
if n[0] != n[1]:
    if n[1] == n[2]:
        print("Yes")
        exit()
    if n[0] == n[2]:
        print("Yes")
        exit()
    if n[0] != n[2]:
        print("No")
        exit()
if n[0] == n[1]:
    if n[0] != n[2]:
        print("Yes")
        exit()
print("No")

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
# -*- coding: utf-8 -*-
A, B, C = map(int, input().split())
s = {A, B, C}
if len(s) == 2:
    print("YES")
else:
    print("No")

# -*- coding: utf-8 -*-
A, B, C = map(int, input().split())
s = {A, B, C}
if len(s) == 2:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a, b, c = map(int, input().split())
if a == b and b != c:
    print('Yes')
    exit()
if b == c and c != a:
    print('Yes')
    exit()
print('No')


a, b, c = map(int, input().split())
if a == b and b != c:
    print('Yes')
    exit()
if b == c and c != a:
    print('Yes')
    exit()
if c == a and b != a:
    print('Yes')
    exit()
print('No')

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
list=[int(input()) for i in range(3)]
print(len(set(list)))

list=[int(input()) for i in range(3)]
print("Yes" if len(set(list))=2 else "No")

s=list(set(input().split()))
if len(s)==2:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=input()

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

a,b,c=input().split()

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

Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
i=list(map(int, input().split()))
 
if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
  if i[0]==i[1] & i[0]==i[2]  & i[1]==i[2]:
	print('No')
  else:
	print('Yes')
else:
    print('No')

if A==B & A==C:
	print('NO')
if A==B | A==C | B==C:
	print('YES')
else:
    print('NO')

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

if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
  if i[0]==i[1] & i[0]==i[2]:
	print('No')
  else:
	print('Yes')
else:
    print('No')

i=list(map(int, input().split()))
 
if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
	if i[0]==i[1] & i[0]==i[2]:
		print('No')
	else:
		print('Yes')
else:
    print('No')

i=list(map(int, input().split()))
 
if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
	if i[0]==i[1] & i[0]==i[2]  & i[1]==i[2]:
    	print('No')
	else:
		print('Yes')
else:
	print('No')

i=list(map(int, input().split()))
if i[0]==i[1] & i[0]==i[2]:
	print('No')
if i[0]==i[1] | i[0]==i[2] | i[1]==i[2]:
	print('Yes')
else:
    print('No')

i=list(map(int, input().split()))
 
if i[0]==i[1] or i[0]==i[2] or i[1]==i[2]:
	if i[0]==i[1] and i[0]==i[2]:
		print('No')
	else:
		print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
nums = list(map(int, input.split(" ")))
if len(set(nums)) == 2:
    print("Yes")
else:
    print("No")


nums = list(map(int, input().split(" ")))
if len(set(nums)) == 2:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a, b, c = map(int, input().split())
if a == b == c or a != b != c:
    print("No")
else:
    print("Yes")

l = set(map(int, input().split()))
if len(l) == 2:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

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

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


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

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

elif(A!=B and (B!=C and A!=C)):
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a,b,c=int(input().split())
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
  


A,B,C=int(input())
if A==B and A!=C:
  print("Yes")
elif B==C and B!=A:
  print("Yes")
elif C==A and C!=B:
  print("Yes")
else:
  print("No")
  


A,B,C=int(input())
if A=B and A!=C:
  print("Yes")
elif B=C and B!=A:
  print("Yes")
elif C=A and C!=B:
  print("Yes")
else:
  print("No")
  

a,b,c=int(input())
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
  


a,b,c=map(int(input().split()))
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
  


A,B,C=int(input())
if A==B,A!=C: 
   print("Yes")
  elif B==C,B!=A:
      print("Yes")
  elif C==A,C!=B:
    print("Yes")
  else:
    print("No")
       

a,b,c=map(int,input().split())
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
  


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
def main():
    a, b, c = map(int, input().split())
    if (a == b and b != c) or (b == c and a != b):
        print('Yes')
    else:
        print('No')
main()

def main():
    a, b, c = map(int, input().split())
    if (a == b and b != c) or (b == c and a != b) or (a == c and a != b):
        print('Yes')
    else:
        print('No')
main()

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
n = int(input())
dic = {}
m = 0
for i in range(n):
  s = input()
  if s in dic:
    dic[s] += 1
    m = max(m, dic[s])
  else:
    dic[s] = 1
    m = max(m, dic[s])
ans = []
for s in dic:
  if dic[s] == m:
    ans.append(s)
print('\n'.join(ans.sort()))

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

Verdicts: Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a=list(map(int,input().split()))
if  a[0]==a[1]:
	if a[1] == a[2]:
		print("No")
	else:
		print("Yes")
else:
	if a[1] == a[2]:
		print("Yes")
	else:
		print("No")


a=sorted(list(map(int,input().split())))
if  a[0]==a[1]:
	if a[1] == a[2]:
		print("No")
	else:
		print("Yes")
else:
	if a[1] == a[2]:
		print("Yes")
	else:
		print("No")

Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
A=map(list(int,input().split()))
B=len(set(A))
if B==2:
    print('Yes')
else:
    print('No')

N=int(input())
A=list(map(int,input().split()))
g='APPROVED'
for i in range(N):
    if A[i]%2 == 0:
        if A[i]%3 != 0 and A[i]%5 != 0:
            g='DENIED'
            break
print(g)

N=int(input())
A=list(map(int,input().split()))
g='APPROVED'
for i in A:
    if i%2 == 0:
        if i%3 != 0 and i%5 != 0:
            g='DENIED'
            break
print(g)

A=list(map(int,input().split()))
B=len(set(A))
if B==2:
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
a=list(map(int,input().split()))
print(a)
if not(a[0]==a[1]==a[2]) and (a[0]==a[1] or a[1]==a[2] or a[0]==a[2]):
  print("YES")
else:
  print("NO")


a=list(map(int,input().split()))
a.sort()
if (a[0]==a[1] and a[1]!=a[2]):
  print("YES")
else:
  print("NO")

a=list(map(int,input().split()))
print(a)
if a[0]==a[1]==a[2] or a[0]!=a[1]!=a[2]:
  print("No")
else:
  print("Yes")


a=list(map(int,input().split()))
a.sort()
if (a[0]==a[1] or a[1]==[2]) and not(a[0]==a[1]==a[2]):
  print("YES")
else:
  print("NO")

a=list(map(int,input().split()))
if a[0]==a[1]==a[2] or a[0]!=a[1]!=a[2]:
  print("No")
else:
  print("Yes")

a=list(map(int,input().split()))
a.sort()
if a[0]==a[1]==a[2] or a[0]!=a[1]!=a[2]:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
def main():
    num = list(map(int,input().split()))
    if num.count(num[0]) == 2 or num.count(num[1]) == 2:
        print('YES')
        return

    print('NO')


main()


def main():
    num = list(map(int,input().split()))
    if num.count(num[0]) == 2 or num.count(num[1]) == 2:
        print('Yes')
        return

    print('No')


main()


Verdicts: Wrong Answer

Accepted
Problem: A triple of numbers is said to be _poor_ when two of those numbers are equal but the other number is different from those two numbers.  You will be given three integers A, B, and C. If this triple is poor, print `Yes`; otherwise, print `No`.

Submission attempts (in order):
x, y, z = input().split(" ")
a = int(x)
b = int(y)
c = int(z)
poor = False
if a == b == c:
    print('no')
else:
    if a == b:
        poor = not poor

    if a == c:
        poor = not poor

    if b == c:
        poor = not poor

    if poor:
        print('yes')
    else:
        print('no')

x, y, z = input().split(" ")
a = int(x)
b = int(y)
c = int(z)
poor = False
if a == b == c:
    print('No')
else:
    if a == b:
        poor = not poor

    if a == c:
        poor = not poor

    if b == c:
        poor = not poor

    if poor:
        print('Yes')
    else:
        print('No')

Verdicts: Wrong Answer

Accepted