# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
83789 | teomrn | Tracks in the Snow (BOI13_tracks) | C++14 | 1847 ms | 877628 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
char mat[4010][4010];
vector <pair <int, int>> de_add, added, dir = { { -1, 0 }, { 1, 0 }, { 0, -1 }, { 0, 1 } };
int n, m;
char c;
void dfs(int a, int b)
{
mat[a][b] = '?';
de_add.push_back({ a, b });
for (auto i : dir)
if (mat[a + i.first][b + i.second] == c)
dfs(a + i.first, b + i.second);
}
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> m;
for (int i = 1; i <= n; i++)
cin >> (mat[i] + 1);
int ans = 0;
c = mat[1][1];
if (c == '.')
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |