# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
101570 | shenxy | Tracks in the Snow (BOI13_tracks) | C++11 | 2101 ms | 31944 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cstring>
#include <utility>
using namespace std;
typedef pair<int, int> coord;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
int main() {
int H, W, numani = 0;
scanf("%d %d", &H, &W);
char mygrid[H][W];
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
scanf(" %c", &mygrid[i][j]);
if (mygrid[i][j] != '.') numani += 1;
}
}
char curani = mygrid[0][0];
int ans = 0, update = 0;
numani -= 1;
while (numani > 0) {
bool visited[H][W];
memset(visited, false, sizeof(visited));
visited[0][0] = true;
mygrid[0][0] = '?';
queue<coord> bfsq;
bfsq.push(coord(0, 0));
while (!bfsq.empty()) {
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |