# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1099635 | stomic07 | Portals (BOI14_portals) | C++17 | 1051 ms | 26180 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 <bits/stdc++.h>
using namespace std;
const int N = 1002;
int dozida[N][N];
int bio[N][N];
int ubacen[N][N];
int xmov[4] = {0, 1, 0, -1};
int ymov[4] = {-1, 0, 1, 0};
void reset(){
for (int i=0; i<N; ++i){
for (int j=0; j<N; ++j){
dozida[i][j] = -1;
bio[i][j] = -1;
ubacen[i][j] = -1;
}
}
}
void bfs_odzida(const vector<string>& v, vector<pair<int, int>>& fronta){
vector<pair<int, int>> novi;
for (int step = 0; !fronta.empty(); ++step){
novi.clear();
for (int i=0; i<fronta.size(); ++i){
pair<int, int> curr = fronta[i];
if (dozida[curr.first][curr.second] != -1) continue;
dozida[curr.first][curr.second] = step;
for (int j=0; j<4; ++j){
int y = curr.first + ymov[j];
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... |