28502023-01-29 20:26:07VMGoJoRendőrségi őrjárat 2python3Wrong answer 0/100301ms87584 KiB
from sys import stdin, stdout
def main():
    n,m,l = map(int,stdin.readline().split())
    nodes:list[set[int]]=[]

    for i in range(n):
        nodes.append(set([i]))

    for i in range(m):
        a,b = map(int,stdin.readline().split())
        nodes[a].add(b)
        nodes[b].add(a)


    #print(nodes)
    #patrols=stdin.readline().split()
    #patrols = [int(i) for i in patrols]
    #cop_loc:int=patrols[0]
    #minutes:int=0
    #first_it_list:list[bool]=[False]*n
    #first_it_list[0]=True
    ##BREADTH FIRST SEARCH
    #def do_layer(first_it_l:list[bool]) ->list[bool]:
    #    rt_set:list[bool]=[False]*n
    #    for i in range(n):
    #        if first_it_list[i]==True:
    #            for j in nodes[i]:
    #                rt_set[j]=True
    #    return rt_set
    #while not first_it_list[n-1]==True:
    #    minutes+=1
    #    cop_loc=patrols[minutes%len(patrols)]
    #    first_it_list=do_layer(first_it_list)
    #    first_it_list[cop_loc]=False
    #stdout.write(str(minutes))

main()
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer17ms11092 KiB
2Wrong answer17ms11176 KiB
subtask20/30
3Wrong answer18ms12180 KiB
4Wrong answer17ms12516 KiB
5Wrong answer18ms12736 KiB
6Wrong answer18ms12952 KiB
7Wrong answer18ms13216 KiB
8Wrong answer18ms13176 KiB
9Wrong answer17ms13312 KiB
subtask30/30
10Wrong answer246ms77856 KiB
11Wrong answer296ms77988 KiB
12Wrong answer301ms78136 KiB
13Wrong answer298ms78120 KiB
14Wrong answer273ms78180 KiB
subtask40/40
15Wrong answer273ms87584 KiB
16Wrong answer254ms87532 KiB
17Wrong answer279ms84644 KiB
18Wrong answer280ms84616 KiB
19Wrong answer282ms84628 KiB
20Wrong answer239ms84660 KiB
21Wrong answer238ms84868 KiB
22Wrong answer238ms84716 KiB
23Wrong answer240ms83036 KiB
24Wrong answer237ms78412 KiB