Submission #3775371
Source Code Expand
N,M=map(int,input().split()) 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) x.sort() y.sort() 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 | Python (3.4.3) |
Score | 0 |
Code Size | 287 Byte |
Status | TLE |
Exec Time | 2104 ms |
Memory | 11416 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | 17 ms | 2940 KB |
example1 | AC | 17 ms | 2940 KB |
example2 | AC | 17 ms | 2940 KB |
example3 | AC | 17 ms | 3060 KB |
last0 | AC | 543 ms | 3060 KB |
last1 | AC | 522 ms | 3060 KB |
many0 | TLE | 2104 ms | 11416 KB |
many1 | TLE | 2104 ms | 11392 KB |
rand0 | AC | 350 ms | 3060 KB |
rand1 | AC | 518 ms | 3060 KB |
rand2 | AC | 307 ms | 3060 KB |