# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983391 | Faisal_Saqib | Mars (APIO22_mars) | C++17 | 8 ms | 4032 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 "mars.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define vll vector<ll>
const int N=100;
int n,m;
bool vis[N][N];
char g[N][N];
vector<pair<int,int>> dir={{0,-1},{0,1},{1,0},{-1,0}};
bool valid(int x,int y)
{
return (0<=x and x<n and 0<=y and y<m and !vis[x][y] and g[x][y]=='1');
}
void dfs(int x,int y)
{
vis[x][y]=1;
for(auto [dx,dy]:dir)
{
if(valid(x+dx,y+dy))
{
dfs(x+dx,y+dy);
}
}
}
string process(vector <vector<string>> a, int ip, int jp, int k, int na)
{
m=n=(2*na)+1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |