# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
282840 | 2020-08-25T04:21:58 Z | muhammad_hokimiyon | Vision Program (IOI19_vision) | C++14 | 2 ms | 1148 KB |
#include "vision.h" #include <bits/stdc++.h> using namespace std; int dist( int x1 , int y1 , int x2 , int y2 ) { return abs(x1 - x2) + abs(y1 - y2); } void construct_network(int H, int W, int K) { int n = H; int m = W; vector < pair < int , int > > ask; for( int i = 0; i < n; i++ ){ for( int j = 0; j < m; j++ ){ if( i == n - 1 && j == m - 1 )continue; int x = 1 - add_not( i * m + j ); ask.push_back({ x , i * m + j }); } } int f = 0; vector < int > res; for( auto x : ask ){ if( x.first == 1 ){ res.push_back( x.second ); }else{ f = x.second; } } if( (int)res.size() == 1 ){ res.push_back( n * m - 1 ); } int x = dist( res[0] / m , res[0] % m , res[1] / m , res[1] % m ); if( x == K ){ int ans = add_not( res[0] ); }else{ int ans = add_not( f ); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 512 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 1148 KB | WA in grader: Too many instructions |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 384 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |