# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101518 | lyc | Tracks in the Snow (BOI13_tracks) | C++14 | 1338 ms | 44080 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;
typedef long long ll;
typedef pair<int, int> ii;
#define fi first
#define sc second
#define SZ(x) (int)(x).size()
#define ALL(x) (x).begin(), (x).end()
int main() {
//freopen("in.txt", "r", stdin);
ios::sync_with_stdio(false);
cin.tie(0);
int h, w; cin >> h >> w;
string g[h];
for (int i = 0; i < h; ++i) {
cin >> g[i];
}
int dy[] = {-1, 0, 1, 0};
int dx[] = {0, 1, 0, -1};
bool vis[h][w]; memset(vis, 0, sizeof vis);
int ans = 0;
queue<ii> q[2];
q[0].push(ii(0, 0));
vis[0][0] = 1;
while ((!q[0].empty()) || (!q[1].empty())) {
for (int x = 0; x < 2; ++x) {
if (!q[x].empty()) ++ans;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |