Submission #890255

# Submission time Handle Problem Language Result Execution time Memory
890255 2023-12-20T20:13:44 Z amirhoseinfar1385 Super Dango Maker (JOI22_dango3) C++17
0 / 100
1 ms 604 KB
#include "dango3.h"
#include <bits/stdc++.h>
using namespace std;
int n,m,vis[18];
vector<vector<int>>alln;
vector<int>tof;
void aval(int now=0,int mina=0){
    if(now==4){
        alln.push_back(tof);
        return ;
    }
    for(int i=mina+1;i<=16;i++){
        tof.push_back(i);
        aval(now+1,i);
        tof.pop_back();
    }
}

void Solve(int N, int M) {
    n=N;
    m=M;
    if(n!=4||m!=4){
        assert(0);
    }
    aval();
    vector<int>now;
    for(int i=1;i<=n*m;i++){
        now.push_back(i);
    }
    for(int i=0;i<4;i++){
        for(int j=0;j<(int)alln.size();j++){
            int f=0;
            for(auto x:alln[j]){
                if(vis[x]==1){
                    f=1;
                }
            }
            if(f==0){
                int z=Query(alln[j]);
                if(z==1){
                    Answer(alln[j]);
                //    cout<<"wtf: ";
                 //  for(auto x:alln[j]){
                 //       cout<<x<<" ";
                 //       vis[x]=1;
                  //  }
                  //  cout<<"\n";
                }
            }
        }
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Wrong Answer [6]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 604 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 600 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -