# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
570596 | egod1537 | Young Zebra (KRIII5_YZ) | C++14 | 90 ms | 12004 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;
typedef pair<int, int> pi;
#define x first
#define y second
int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, 1, 0, -1 };
int ans[1201][1201];
bool vit[1201][1201], arr[1201][1201];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n, m; cin >> n >> m;
for (int i = 0; i < n; i++)
{
string str; cin >> str;
for (int j = 0; j < 3 * m; j++)
{
arr[i][j] = str[j % m] == 'B';
arr[i+n][j] = str[j % m] == 'B';
arr[i+2*n][j] = str[j % m] == 'B';
}
}
n *= 3; m *= 3;
for (int i = 0; i < n; i++)
{
if (vit[i][0]) continue;
queue<pi> q;
q.push({ i, 0 }); vit[i][0] = true;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |