/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 21ms 3.066 MiB
#2 Wrong Answer 339ms 3.672 MiB
#3 Wrong Answer 394ms 3.887 MiB
#4 Wrong Answer 400ms 3.918 MiB
#5 Wrong Answer 596ms 18.121 MiB
#6 Wrong Answer 608ms 18.207 MiB

Code

import sys
from heapq import heapify, heapreplace
input = sys.stdin.readline

n = int(input())
a = list(map(int, input().split()))
h = [(v, i) for i, v in enumerate(a)]
heapify(h)
for _ in range(int(input())):
    x = int(input())
    v, i = h[0]
    print(i + 1, end=' ')
    heapreplace(h, (max(v, x), i))
    a[i] = max(v, x)
print()

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:47:53
Judged At
2024-10-03 13:29:51
Judged By
Score
0
Total Time
608ms
Peak Memory
18.207 MiB