Submission #962381

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9623812024-04-13 11:52:12vjudge1Dango Maker (JOI18_dango_maker)C++14
33 / 100
2032 ms36700 KiB
#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]++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dango_maker.cpp: In function 'int main()':
dango_maker.cpp:94:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   94 |  scanf("%d%d", &n, &m);
      |  ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...