Submission #1462679
Source Code Expand
Copy
#include<bits/stdc++.h> using namespace std; map < int , int > is[1<<20]; int main(){ int n , m; scanf("%d %d",&n,&m); for(int j = 1 ; j<= m ; j++){ int a , b; cin>>a>>b; is[a][b] =1; } for(int j = 1 ; j <= n ; j++){ if(is[1][j] && is[j][n]){ puts("POSSIBLE"); return 0; } } puts("IMPOSSIBLE"); }
Submission Info
Submission Time | |
---|---|
Task | C - Cat Snuke and a Voyage |
User | spiral_out |
Language | C++14 (GCC 5.4.1) |
Score | 300 |
Code Size | 408 Byte |
Status | AC |
Exec Time | 263 ms |
Memory | 68096 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:6:25: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d %d",&n,&m); ^
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 | 19 ms | 49408 KB |
example1 | AC | 19 ms | 49408 KB |
example2 | AC | 44 ms | 54144 KB |
example3 | AC | 19 ms | 49408 KB |
last0 | AC | 242 ms | 64128 KB |
last1 | AC | 212 ms | 58752 KB |
many0 | AC | 263 ms | 68096 KB |
many1 | AC | 222 ms | 60672 KB |
rand0 | AC | 186 ms | 64000 KB |
rand1 | AC | 255 ms | 67328 KB |
rand2 | AC | 173 ms | 63104 KB |