Submission #3440092
Source Code Expand
N,M = list(map(int, input().split())) L = [0 for i in range(N)] for i in range(M): a, b = list(map(int, input().split())) if a == 1: L[b - 1] += 1 elif b == 1: L[a - 1] += 1 elif a == N: L[b - 1] += 1 elif b == N: L[a - 1] += 1 else: pass if L.count(2) >= 1: print("POSSIBLE") else: print("IMPOSSIBLE")
Submission Info
Submission Time | |
---|---|
Task | C - Cat Snuke and a Voyage |
User | su_565fx |
Language | Python (3.4.3) |
Score | 300 |
Code Size | 343 Byte |
Status | AC |
Exec Time | 727 ms |
Memory | 4760 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 | 17 ms | 3064 KB |
example1 | AC | 17 ms | 3064 KB |
example2 | AC | 22 ms | 3864 KB |
example3 | AC | 17 ms | 3060 KB |
last0 | AC | 673 ms | 4632 KB |
last1 | AC | 638 ms | 4656 KB |
many0 | AC | 711 ms | 4656 KB |
many1 | AC | 727 ms | 4760 KB |
rand0 | AC | 430 ms | 4528 KB |
rand1 | AC | 629 ms | 4528 KB |
rand2 | AC | 374 ms | 4528 KB |