Submission #3775340


Source Code Expand

N,M=map(int,input().split())
v=[]
x=[]
y=[]
for i in range(M):
    a,b=map(int,input().split())
    if a==1:
        x.append(b)
    if b==N:
        y.append(a)
for i in x:
    if i in y:
        print("POSSIBLE")
        break
else:
    print("IMPOSSIBLE")

Submission Info

Submission Time
Task C - Cat Snuke and a Voyage
User moro
Language PyPy3 (2.4.0)
Score 0
Code Size 273 Byte
Status TLE
Exec Time 2107 ms
Memory 57944 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 4
AC × 9
TLE × 2
Set Name Test Cases
Sample example0, example1, example2, example3
All example0, example1, example2, example3, last0, last1, many0, many1, rand0, rand1, rand2
Case Name Status Exec Time Memory
example0 AC 172 ms 38256 KB
example1 AC 166 ms 38256 KB
example2 AC 164 ms 38256 KB
example3 AC 166 ms 38256 KB
last0 AC 820 ms 44120 KB
last1 AC 824 ms 44120 KB
many0 TLE 2107 ms 57944 KB
many1 TLE 2107 ms 57944 KB
rand0 AC 605 ms 43608 KB
rand1 AC 821 ms 43992 KB
rand2 AC 586 ms 43608 KB