Time Exceeded
Code
n=int(input())
liN=list(map(int,input().split()))
m=int(input())
liM=list(map(int,input().split()))
res=[]
res=liN+liM
res.sort(reverse=True)
#print(res)
b=0
for i in range(len(liM)):
if liM.count(liM[i])==1:
idx=res.index(liM[i])+1+liN.count(liM[i])
print(idx,end=" ")
else:
idx=res.index(liM[i])+1+liN.count(liM[i])+b
print(idx,end=" ")
b+=1
Information
- Submit By
- Type
- Submission
- Problem
- P1049 Combined scoreboard
- Contest
- Brain Booster #3
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-05-06 16:24:17
- Judged At
- 2024-11-11 03:33:09
- Judged By
- Score
- 5
- Total Time
- ≥2091ms
- Peak Memory
- ≥17.219 MiB