Submission #3775407
Source Code Expand
N,M=map(int,input().split()) x=[0]*(N+1) y=[0]*(N+1) for i in range(M): a,b=map(int,input().split()) if a==1: x[b]=1 if b==N: y[a]=1 for i in range(N+1): if x[i]==1 and y[i]==1: print("POSSIBLE") break else: print("IMPOSSIBLE")
Submission Info
Submission Time | |
---|---|
Task | C - Cat Snuke and a Voyage |
User | moro |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 293 Byte |
Status | AC |
Exec Time | 642 ms |
Memory | 6132 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
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 | 18 ms | 3060 KB |
example1 | AC | 18 ms | 3060 KB |
example2 | AC | 28 ms | 4596 KB |
example3 | AC | 19 ms | 3060 KB |
last0 | AC | 533 ms | 6132 KB |
last1 | AC | 526 ms | 6132 KB |
many0 | AC | 642 ms | 6132 KB |
many1 | AC | 576 ms | 6132 KB |
rand0 | AC | 378 ms | 5876 KB |
rand1 | AC | 546 ms | 5876 KB |
rand2 | AC | 328 ms | 5876 KB |