# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
34226 | leejseo | Jakarta Skyscrapers (APIO15_skyscraper) | Pypy 2 | 1065 ms | 256 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
from heapq import *
MAX_INT = int(2E9)
class Edge(object):
def __init__(self, to, weight):
self.to = to
self.weight = weight
class Node(object):
def __init__(self, u, dist):
self.u = u
self.dist = dist
def __cmp__(self, other):
return cmp(self.dist, other.dist)
def dijkstra(V, start, adj_list):
Q = []
dist = [MAX_INT for i in range(V)]
dist[start] = 0
heappush(Q, Node(start, 0))
while Q:
u = Q[0].u
dist_u = Q[0].dist
heappop(Q)
if dist[u] < dist_u :
continue
for i in range(len(adj_list[u])):
v = adj_list[u][i].to
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |