# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
101518 | lyc | Tracks in the Snow (BOI13_tracks) | C++14 | 1338 ms | 44080 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |