제출 #946960

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
9469602024-03-15 08:32:51ezzzayDango Maker (JOI18_dango_maker)C++14
13 / 100
1 ms2396 KiB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define double long double
const int N=3e3+5;
char arr[N][N];
int ans=0;
int n,m;
int dp[N][N];
void fun(int y, int x, int w){
if(dp[y][x]>w)return;
dp[y][x]=w;
ans=max(ans,w);
for(int i=y;i<=n;i++){
if(i==y){
for(int j=x;j<=m;j++){
if(arr[i][j]=='R' and arr[i][j+1]=='G' and arr[i][j+2]=='W'){
arr[i][j]='X';
arr[i][j+1]='X';
arr[i][j+2]='X';
fun(i,j,w+1);
arr[i][j]='R';
arr[i][j+1]='G';
arr[i][j+2]='W';
}
if(arr[i][j]=='R' and arr[i+1][j]=='G' and arr[i+2][j]=='W'){
arr[i][j]='X';
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

dango_maker.cpp: In function 'int main()':
dango_maker.cpp:67:9: warning: unused variable 'cnt' [-Wunused-variable]
   67 |     int cnt=0;
      |         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...