# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
241302 | dolphingarlic | Robots (APIO13_robots) | C++14 | 1594 ms | 89296 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 optimize("O3")
#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;
const int INF = 1061109567;
int n, h, w;
char g[500][500];
pair<int, int> end_pos[500][500][4];
int dp[500][500][9][9];
bool inside(int x, int y) {
return (x >= 0 && y >= 0 && x < h && y < w && g[x][y] != 'x');
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> w >> h;
memset(dp, 0x3f, sizeof(dp));
FOR(i, 0, h) FOR(j, 0, w) {
cin >> g[i][j];
if (g[i][j] - '0' > 0 && g[i][j] - '0' < 10) {
dp[i][j][g[i][j] - '1'][g[i][j] - '1'] = 0;
}
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... |