TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,　p=map(int,input().split())
ans=(a*3+b)//2
print(ans)


a,p=map(int,input().split())
ans=(a*3+b)//2
print(ans)


a,p=map(int,input().split())
ans=(a*3+p)//2
print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p = map(int,input().split())
if 3*a+b < 2:
  print(0)
elif (3*a+b) % 2 == 0:
  print((3*a+b)//2)
else:
  print((3*a+b-1)//2)

a, p = map(int, input().split())
print((a * 3 + p) // 2)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):

import copy

class MyClass():

    maxSum = 0

    def do(self, baseList, _temochi, leftIndex, rightIndex, nokoriSousaCount):
        if nokoriSousaCount < 0:
            return

        sum = 0
        for each in _temochi:
            sum += each

        if self.maxSum < sum:
            self.maxSum = sum

        if leftIndex <= rightIndex:
            temochi = copy.copy(_temochi)
            temochi.append(baseList[leftIndex])
            self.do(baseList, temochi, leftIndex + 1, rightIndex, nokoriSousaCount - 1)

            temochi = copy.copy(_temochi)
            temochi.append(baseList[rightIndex])
            self.do(baseList, temochi, leftIndex, rightIndex - 1, nokoriSousaCount - 1)
            
        self.removeMin(_temochi, leftIndex, rightIndex, nokoriSousaCount - 1)

    def removeMin(self, _temochi, leftIndex, rightIndex, nokoriSousaCount):
        if len(_temochi) > 0 and nokoriSousaCount > 0:
            minNum = min(_temochi)
            if minNum < 0:
                temochi = copy.copy(_temochi)
                temochi.remove(minNum)
                self.do(baseList, temochi, leftIndex, rightIndex, nokoriSousaCount)


count, opeCount = map(int, input().split())
baseList = list(map(int, input().split()))

doClass = MyClass()
doClass.do(baseList, [], 0, count - 1, opeCount)

print(doClass.maxSum)




    apple, frag = map(int, input().split())
     
    pie = ((apple*3) + frag) / 2
     
    print(pie)

apple, frag = map(int, input().split())

pie = (apple*3) + frag / 2

print(pie)

apple, frag = map(int, input().split())
         
pie = ((apple*3) + frag) / 2
         
print(int(pie))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = input().split()

print( (A*3+P) / 2)

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

print(int((stdin[0]*3+stdin[1]) / 2))

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
def main():
    a, p = map(int,input().split())
    a = a * 3
    b = a / 2
    print(a + p)

main()

def main():
    a, p = map(int,input().split())
    a = a * 3
    piece = a + p
    ans = int(piece / 2)
    print(ans)

main()


Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a, p = map(int, input().suplit())

kakera = 3 * a + p
pie = kakera // 2
print(pie)

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

kakera = 3 * a + p
pie = kakera // 2
print(pie)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

APPLE = 3*A + P

if APPLE % 2 = 0:
  ans = APPLE/2
else:
  ans = (Apple-1)/2

A, P = map(int, input().split())

APPLE = 3*A + P

if APPLE % 2 = 0:
  ans = APPLE/2
else:
  ans = (Apple-1)/2

print(ans)

A, P = map(int, input().split())

Apple = 3*A + P

if Apple % 2 == 0:
  ans = APPLE/2
else:
  ans = (Apple-1)/2

print(int(ans))

A, P = map(int, input().split())
 
Apple = 3*A + P
 
if Apple % 2 == 0:
  ans = Apple/2
else:
  ans = (Apple-1)/2
 
print(int(ans))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
N = int(input("店舗数"))

list = []
for i in range(N):
    s, p = input().split()
    P = 100 - int(p)
    list.append((s,P,i+1))

list.sort()

for a in list:
    print(a[2])
    

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

re = int((a*3 + p) / 2)

print(re)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P=map(int,input().split())
print(3*A+P//2)

A,P=map(int,input().split())
print((3*A+P)//2)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p=map(int,input().split())
s=3*a+p
if s%2==0:
  print(s/2)
else:
  print((s-1)/2)

a,p=map(int,input().split())
s=3*a+p
if s%2==0:
  print(int((s/2)))
else:
  print(int(((s-1)/2)))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
n=int(input())
list=[]
for i in range(n):
  s,p=input().split()
  list.append((s, -int(p), i+1))
list.sort()
for s,p,i in list:
  print(i)

a,p = map(int,input().split())
print((3*a+p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
if __name__ == '__main__':
  A, P = map(int, input().split(" "))
  pieces = 3 * A + P
  apple_pi = pieces // 2
  
  print(pieces)

if __name__ == '__main__':
  A, P = map(int, input().split())
  pieces = 3 * A + P
  apple_pi = pieces // 2
  
  print(pieces)

if __name__ == '__main__':
  A, P = map(int, input().split())
  pieces = 3 * A + P
  apple_pi = pieces // 2
  
  print(apple_pi)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a, p = map(int, input().split())
print(int((a*2+p)//2))

a, p = map(int, input().split())
print(int((a*3+p)/2))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import numpy as np
import matplotlib.pyplot as plt

def main():
	print('Input A')
	a = int(input())
	print('Input P')
	p = int(input())

	tips = a * 3 + p
	pie = int(tips / 2)

	print("output\n"+str(pie))


if __name__ == '__main__':
	main()

import numpy as np
import matplotlib.pyplot as plt

def main():
	a = int(input())
	p = int(input())

	tips = a * 3 + p
	pie = int(tips / 2)

	print(pie)

if __name__ == '__main__':
	main()

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

tips = a * 3 + p
pie = tips // 2

print(pie)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A = int(input())
P = int(input())
B = 3*A + P

print(int(B/2))

A = int(input())
P = int(input())
B = 3*A + P

print(int(B/3))

A = int(input())
P = int(input())
B = 3*A + P

print(int(B // 2))

A,P = map(int,input().split())
print((3*A + P) // 2)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
N,M=map(int,input().split())
S=[list(map(int,input().split()))[1:] for _ in range(M)]
P=list(map(int,input().split()))
a=0
for n in range(2**N):
    s_count=0
    for j,s in enumerate(S):
        count=0
        for t in s:
            if n &(1<<t):
               count|=1<<t
        s_count^=count
        if bin(s_count).count("1")%2!=P[j]:
            break
        else:
            a+=1
print(a)

a,p=map(int,input().split())
print((a*3+p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import java.util.Scanner;
class Main{
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int P = scanner.nextInt();
        int ans = (A*3+P)/2;
        System.out.println(ans);
    }
}

A,P = map(int,input().split())
print(int((A*3+P)/2))

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,b=map(int,input(),split())
n=int((a*3+b)/2)

print(n)

a,b=map(int,input().split())
n=int((a*3+b)/2)
 
print(n)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,B map(int,input().split())
goukei=3*A+B
print(int(goukei/2))

A,B =map(int,input().split())
goukei=3*A+B
print(int(goukei/2))

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

print((3*a+p)/2)

a, p = map(int,input().split())
ans = (a * 3 + p) // 2

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a=int(input())
p=int(input())欠片
c=a*3
b=(c+p)//2
print(b)


a=int(input())
p=int(input())
c=a*3
b=(c+p)/2
print(b)

a,p=int(input().split())
c=a*3
b=(c+p)//2
print(b)


a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P=map(int(input().split())
print((3*A+P)//2)


A,P=map(int,input().split())
print((3*A+P)//2)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p=map(int,inqut().sprit())
print((3*a+p)//2)

a,p = map(int,input().split())
print((3*a+p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a, p = input().split()
print((3 * a + p) / 2)

a, p = list(map(int,input().split()))
print(int(((3 * a + p) / 2)))


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P=map(int, input().split())
if (3*A+P)/2==0: print(int((3*A+P)/2))
else: print(int((3*A+P-1)/2))

A,P=map(int, input().split())
if (3*A+P)/2==0: print((3*A+P)/2)
else: print(int((3*A+P-1)/2))

A,P=map(int, input().split())
if (3*A+P)%2==0: print(int((3*A+P)/2))
else: print(int((3*A+P-1)/2))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

print((A*3+p)/2)

A, P = map(int, input().split())
print((A*3+P)/2)

A, P = map(int, input().split())
print((A*3+P)//2)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import itertools


N, M = map(int, input().split())
connected_switches = [[int(x) - 1 for x in input().split()[1:]] for x in range(M)]
conditions = list(map(int, input().split()))

is_ok = 0
for patterns in itertools.product((0, 1), repeat=M):
    patterns = list(patterns)
    on_light = 0
    for i, light in enumerate(connected_switches):
        turned_sw = 0
        for switch_id in light:
            turned_sw += patterns[switch_id]
        if turned_sw % 2 == conditions[i] if i in conditions else -1:
            on_light += 1
    if on_light == M:
        is_ok += 1

print(is_ok)


A, P = map(int, input().split())

apple = A * 3 + P
print(apple // 2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P=map(input().split())
answer = int((A*3+P)/2)
print(answer)

A,P =(int(x) for x in input().split())
answer = int((A*3+P)/2)
print(answer)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P= map(int, input().split())
B=(3*A+P) % 2
print(B)

A,P= map(int, input().split())
print((3*A+P)%2))


A,P= map(int, input().split())
print((3*A+P) // 2)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
line = input().split(' ')
a = int(line[0])
p = int(line[1])
n = (a*2 + p)//2
print(n)


line = input().split(' ')
a = int(line[0])
p = int(line[1])
n = (a*3 + p)//2
print(n)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
n = int(input().split())

num1 =  ( n[0] * 3 + n[1] ) // 2

print(num1)

n = int(input().split())

num1 =  ( int(n[0]) * 3 + int(n[1]) ) // 2

print(num1)

n =input().split()

num1 =  ( int(n[0]) * 3 + int(n[1])) // 2

print(num1)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = input().split()
print((3*A+P)/2)

A,P = input().split()
print((3*A+P)/2)


A, P = input().split()
B = 3 * A + P
print(B/2)


A, P = input().split()
print(int((3*int(A)+int(P))/2))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p = map(int, input().split())
print(int((3*a+p)-(3*a+p)%2)/2)

a,p = map(int, input().split())
print(((3*a+p)-(3*a+p)%2)/2)


a,p = map(int, input().spilit())
print((3*a+p)/2-(3*a+p%2))


a,p = map(int, input().split())
print(int(((3*a+p)-(3*a+p)%2)/2))

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a, p = map(int, input().split())
peice = 3*a + p
print(int(peice/3))

a, p = map(int, input().split())
peice = 3*a + p
print(int(peice/2))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
#128 b 
n=int(input())
res=[]
for i in range(n):
    a,b=list(input().split())
    b=-1*int(b)
    res.append([a,b,i+1])
res=sorted(res)
for x in res:
    print(x[2])


#128 b
n=int(input())
res=[]
for i in range(n):
    a,b=list(input().split())
    b=-1*int(b)
    res.append([a,b,i+1])
res=sorted(res)
for x in res:
    print(x[2])

#128 a
a,p=map(int,input().split())
kakera=a*3+p
ans=int(kakera/2)
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
int A = input()
int B = input()

print(int((3*A+B)/2))

A, P = map(int, input().split())

print((3*A+P)//2)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p=input().split()
print((3*a+p)//2)

a,p=int(input().split())
print((3*a+p)//2)

a,p=map(int,input().split())
print((3*a+p)//2)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
N = int(input())
SList = []
PList = []
dic = {}
Slist = []
aa = []
for _ in range(N):
    S, P = input().split()
    dic[S] = int(P)
    Slist.append(S)
    aa.append((int(P), S))
dic = sorted(dic.items())

sortedS = list(sorted(set(Slist)))

for i in range(len(sortedS)):
    tempV = []
    tempI = []
    for j in range(N):
        if aa[j][1] == sortedS[i]:
            tempV.append(aa[j][0])
            tempI.append(j)
    indexList = np.argsort(tempV)
    for k in reversed(indexList):
        print(tempI[k] + 1)


A, P = map(int, input().split())
P = A * 3 + P
print(int(P // 2))


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, B = input().split()
return (A*3 + B)//2

A, B = int(input().split())
return (A*3 + B)//2 

A,P = map(int,input().split())
print((3*A+P)//2)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):

N = int(input())
S=[0]*N
P=[0]*N 
for i in range(N):
    S[i], P[i] = input().split()
    P[i] = int(P[i])

S_mid = sorted(S, key=lambda idx: P[idx] )
fin = sorted(range(N), key=lambda idx: S_mid[idx])
for i in fin:
    print (i)

A, P = input()
P += A*3
pi = int(P/3)
print (pi)

A, P = input().split()
P += A*3
pi = int(P/3)
print (pi)

A, P = map(int, input().split())
P += A*3
pi = int(P/3)
print (pi)

A, P = raw_input().split()
P += A*3
pi = int(P/3)
print (pi)

A, P = map(int, input().split())
P += A*3
pi = int(P/2)
print (pi)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a , p = map(int , input().split())
print(3*a+p//2)

a , p = map(int , input().split())
print((3*a+p)//2)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
n,q = map(int, input().split())
STXlist = [list(map(int,input().split())) for _ in range(n)]
D = [(-1)*int(input()) for _ in range(q)]

time = 0
stop = 1
ans = [1j] * q
T = (sorted(STXlist, key=lambda x: x[1],reverse=True))  
Tmax = T[0][2]

while True:
    time += 1
    D = list(map(lambda x:x+1 , D))

    for STX in STXlist:
        if time >= STX[0] and time < STX[1]:
            if STX[2] in D:
                stop += 1
                ans[D.index(STX[2])] = D[D.index(STX[2])]
                D[D.index(STX[2])] = (1 + 1j)

    if stop == q:
        for i in ans:
            print(i)
        break
    
    if time > Tmax + 10:
        indexes = [i for i, x in enumerate(ans) if x == 1j]
        for i in indexes:
            ans[ans.index(1j)] = -1
        for i in ans:
            print(i)
        break


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


print((a*3 + p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
N=int(input())
book=[]
for i in range(N):
    s,p =input().split()
    book.append((s,int(p),i))
    
s=sorted(book, key=lambda x: ( x[0],-x[1]))
for i in range(N):
    print(s[i][2]+1)


A,P = map(int, input().split())
print((3*A+P)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
pie=int("3*A+P")
if pie//2:
 (3*A+P)/2
else :
 (3*A+P-1)/2

a, p = map(int, input().split())
print((a*3+p) // 2)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p = map(int,input().split())
p = 3a + p
print(p//2)

a,p = map(int,input().split())
p = 3*a + p
print(p//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

print(int((A*3)+P)/2)

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

print(int(((A*3)+P)/2))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P=(int(i) for i in input().split())
print((3*A+P)/2)

A,P=int(i) for i in input().split()
print((3*A+P)/2)

A,P=(int(i) for i in input().split())
print(int((3*A+P)/2))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = map(int, input().split())
D = 3*A + P
if D % 2 == 0:
    print(int(D/2))
else:
    print(round(int((D/2))

A, P = map(int, input().split())
D = 3*A + P
if D % 2 == 0:
    print(D/2)
else:
    print(round(D/2))

A, P = map(int, input().split())
D = 3*A + P
print(D//2)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import sys
input = sys.stdin.readline
read = sys.stdin.read

def main():
  n, q = map(int, input().split())
  event = []
  stop = set()
  for _ in range(n):
    s, t, x = map(int, input().split())
    event.append((s-x, 1, x))
    event.append((t-x, -1, x))
  event.sort()
  event.append((float("inf"), 0, 0))
  D = list(map(int, read().split()))
  now = 0
  for t, b, x in event:
    while t > D[now]:
      if stop:
        print(min(stop))
      else:
        print(-1)
      now += 1
      if now == q:
        exit()
    if b == 1:
      stop.add(x)
    else:
      stop.remove(x)
      
if __name__ == "__main__":
  main()

a, p = map(int, input().split())
print((3*a+p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import sys
inputs = sys.stdin.readline
N, Q= map(int,inputs().split())
V = [list(map(int,inputs().split())) for p in [0]*N]

for q in [0]*Q:
	m = int(inputs())
	for n in range(N):
		if V[n][0] - V[n][2] <=m and m <= V[n][1] - V[n][2] -1:
			print(V[n][2])
			break
	else:
		print(-1)


import sys
inputs = sys.stdin.readline
N, Q= map(int,inputs().split())
V = [None]*N
E = []
for n in range(N):
	V[n] = list(map(int,inputs().split()))
	V[n][0] -= V[n][2]
	V[n][1] -= V[n][2]
	E.append([V[n][0],1,V[n][2]])
	E.append([V[n][1],-1,V[n][2]])
D = [int(inputs()) for p in [0]*Q]
E.sort(key = lambda x:x[0])
mini = 1000000001
kouho = [1000000001]
q = 0
d = D[0]
for e in E:
	flag = 0
	if e[0] <= d:
		if  e[1] == 1:
			kouho.append(e[2])
		elif e[1] == -1:
			kouho.remove(e[2])
	if e[0] > d:
		for k in kouho:
			mini = min(k,mini)
		if mini < 1000000001:
			print(mini)
			mini = 1000000001
		else:
			print(-1)
			mini = 1000000001
		flag = 1
		if q < Q-1:
			q = q + 1
			d = D[q]
		else:
			break
	if e[0] <= d and flag == 1:
		if  e[1] == 1:
			kouho.append(e[2])
		elif e[1] == -1:
			kouho.remove(e[2])
for t in [None]*(Q-q):
	print(-1)

import sys
from operator import itemgetter
inputs = sys.stdin.readline
N, Q= map(int,inputs().split())
def main():
	E = [None]*2*N
	for n in range(N):
		a,b,c = map(int,inputs().split())
		E[2*n] = (a - c, 1, c)
		E[2*n + 1] = (b - c, -1, c)
	E.sort(key=itemgetter(0))
	tuple(tuple(E))
	mini = 1000000001
	kouho = {1000000001}
	my_add = kouho.add
	my_discard = kouho.discard
	q = 0
	d = int(inputs())
	flag = False
	cont = False
	for e in E:
		while(e[0] > d):
			if cont == True:
				if mini < 1000000001:
					print(mini)
				else:
					print(-1)
			else:
				mini = min(kouho)
				if mini < 1000000001:
					print(mini)
				else:
					print(-1)
			cont = True
			if q < Q-1:
				q = q + 1
				d = int(inputs())
			else:
				flag = True
				q = q + 1
				break
		if flag == True:
			break
		if e[1] == 1:
			my_add(e[2])
			if mini > e[2]:
				mini = e[2]
		elif e[1] == -1:
			my_discard(e[2])
			cont = False
	for t in [None]*(Q-q):
		print(-1)
		
def sub():
	V = [list(map(int,inputs().split())) for p in [0]*N]
	M = [int(inputs()) for p in [0]*Q]
	V.sort(key = lambda x:(x[2],x[0],x[1]))
	for v in V:
		v[0] -= v[2]
		v[1] -= v[2] + 1
	for m in M:
		for n in range(N):
			if V[n][0] <=m and m <= V[n][1]:
				print(V[n][2])
				break
		else:
			print(-1)


if N>200000:
	sub()
else:
	main()

import sys
input = sys.stdin.readline
a,p = map(int,input().split())
ans = (3*a + p)//2
print(ans)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a,p=map(int,input().split())
print(a*3/2+p/2)

a,p=map(int,input().split())
print(int(a*3/2+p/2))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
n, k = map(int, input().split())
a = [int(x) for x in input().split()]
mx = 0
for i in range(min(n, k + 1)):
	for j in range(min(k - i + 1, n - i + 1)):
		summa = 0
		b = []
		for t in range(i):
			b.append(a[t])
		for t in range(n - j, n):
			b.append(a[t])
		z = k - i - j
		b.sort()
		for x in b:
			if x < 0 and z > 0:
				z -= 1
			else:
				summa += x
		mx = max(mx, summa)
print(mx)


n, k = map(int, input().split())
a = [int(x) for x in input().split()]
mx = 0
for i in range(min(n + 1, k + 1)):
	for j in range(min(k - i + 1, n - i + 1)):
		summa = 0
		b = []
		for t in range(i):
			b.append(a[t])
		for t in range(n - j, n):
			b.append(a[t])
		z = k - i - j
		b.sort()
		for x in b:
			if x < 0 and z > 0:
				z -= 1
			else:
				summa += x
		mx = max(mx, summa)
print(mx)


a, b = map(int, input().split())
a = a * 3 + b
print(a // 2)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

result =( A * 3 + P ) / 2

print(result)

A,P = map(int, input().split())

result =( A * 3 + P ) // 2

print(result)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
i = list(map(int, input().split())) 
Apple = 3 * i[0] + i[1]
Apple//2

i = list(map(int, input().split())) 
Apple = 3 * i[0] + i[1]
print(Apple//2)

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import numpy as np
import itertools as ittr

def test_switch(e_balls, sw, p):
    for i, e_ball in enumerate(e_balls):
        si = sw[e_ball - 1]
        
        if p[i] != (np.sum(si == 1) % 2):
            return False
    
    return True

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

e_balls = []

for m in range(M):
    i = input().split()
    s = [int(si) for si in i[1:]]
    e_balls.append(np.asarray(s))

p = [int(pi) for pi in input().split()]

cnt = 0

for sw in ittr.product([0, 1], repeat = N):
    if test_switch(e_balls, np.array(sw), p):
        cnt += 1

print(cnt)

import numpy as np

n_consts, n_agents = map(int, input().split())
const_plans = []
dep_times = []
results = [-1 for _ in range(n_agents)]

for _ in range(n_consts):
    const_plans.append([int(e) for e in input().split()])

const_plans = np.array(const_plans)
order_by_x = np.argsort(const_plans.T)[-1]
const_plans = const_plans[order_by_x]

for _ in range(n_agents):
    dep_times.append(int(input()))

for n_agent, dep_time in enumerate(dep_times):
    for const_plan in const_plans:
        x = const_plan[2]
        x1 = max(0, const_plan[0] - dep_time)
        x2 = max(0, const_plan[1] - dep_time)
        if x1 <= x < x2:
            results[n_agent] = x

for result in results:
    print(result)

A, P = map(int, input().split())

print((3 * A + P) // 2)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

print((3A+P)//2)

A,P=map(int,input().split())

print((3*A+P)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
w = input()
s = w.split()

apple = int(s[0])
piece = int(s[1])


answer = ( 3 * apple + piece - (( 3 * apple + piece ) % 2 ) /2

print(answer)

w = input()
s = w.split()

apple = int(s[0])
piece = int(s[1])


answer = int(( 3 * apple + piece - (( 3 * apple + piece ) % 2 )) /2)

print(answer)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a=int(input())
p=int(input())
print(int((3*a+p)/2))

a,p= map(int ,input().split())
print(int((3*a+p)/2))




Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
X=[input() for i in range(2)]
A,P=X[0],X[1]

print(int(A*3+P)/2)


X=input()
X=X.split()
A,P=int(X[0]),int(X[1])

print(int(A*3+P/2))


X=input()
X=X.split()
A,P=int(X[0]),int(X[1])

print(int((A*3+P)/2))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import math
A=int(inport())
P=int(inport())

#3A/2=pai
P=3*A
pai=P/2
print(math.floor(pai))

A=int(inport())
P=int(inport())

pai=(3*A+P)/2
print(pai)


import math
A=int(inport())
P=int(inport())

pai=(3*A+P)/2
print(math.floor(pai))


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

pai=int((3*A+P)//2)
print(pai)

A=int(inport())
P=int(inport())

pai=int((3*A+P)/2)
print(pai)



A,B= map(int, input().split())
print((3*A+P)//2)


A=int(inport())
P=int(inport())

pai=int((3 * A + P) // 2)
print(pai)

A=int(input())
P=int(input())
print((3*A+P)//2)

A,P= map(int, input().split())
print((3*A+P)//2)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A,P = [int(x) for x in input().split()]
X = (P + 3 * A)/2
print(X)


A,P = [int(x) for x in input().split()]
X = (P + 3 * A)/2
print(int(X))


Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import sys

sys.setrecursionlimit(500000)
def input():
    return sys.stdin.readline()[:-1]

def main():
    N,Q = list(map(int,input().split()))

    road = []
    x_list = []

    for i in range(N):
        s,t,x = list(map(int,input().split()))
        road.append([0,s-x,x])
        road.append([1,t-x,x])

    for i in range(Q):
        road.append([2,int(input()),i])

    from collections import defaultdict

    counter = defaultdict(int)
    counter[10**27] = 1
    ans = [0]*Q

    road.sort(key=lambda x:x[0])
    road.sort(key=lambda x:x[1])

    q = [10**27]

    from heapq import heappop,heappush

    for id,_,x in road:
        if id==0:
            heappush(q,x)
            counter[x]+=1
        elif id==1:
            counter[x]-=1
        else:
            while counter[q[0]]==0:
                heappop(q)
            #print(q)
            if q[0]<10**27:
                ans[x] = q[0]
            else:
                ans[x] = -1
    print("\n".join(map(str,ans)))

if __name__ == '__main__':
    main()




A,P=list(map(int,input().split()))

P+=A*3

print(P//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

if c<d:
    s = list(s)
    h = s[b:d]
    for i in range(1,len(h)):
        if "
            print("No")
            break
    else:
        hh = s[a:c]
        for i in range(1,len(hh)):
            if "
                print("No")
                break
        else:
            print("Yes")
else:
    if "..." in s[a:d]:
        h = s[a:c]
        for i in range(1,len(h)):
            if h[i]==h[i-1] and h[i]=="#":
                print("No")
                break
        else:
            hh = s[b:d]
            for i in range(1,len(hh)):
                if hh[i]==hh[i-1] and hh[i]=="#":
                    print("No")
                    break
            else:
                print("Yes")
    else:
        s = list(s)
        h = s[b:d]
        for i in range(1,len(h)):
            if h[i]==h[i-1] and h[i]=="#":
                print("No")
                break
        else:
            print("No")





a, p = map(int,input().split())
print((3*a+p)//2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A=int(input(" enter no of apples")
P=int(input(" enter no of peices ")
n=A*3
pe=n+P
apple=pe//2
print(apple)



A, P = int(input())
P += A * 3
print(int(P / 2))

n=A*3
pe=n+P
apple=pe//2


A, P = map(int, input().split())
P += A * 3
print(int(P / 2))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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


ap_chip += app*3


print(int(ap_chip%2)


app, ap_chip = map(int,list(input().split()))


ap_chip += app*3


print(int(ap_chip/2))

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = [int(i) for i in input().split()]

N = A + P//3

print(N)

A, P = [int(i) for i in input().split()]

num_of_apples = A +round(P//3)

print(num_of_apples)


A, P = [int(i) for i in input().split()]

print((3 * A + P//2))

A, P = [int(i) for i in input().split()]

num_of_apples = A +round(P//3)

num_of_applepies = num_of_apples // 2
print(num_of_applepies)


A, P = [int(i) for i in input().split()]

print((3 * A + P)//2)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

print int((3*a+p)/2)

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

print(int((3*a+p)/2))


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
N=int(input())
info=[input().split() for i in range(N)] 
#print(info)
from operator import itemgetter
dic1={}
for i in range(len(info)):
    dic1[i+1]=info[i]
#print(dic1)
info1=sorted(info,key=lambda x:int(x[1]),reverse=True)
info2=sorted(info1,key=itemgetter(0))
#print(info2)
for i in info2:
    for key,value in dic1.items():
        if value==i:
            print(key)


A,P=int(input().split())
num=3A+P
print(num//2)


A,P=map(int,input().split())
num=3*A+P
print(num//2)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
a, b = input()
print((a*3+b)//2)


a , b = input().split()
print((a*3+b)//2)

a,b =input().split()
print((int(a)*3+int(b))//2)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

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

a_p=a*3
p_total=a_p+p
print(p_total//3)

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

a_p=a//3
p_total=a_p+p
print(p_total//3)

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

a_p=a*3
p_total=a_p+p
print(p_total//2)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = map(int, input().split())
if (3*A + P) % 2== 0:
    print((3*A + P) /2)
else:
    print((3*A + P-1)/2)

A, P = map(int, input().split())
if (3*A + P) % 2== 0:
    print(int((3*A + P) /2))
else:
    print(int((3*A + P-1)/2))

Verdicts: Wrong Answer

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
A, P = [int(i) for i in input().split()]
print((A * 3 + P) // ￼2)

A, P = [int(i) for i in input().split()]
print((A * 3 + P) // 2)


Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
import numpy as np
N, Q = [int(x) for x in input().split()]
STX = np.zeros((N, 3))
for i in range(N):
    STX[i, 0], STX[i, 1], STX[i, 2] = [int(x) for x in input().split()]
D = [int(input()) for _ in range(Q)]
STX = STX[np.argsort(STX[:, 2])]

for d in D:
    STX_copy = np.copy(STX)
    STX_copy[:, :2] = STX_copy[:, :2] - d
    try:
        print(int(STX_copy[np.where((STX_copy[:, 0] - 0.5 <= STX_copy[:, 2]) & (STX_copy[:, 1] - 0.5 >= STX_copy[:, 2]))][0, 2]))
    except:
        print(-1)


A, P = map(int, input().split())
print((3 * A + P) // 2)

Verdicts: Runtime Error

Accepted
Problem: We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.

Submission attempts (in order):
ap=input().split()
print((int(ap[0])＊3+int(ap[1]))//2)


ap = input().split()
print((int(ap[0])*3+int(ap[1]))//2)


Verdicts: Runtime Error

Accepted