# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
962381 | vjudge1 | Dango Maker (JOI18_dango_maker) | C++14 | 2032 ms | 36700 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;
const int N = 3010;
const string d = "RGW";
int n, m, ans;
int f[N][N], cnt[N][N];
string c[N];
vector<pair<pair<int, int>, bool>> p;
namespace Subtask1 {
bool check() {
return n <= 5 && m <= 5;
}
int len = 0;
void dfs(int x, int num) {
if (ans >= num + len - x + 1) return;
if (x == len) {
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
if (cnt[i][j] > 1) return;
ans = max(ans, num);
return;
}
dfs(x + 1, num);
if (p[x].second) {
for (int i = p[x].first.first; i <= p[x].first.first + 2; i++)
cnt[i][p[x].first.second]++;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |