TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
P,Q,R=map(int,input().split())
min=P+Q
if min>Q+R:
  min=Q+R
if min>R+P:
  min=R+P:
print(min)

P,Q,R=map(int,input().split())
min=P+Q
if min>Q+R:
  min=Q+R
if min>R+P:
  min=R+P
print(min)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
P, Q, R = map(int, input().split())
print(min(min(P + Q, PL R), Q + R)

P, Q, R = map(int, input().split())
print(min(min(P + Q , P + R), Q + R))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r = map(int,input().split())
print(min[p+q,q+r,r+p])

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

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
P, Q, R = map(int, input().split())
print(min[P+Q,Q+R,R+P])

P, Q, R = map(int, input().split())
print(min([P+Q,Q+R,R+P]))


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

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

a, b, c= map(int, input().split())
print( a+b+c- max(a, b, c))


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
s = input()
l = s.split(' ')
m = list (map(int, l))
p, q, r = m

def shortest_round(p, q, r):
  list_of_times = [p + q, p + r, q + r]
  return min(list_of_times)

print(shortest_round(s))

s = input()
l = s.split(' ')
m = list(map(int, l))
p, q, r = m
list_of_times = [p + q, p + r, q + r]
f = min(list_of_times)
print(f)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import copy

H, W = map(int, input().split())
state = []
for i in range(H):
    row_list = list(input())
    state.append(row_list)


def light(row, col, state):
    lighted_count = 0
    col1 = copy.copy(col)
    next = '.'
    while next == '.':
        lighted_count += 1
        col1 += 1
        if col1 >= W:
            break
        next = state[row][col1]
    
    col2 = copy.copy(col)
    next = '.'
    while next == '.':
        lighted_count += 1
        col2 -= 1
        if col2 < 0:
            break
        next = state[row][col2]

    row1 = copy.copy(row)
    next = '.'
    while next == '.':
        lighted_count += 1
        row1 += 1
        if row1 >= H:
            break
        next = state[row1][col]

    row2 = copy.copy(row)
    next = '.'
    while next == '.':
        lighted_count += 1
        row2 -= 1
        if row2 < 0:
            break
        next = state[row2][col]

    lighted_count -= 3
    return lighted_count



def blank_fun(state):
    blank_list = []
    for h in range(H):
        for w in range(W):
            if state[h][w] == '.':
                blank_list.append([h, w])
    return blank_list


blank_list = blank_fun(state)
blank_count = 0
for blank in blank_list:
    row = blank[0]
    col = blank[1]
    blank_count_now = light(row, col, state)

    if blank_count_now > blank_count:
        blank_count = blank_count_now


print(blank_count)


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

a1 = a+b
a2 = a+c
a3 = b+c
x = [a1, a2, a3]
print(min(x))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
MOD=10**9+7
n,m=map(int,input().split())
A=[1 for i in range(n)]
if n!=1:
  A[1]=2
  for i in range(m):
    A[int(input())-1]=0
  
  if A[0]==0 and A[1]!=0:
    A[1]=1


  for i in range(2,n):
    if A[i]!=0:
      A[i]=(A[i-1]+A[i-2])
      A[i]%=MOD

    
  print(A[n-1])
  
else:print(1)


p,q,r=map(int,input().split())

ans=[p+q,q+r,r+p]
print(min(ans))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p, q, r = map(int, input().split())
x = p + q
y = q + r
z = r + p

if x>=y and x>=z:
  print(x)
elif y>=x and y>=z:
  print(y)
else:
  print(z)

p, q, r = map(int, input().split())
x = p + q
y = q + r
z = r + p

if x<=y and x<=z:
  print(x)
elif y<=x and y<=z:
  print(y)
else:
  print(z)


Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p, q, r = map(int, input().split())
lst = []
lst.extend(p, q, r)
lst.sort()

print(lst[0] +lst[1])

lst = [map(int, input().split())]
lst.sort()
 
print(lst[0] +lst[1])

lst = list(map(int, input().split()))
lst.sort()
 
print(lst[0] +lst[1])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import itertools

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

combos = itertools.combinations(routes,2)

time = []
for c in combos:
    time.append(c[0] + c[1])
    
min(time)

import itertools

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

combos = itertools.combinations(routes,2)

time = []
for c in combos:
    time.append(c[0] + c[1])
    
print(min(time))

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
H,W = map(int,input().split())
s = [[] for i in range(H)]
for i in range(H): s[i] = list(input())
l = [[0]*W for i in range(H)]
r = [[0]*W for i in range(H)]
d = [[0]*W for i in range(H)]
u = [[0]*W for i in range(H)]

for h in range(H):
    for w in range(W):
        if s[h][w] == ".":
            l[h][w], d[h][w] = 1,1
            if w != 0: l[h][w] = l[h][w-1] + 1
            if h != 0: d[h][w] = d[h-1][w] + 1
    for w in range(W):
        if s[H-1-h][W-1-w] == ".":
            r[H-1-h][W-1-w] = 1
            if w != 0: r[H-1-h][W-1-w] = r[H-1-h][W-w] + 1

for h in range(H):
    for w in range(W):
        if s[H-1-h][W-1-w] == ".":
            u[H-1-h][W-1-w] = 1
            if h != 0: u[H-1-h][W-1-w] = u[H-h][W-1-w] + 1
ans = 0
for h in range(H):
    for w in range(W):
        ans = max(ans, l[h][w]+r[h][w]+u[h][w]+d[h][w]-3)

print(ans)
        

N,M = map(int, input().split())
a = [0]*M
for i in range(M): a[i] = int(input())

mod = [1]*N
inv = [1]*N
inf = 10**9+7
for i in range(N-1): mod[i+1] = mod[i]*(i+2)%inf
inv[N-1] = pow(mod[N-1], inf-2, inf)
for i in range(2,N+1): inv[N-i] = inv[N-i+1]*(N-i+2)%inf

def comb(cur,ai):
    if ai - cur == 1:
        return 1
    elif ai <= cur:
        return 0
    return(comb(cur, ai-1)+comb(cur,ai-2))

cur = 1
if a[0] == 1: cur += 1
cnt = 0
for i in range(M):
    if cur == a[i]:
        cnt = 0
        break
    cnt += comb(cur,a[i])
    cur = a[i]+1

print(cnt)

P,Q,R = map(int, input().split())
print(min(P+Q,Q+R,R+P))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
o_list = o.split(" ")
o_list_i = [int(s) for s in o_list]
o_list_i.sort()

o0 = int(o_list_i[0])
o1 = int(o_list_i[1])
print( o0 + o1 )

o = input()
o_list = o.split(" ")
o_list_i = [int(s) for s in o_list]
o_list_i.sort()

o0 = int(o_list_i[0])
o1 = int(o_list_i[1])
print( o0 + o1 )

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import numpy as sym

def fib(n):
    x = sym.symbols('x',nonnegative=True,integer=True) 
    Fib=1/sym.sqrt(5)*(((1+sym.sqrt(5))/2)**(n-1)-((1-sym.sqrt(5))/2)**(n-1)) 
    result=Fib.subs(x,n) 
    result=result.evalf() 
    return int(result)

n,m = map(int,input().split())
a =  [int(input()) for i in range(m)]
a.append(n+1)

time_f=[]

for i,v in enumerate(a):
    if i == 0:
        # print (fib(a[i]))
        time_f = fib(a[i])
    else:
        # print((a[i]-a[i-1]-1))
        # print (fib(a[i]-a[i-1]-1))
        time_f *=fib(a[i]-a[i-1]-1)


print(time_f%1000000007)

def fib(n):
    f = ((1 + 5**0.5) / 2)**n / 5**0.5 + 0.5
    return f







#     return int(result)

n,m = map(int,input().split())
a =  [int(input()) for i in range(m)]
a.append(n+1)

time_f=[]

for i,v in enumerate(a):
    if i == 0:
        # print (fib(a[i]))
        time_f = fib(a[i])
    else:
        # print((a[i]-a[i-1]-1))
        # print (fib(a[i]-a[i-1]-1))
        time_f *=fib(a[i]-a[i-1]-1)


print(time_f%1000000007)

a = list(map(int,input().split()))
a.sort()
print(a[0]+a[1])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r = map(int,input().split())

if p+q >= p+r or p+q >= q+r:
    print(p+q)

elif q+r >= p+q and q+r >= p+r:
    print(q+r)

elif p+r >= p+q and p+r >= q+r:
    print(p+r)

p,q,r = map(int,input().split())

if p+q >= p+r or p+q >= q+r:
    print(p+q)

elif q+r >= p+q and q+r >= p+r:
    print(q+r)

elif p+r >= p+q and p+e >= q+r:
    print(p+r)

p,q,r = map(int,input().split())

if p+q <= p+r and p+q <= q+r:
    print(p+q)

elif q+r <= p+q and q+r <= p+r:
    print(q+r)

elif p+r <= p+q and p+r <= q+r:
    print(p+r)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
div = 1000000007

n, m = map(int, input().split())
a = [int(input()) for i in range(m)]

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

if 1 not in a:
    f[1] = 1

for i in range(2, n + 1):
    if i in a:
        continue
    f[i] = (f[i - 1] + f[i - 2]) % div

print(f[-1])

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

a_n = sorted(a_n)

print(a_n[0] + a_n[1])


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
n,m = map(int,input().split())
a = [ int(input()) for _ in range(m)]
M=10**9+7
lis = [1] + [0]*n

for i in a:
  lis[i]=-1
lis[1] += 1
for i in range(n-1):
  if lis[i+2]<0:
    lis[i+2]= 0
  else:
    lis[i+2] = (lis[i+1] + lis[i])%M
print(lis[n])

import sys
input = sys.stdin.readline

P=list(map(int,input().split()))
print(sum(P)-max(P))



Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
AB, BC, AC = [int(_) for _ in raw_input().split(" ")]

M = [[0, AB, AC],
     [AB, 0, BC],
     [AC, BC, 0]]

def A(l):
    t = [0] * l
    def Sub(targetList, n):
        if 1:
            if len(targetList) == 1:
                t[n] = targetList[0]
                yield t
                t[n] = 0
            for i in range(len(targetList)):
                p = targetList[:i] + targetList[i+1:]
                t[n] = targetList[i]
                for j in Sub(p, n+1):
                    yield j
        else:
            pass
    
    for i in (Sub(tuple(range(l)), 0)):
        yield i

_min = 10**100
for i in A(3):
    _sum = 0
    for j in range(1, len(i)):
        _from = i[j-1]
        _to = i[j]        
        _sum += M[_from][_to]
    #print (_sum)
    if _min > _sum:
        _min = _sum
print (_sum)
        

#AB, BC, AC = [int(_) for _ in raw_input().split(" ")]
AB = 3
BC = 2
AC = 5

M = [[0, AB, AC],
     [AB, 0, BC],
     [AC, BC, 0]]

def A(l):
    t = [0] * l
    def Sub(targetList, n):
        if 1:
            if len(targetList) == 1:
                t[n] = targetList[0]
                yield t
                t[n] = 0
            for i in range(len(targetList)):
                p = targetList[:i] + targetList[i+1:]
                t[n] = targetList[i]
                for j in Sub(p, n+1):
                    yield j
        else:
            pass
    
    for i in (Sub(tuple(range(l)), 0)):
        yield i

_min = 10**100
for i in A(3):
    _sum = 0
    for j in range(1, len(i)):
        _from = i[j-1]
        _to = i[j]        
        _sum += M[_from][_to]
    #print (_sum)
    if _min > _sum:
        _min = _sum
print (_sum)
        

AB, BC, AC = [int(_) for _ in input().split(" ")]

M = [[0, AB, AC],
     [AB, 0, BC],
     [AC, BC, 0]]

def A(l):
    t = [0] * l
    def Sub(targetList, n):
        if 1:
            if len(targetList) == 1:
                t[n] = targetList[0]
                yield t
                t[n] = 0
            for i in range(len(targetList)):
                p = targetList[:i] + targetList[i+1:]
                t[n] = targetList[i]
                for j in Sub(p, n+1):
                    yield j
        else:
            pass
    
    for i in (Sub(tuple(range(l)), 0)):
        yield i

def Calc(list):
    _sum = 0
    for index in range(1, len(list)):
        _from = list[index-1]
        _to = list[index]
        _sum += M[_from][_to]
    return _sum

_min = Calc([0,1,2])
for i in A(3):
    _sum = Calc(i)
    if _min > _sum:
        _min = _sum
print (_min)
        

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p, q, r = (int(i) for i in input().split())
if p >= q & p >= r :
  max = p
if q >= p & q >= r :
  max = q
if r >= p & r >= q :
  max = r
print(p + q + r - max)

l = list(map(int, input().split()))
sum = 0
max = 0
for i in range(3) :
  sum += l[i]
  if max <= l[i] :
    max = l[i]
print(sum - max)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p, q, r = map(int, input().split())
a = max(p, q, r)
print(a)
if a == p:
  print(q+r)
elif a == q:
  print(p+r)
elif a == r:
  print(p+q)

p, q, r = map(int, input().split())
a = max(p, q, r)
if a == p:
  print(q+r)
elif a == q:
  print(p+r)
elif a == r:
  print(p+q)

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
def fib(n):
    a1 = 2
    a2 = 1 
    if n==2:
        return 2
    elif n==1:
        return 1
    else:
        count = 1
        for i in range(n-2):
            count = a1 + a2
            a2 = a1
            a1 = count
        return count
        
N,M = list(map(int,input().split()))
ans = 1
z = False

if M == 0:
    print(fib(N)) 
else:
    a = [int(input()) for _ in range(M)]

    for i in range(M):
        if i != 0:
            if a[i]-a[i-1] != 1:
                ans *= fib(a[i]-a[i-1]-2)
            else:
                z = True
                break
        else:
            ans *= fib(a[i]-1)

    ans *= fib(N-a[-1]-1)

    if z:
        print(0)
    else:
        print(str(ans%1000000007))

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

PQR.sort()

print(PQR[0]+PQR[1])

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

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


 
ab = a+b
bc = b+c
ac = a+c
 
minimum = min(ab,bc,ac)
 
print(minimum)


import math
a = int(input())
b = int(input())
c = int(input())


 
ab = a+b
bc = b+c
ac = a+c
 
minimum = min(ab,bc,ac)
 
print(minimum)

import math
def get_integers(n):
    '''
    Reads in one line of input that contains n integers.
    Returns a list of n integers
    '''
    s = input()
    numbers = s.split(' ')
    r = []
    for x in numbers:
        r.append(int(x))
    return  r

a, b, c = get_integers(3)
 
ab = a+b
bc = b+c
ac = a+c
 
minimum = min(ab,bc,ac)
 
print(minimum)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
y=input().split()
for i in range(len(y)):
    y[i]=int(y[i])
a=[]
a.append(y[0]+y[1])
a.append(y[2]+y[1])
a.append(y[0]+y[2])
a.sort()
print(a[1])

y=input().split()
for i in range(len(y)):
    y[i]=int(y[i])
a=[]
a.append(y[0]+y[1])
a.append(y[2]+y[1])
a.append(y[0]+y[2])
a.sort()
print(a[0])

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
ary = list(map(lambda n: int(n), input().split(" "))).sort(reverse=True)

print(ary[0] + ary[1])

ary = list(map(lambda n: int(n), input().split(" ")))
ary.sort()

print(ary[0] + ary[1])

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r=map(int,input().split())

l=list(p,q,r)
l=sorted(l)

print(l[0]+l[1])

p,q,r=map(int,input().split())

print(p+q+r-max(p,q,r))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
pqr=[int(input() for i in range(3))]
pqr.sort()
print(pqr[0]+pqr[1])

p,q,r=map(int,input().split())
pqr=[p,q,r]
pqr.sort()
print(pqr[0]+pqr[1])

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import math
 
#n = int(input())
n, m = [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for n in range(n)]

#s = input()
#list = list(s)
 
s = [int(input()) for i in range(m)] 
 
MOD = 1000000007
 
 
def fib(n):
    a = 0
    b = 1
    temp = 0
    if (n == 0) :
        return 0
    elif (n == 1) :
        return 1
    else:
        for i in range(n-1) :
            temp = b
            b = (a + b) % MOD
            a = temp
        return b
 
kotae = 1
 
if (m == 0) :
    kotae = (kotae * fib(n)) % MOD
else :
    for i in range(m + 1) :
        if (i == 0) :
            kotae = (kotae * fib(s[i])) % MOD
        elif (i == m) :
            kotae = (kotae * fib(n - s[i-1])) % MOD
        else :
            kotae = (kotae * fib(s[i] - s[i-1] - 1)) % MOD
 
 
print(kotae)

import math

a, b, c= [int(i) for i in input().split()]
#table = [[int(i) for i in input().split()] for n in range(n)]

#s = input()
#list = list(s)

#print(n, m)
#print(table)
#print(light)

kotae = 0

kotae = a + b + c - max(a, b, c)

print(kotae)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r = input().split()
print(sum(p,q,r) - max(p,q,r))

p,q,r = input().split()
p = int(p)
q = int(q)
r = int(r)
print((p + q + r) - max(p,q,r))


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
l = list(map(int, input().split()))
n = len(l)
d = 0
l.sort()
for i in range(0,n-1):
    d += l.pop(0)
    print(l)

print(d)


p = list(map(int, input().split()))
print(sum(p) - max(p))


Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
l=list(map(int,input().split()))
l.sort()
print(l[1]+l[2])

l=list(map(int,input().split()))
l.sort()
print(l[0]+l[1])

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import numpy as np
L,A,B,M=(int(i) for i in input().split())
array=np.arange(A,A+B*L-1,B)
result=""
for i in range(L):
    result+=str(array[i])
print(int(result)%M)

A=[int(i) for i in input().split()]
print(sum(A)-max(A))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
a = input()
b = input()
c = input()
 
print( (a + b + c) - max(a, b, c)) 

a = int(input())
b = int(input())
c = int(input())
 
print((a+b+c)-max(a,b,c))

a = int(input())
b = int(input())
c = int(input())

print( (a + b + c) - max(a, b, c)) 

a = [i for i in input().split()]
print(int(sorted(a)[0]) + int(sorted(a)[1]))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
a=list(map(int,input().split()))
b=a.sorted()
print(b[0]+b[1])

a=list(map(int,input().split()))
b=a.sorted()
print(int(b[0])+int(b[1]))

a=list(map(int,input().split()))
b=sorted(a)
print(int(b[0])+int(b[1]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
# -*- coding: utf-8 -*-
p,q,r=map(int,input().split())
ptint(min(p+q,q+r,r+p))

# -*- coding: utf-8 -*-
p,q,r=map(int,input().split())
ptint(min(p+q,q+r,r+p)

# -*- coding: utf-8 -*-
p,q,r=map(int,input().split())
print(min(p+q,q+r,r+p))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r = map(int(input().split()))
print(min(p+q,p+r,q+r))

p,q,r = map(int(input().split()))
print(min((p+q),(p+r),(q+r)))

p,q,r = map(int(input().split()))
print(min(p+q,p+r,q+r)

p,q,r = map(int,input().split())
print(min(p+q, q+r, r+p))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
P,Q,R = map(int,input().split())

print(P+Q+R-min(P,Q,R))

P,Q,R = map(int,input().split())
 
print(P+Q+R-max(P,Q,R))

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

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

ans = float('inf')

for i in range(3):
    for j in range(3):
        if i != j:
            if ans > a[i] + a[j]:
                print(a[i],a[j])
                ans = a[i] + a[j]

print(ans)

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

ans = float('inf')

for i in range(3):
    for j in range(3):
        if i != j:
            if ans > a[i] + a[j]:
                ans = a[i] + a[j]

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
def main():
    a,b,c=map(int,input().split(' '))
    print(sum([a,b,c])-,max(a,b,c))

main()


def main():
    a,b,c=map(int,input().split(' '))
    print(sum([a,b,c])-max(a,b,c))

main()


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
aaaa = input()
A = [int(x) for x in input().split()]


for i in range(len(A)-1):
  s1 = sum(A[:i+1])
  s2 = sum(A[i+1:])
  if s1 >= s2:
    print(abs(s1-s2))
    break

aaaa = input()
A = [int(x) for x in input().split()]


for i in range(len(A)):
  s1 = sum(A[:i+1])
  s2 = sum(A[i+1:])
  if s1 >= s2:
    print(s1-s2)
    break

A = [int(x) for x in input().split()]

print(sum(sorted(A)[:-1]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
P, Q, R = map(int,input().split())
 
PQ = P + Q
QR = Q + R
RP = R + Q

temp1 = min(PQ, QR)
temp2 = min(temp2, RP)

print(temp2)

P, Q, R = map(int,input().split())
 
PQ = P + Q
QR = Q + R
RP = R + P

temp1 = min(PQ, QR)
temp2 = min(temp1, RP)

print(temp2)


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
a = list(map(int,input().split()))
a.sort()
print(sum(a[0:1])

a = list(map(int,input().split()))
a.sort()
print(sum(a[0:2]))


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):

import __input


p,q,r = map(int,input().split())
ans = 999
ans = min(p+q,ans)
ans = min(p+r,ans)
ans = min(q+r,ans)

print(ans)


p,q,r = map(int,input().split())
ans = 999
ans = min(p+q,ans)
ans = min(p+r,ans)
ans = min(q+r,ans)

print(ans)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
N=int(input())
M=input().split()
for i in range(N):
    M[i]=int(M[i])
S1=0
S2=sum(M)
t=100000
for i in range(N):
    S1+=M[i]
    S2=S2-M[i]
    if t>abs(S2-S1):
        t=abs(S2-S1)
print(t)

P,Q,R=map(int,input().split())
a=min(P+Q,P+R,Q+R)
print(a)

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
*A=map(int,input().split());print(sum(A)-max(A))

*A,=map(int,input().split());print(sum(A)-max(A))

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r=list(map(int,(input().split())))
pq=p+q
qr=q+r
rp=r+p
print(min([pq,qr,rp])

p,q,r=list(map(int,(input().split())))
pq=p+q
qr=q+r
rp=r+p
print(min([pq,qr,rp]))							

Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
def main17():
    data = input().split()
    num = []
    for i in range(3):
        num.append(int(data[i]))
    num2 = []
    num2.append((num[0]+num[1]))
    num2.append((num[0]+num[2]))
    num2.append((num[2]+num[1]))
    print((max(num2)))

if __name__ == "__main__":
    main17()

def main17():
    data = input().split()
    num = []
    for i in range(3):
        num.append(int(data[i]))
    num2 = []
    num2.append((num[0]+num[1]))
    num2.append((num[0]+num[2]))
    num2.append((num[2]+num[1]))
    print((min(num2)))

if __name__ == "__main__":
    main17()

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p, q, r = map(int, input().split())
min = min(p, q, r)
print(p+q+r-min)

p, q, r = map(int, input().split())
print(p+q+r-min(p, q, r))

p, q, r = map(int, input().split())
max = max(p, q, r)
print(p+q+r-max)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
lists = [P+Q,Q+R,R+P]
print(min(lists))

lists = list(map(int,input().split(" ")))
lists.sort()
print(lists[0] + lists[1])


Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
num1, num2, num3 = [int(i) for i in input().split()]
a=list[num1+num2,num2+num3,num1+num3]
print(max(a))

num1, num2, num3 = [int(i) for i in input().split()]
a=[num1+num2,num2+num3,num1+num3]
print(min(a))



Verdicts: Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
p,q,r=map(int, input().split())
print(min(p+q,p+r,q,r))

p,q,r=map(int, input().split())
print(min(p+q,p+r,q+r))

Verdicts: Wrong Answer

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):

import sys


P = int(sys.argv[1]) 
Q = int(sys.argv[2]) 
R = int(sys.argv[3]) 
 
a1 = P + Q.
a2 = P + R
a3 = Q + R

value = 300

if __name__ == '__main__':
    if a1 < value:
        value = a1
    if value > a2:
        value = a2
    if value > a3:
        value = a3
    print(value) 



import sys


P = int(sys.argv[1])
Q = int(sys.argv[2])
R = int(sys.argv[3])



a1 = P + Q.
a2 = P + R
a3 = Q + R

value = 300
if a1 < value:
    value = a1
if value > a2:
    value = a2
if value > a3:
    value = a3
print(value)



import sys


P = sys.argv[1]
Q = sys.argv[2]
R = sys.argv[3]




numbers = [P,Q,R]

combinations = ['_','_','_']

numbers = []

a1 = P + Q.
a2 = P + R
a3 = Q + R

value = 300 


 
if __name__ == '__main__': 
    if a1 < value:
        value = a1 
    if value < a2:
        value = a2
    if value < a3:
        value = a3 
    return value 
 


import sys


P = int(sys.argv[1]) 
Q = int(sys.argv[2]) 
R = int(sys.argv[3]) 
 
a1 = P + Q.
a2 = P + R
a3 = Q + R

value = 300

if __name__ == '__main__':
    if a1 < value:
        value = a1
    if value > a2:
        value = a2
    if value > a3:
        value = a3
    print(value) 


P,Q,R = map(int,input().split())
a1 = P + Q
a2 = P + R
a3 = Q + R
value = 300
if a1 < value:
    value = a1
if value > a2:
    value = a2
if value > a3:
    value = a3
print(value)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are three airports A, B and C, and flights between each pair of airports in both directions.  A one-way flight between airports A and B takes P hours, a one-way flight between airports B and C takes Q hours, and a one-way flight between airports C and A takes R hours.  Consider a route where we start at one of the airports, fly to another airport and then fly to the other airport.  What is the minimum possible sum of the flight times?

Submission attempts (in order):
import math
n, m = [int(i) for i in input().split()]
p = [int(input()) for i in range(m)]

a = []
a.append(1)
if 1 in p:
    a.append(0)
else:
    a.append(1)
for i in range(2, n + 1):
    if i in p:
        a.append(0)
    else:
        a.append((a[i - 2] + a[i - 1]) % 1000000007)
    
print(a[n])

import math
n, m = [int(i) for i in input().split()]
p = [0 for i in range(n + 1)]
for _ in range(m):
    p[int(input())] = 1
    
a = []
a.append(1)
if p[1] == 1:
    a.append(0)
else:
    a.append(1)
for i in range(2, n + 1):
    if p[i] == 1:
        a.append(0)
    else:
        a.append((a[i - 2] + a[i - 1]) % 1000000007)
    
print(a[n])

p = (int(i) for i in input().split())
p = sorted(p)
print(p[0] + p[1])

Verdicts: Runtime Error

Runtime Error

Accepted