Rezultati

Up. imeNalogaJezikRezultatČas oddaje
kjejenovictk-2018 Plezalne smeri Python 3 100/100OK 13. okt '18 @ 11:11

Test Točke Porabljen spomin Porabljen čas Status
#1 50/50 8,719 MiB 0,000 s OK
#2 50/50 8,711 MiB 0,000 s OK

Ocenjevani program (plezanje.py):
import sys

sys.setrecursionlimit(10**9)

data = sys.stdin.readlines()

#data = open("plezalne.txt").readlines()

difficutlies = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X', 'XI', 'XII']

n = 0
diffMap = {}
for i in difficutlies:
    for sign in ['-', '', '+']:
        diffMap[i + sign] = n
        n += 1


N = int(data[0])
data = data[1:]

urejene = [(None, None) for i in range(N)]

n = 0
for smer in data:
    ime, tezavnost = smer.strip().split()
    urejene[n] = (diffMap[tezavnost], ime)
    n += 1

urejene = sorted(urejene)

for tezavnost, ime in urejene:
    print(ime)


#a = list(map(int,data.strip().split()))