# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
41157 | 14kg | Portals (BOI14_portals) | C++11 | 920 ms | 117716 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#include <algorithm>
#include <queue>
#include <vector>
#define N 1001
#define INF 1000000000
using namespace std;
typedef pair<int,pair<int,int> > pip;
int n, m, board[N][N], go[N][N], d[N][N];
int dx[4]={1,-1,0,0}, dy[4]={0,0,1,-1};
bool go_check[N][N], check[N][N];
pair<int,int> S, E;
vector<pair<int,int> > p[N][N], O[1000001];
queue<int> Q;
queue<pip> PQ;
void bfs_go(){
int ty, tx, yy, xx;
bool w_check;
for(int i=1; i<=n; i++)
for(int j=1; j<=m; j++){
w_check=false;
for(int s=0; s<4; s++){
ty=i+dy[s], tx=j+dx[s];
if(ty<1 || ty>n || tx<1 || tx>m) w_check=true;
else if(board[ty][tx]) w_check=true;
}
if(w_check){
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |