My issue
I am new to coding and codechef, this is the first problem where there are subtasks. I have done coding for subtask with original constraints. I don’t know where to submit the coding for first subtask.
My code
# cook your dish here
N=int(input())
C=list(map(int, input(). split()))
T=list(map(int, input(). split()))
min_1=[]
min_2=[]
min_3=[]
for i in range(N):
if T[i]==3:
min_3.append(C[i])
elif T[i]==1:
min_1.append(C[i])
else:
min_2.append(C[i])
#print(min_1, min_2,min_3)
#print((min(min_1)),(min(min_2)),(min(min_3)))
trans=min(min_1)
author=min(min_2)
trans_author=min(min_3)
if trans+author>=trans_author:
print(trans_author)
else:
print(trans+author)
Learning course: Arrays using Python
Problem Link: Workers Practice Problem in - CodeChef