Time Exceeded
Code
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
queries = [int(input()) for _ in range(Q)]
min_value = float('inf')
min_index = -1
for i in range(N):
if A[i] < min_value:
min_value = A[i]
min_index = i
for X in queries:
print(min_index + 1)
A[min_index] = X
min_value = float('inf')
for i in range(N):
if A[i] < min_value:
min_value = A[i]
min_index = i
Information
- Submit By
- Type
- Submission
- Problem
- P1086 KuZ the Position
- Contest
- Bangladesh 2.0
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-08-16 15:57:10
- Judged At
- 2024-11-11 03:16:45
- Judged By
- Score
- 20
- Total Time
- ≥1093ms
- Peak Memory
- ≥7.379 MiB