# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
366953 | vishesh312 | Tracks in the Snow (BOI13_tracks) | C++17 | 1148 ms | 984844 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bits/stdc++.h"
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
*/
#define all(x) begin(x), end(x)
#define sz(x) (int)x.size()
using ll = long long;
const int mod = 1e9+7;
vector<string> v;
int n, m;
int ans = 0;
array<vector<array<int, 2>>, 2> cur;
bool isValid(int i, int j) {
return i < n and i >= 0 and j < m and j >= 0 and v[i][j] != '.';
}
vector<array<int, 2>> moves = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
void dfs(array<int, 2> a) {
char c = v[a[0]][a[1]];
v[a[0]][a[1]] = '.';
for (auto m : moves) {
int nx = a[0] + m[0], ny = a[1] + m[1];
if (isValid(nx, ny)) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |