# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198818 | dolphingarlic | Portals (BOI14_portals) | C++14 | 1091 ms | 72692 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>
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse4,avx2,fma,avx")
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
bool open[1002][1002];
int n, m, visited[1002][1002], to_wall[1002][1002];
pair<int, int> graph[1002][1002][8], src, dest;
inline bool has_wall(int x, int y) {
return !(open[x - 1][y] && open[x + 1][y] && open[x][y - 1] &&
open[x][y + 1]);
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
FOR(i, 1, n + 1) FOR(j, 1, m + 1) {
char c;
cin >> c;
if (c != '#') open[i][j] = true;
if (c == 'S') src = {i, j};
if (c == 'C') dest = {i, j};
}
FOR(i, 1, n + 1) FOR(j, 1, m + 1) {
if (open[i - 1][j]) graph[i][j][0] = {i - 1, j};
# | 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... |