General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
231255483 Practice:
Sparkle_Twilight
263D - 19 PyPy 3 Accepted 1964 ms 18308 KB 2023-11-04 02:15:33 2023-11-04 02:15:33
→ Source
f=200001;v=[0]*f;g=[[]for _ in[0]*f];s=[1];n,m,k=map(int,input().split())
for _ in range(m):a,b=map(int,input().split());g[b]+=a,;g[a]+=b,
while 1:
    v[s[-1]]=1
    for i in g[s[-1]]:
        if v[i]<1:s+=i,;break
    else:
        t=set(g[s[-1]])
        for i in range(len(s)):
            if s[i]in t:exit(print(len(s)-i,*s[i:]))
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details