# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
919326 | raphaelp | T-Covering (eJOI19_covering) | C++14 | 171 ms | 20040 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;
void place(long long x, long long y, vector<vector<long long>> &special, long long &p, vector<long long> &depX, vector<long long> &depY, long long N, long long M, long long &tot, vector<vector<long long>> &Tab, long long &minn)
{
if (special[x][y] == 2)
return;
if (special[x][y] == 3)
{
p = 0;
return;
}
tot += Tab[x][y];
long long choose = -1;
for (long long j = 0; j < 4; j++)
{
if (x + depX[j] < 0 || x + depX[j] >= N || y + depY[j] < 0 || y + depY[j] >= M)
{
if (choose != -1)
p = 0;
choose = j;
}
else
{
minn = min(minn, Tab[x + depX[j]][y + depY[j]]);
tot += Tab[x + depX[j]][y + depY[j]];
if (special[x + depX[j]][y + depY[j]] > 0)
{
if (choose != -1)
p = 0;
choose = j;
# | 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... |