# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
535533 | Koful123 | Tracks in the Snow (BOI13_tracks) | C++17 | 2125 ms | 1048576 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 int long long
#define pb push_back
#define endl "\n"
#define mod 1000000007
#define ff first
#define ss second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const int N = 4005;
int vis[N][N],cnt,n,m,ans;
string s[N];
queue<pair<int,int>> q,tmp;
inline void dfs(int x,int y,char c){
if(x > n || y > m || y < 0 || x < 0) return;
if(vis[x][y]) return;
if(!vis[x][y] && s[x][y] != c){
tmp.push({x,y});
return;
}
if(!vis[x][y]){
vis[x][y] = 1;
cnt++;
}
dfs(x+1,y,c);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |