# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
715652 | Makarooni | Tracks in the Snow (BOI13_tracks) | C++17 | 2135 ms | 990004 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;
#define all(x) x.begin(), x.end()
#define pb(x) push_back(x)
#define endl '\n'
#define sz(x) (int)x.size()
#define mr(x, y) make_pair(x, y)
#define F first
#define S second
#define pii pair<int, int>
const int N = 4e3 + 10;
const int MOD = 1e9 + 7;
char c[N][N];
pair<int, int> par[N][N];
set<pii> pars;
vector<pair<int, int>> vec[N][N];
int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0}, n, m;
pii nxt;
string s[10];
void merge(pair<int, int> u, pair<int, int> v){
if(par[u.F][u.S] == par[v.F][v.S])
return;
u = par[u.F][u.S], v = par[v.F][v.S];
if(sz(vec[u.F][u.S]) > sz(vec[v.F][v.S]))
swap(u, v);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |