Answer the question
In order to leave comments, you need to log in
The block is no longer responsive. Bootstrap 3 Solutions?
The block is no longer responsive. That is, when the screen is reduced, the content (menu) ceases to be visible for mobile screens. The reason is that the height of the block has been set. Solutions? I am attaching screenshots.
Answer the question
In order to leave comments, you need to log in
Можно решать асимптотически быстрее если не заниматься симуляцией процесса.
Идея в том, что тот кто выходил подышать позже точно окажется после того кто выходил раньше или совсем не выходил.
fin = open('input.txt', 'r')
n, _, *actions = (int(v) for v in fin.read().split())
nToLastPos = {n : i for (i, n) in enumerate(actions)}
res = sorted(range(1, n + 1),
key=lambda v: nToLastPos.get(v, -1))
fout = open('output.txt', 'w')
fout.write(' '.join((str(a) for a in res)))
Какой-то слегка перегруженный у вас код
params1 = 4,5
params2 = 2,3,1,2,1
queue = [i for i in range(1,params1[0]+1)]
for num in params2:
queue.remove(num)
queue.append(num)
print(queue)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question