Submission #754863

# Submission time Handle Problem Language Result Execution time Memory
754863 2023-06-08T18:56:47 Z definitelynotmee Super Dango Maker (JOI22_dango3) C++17
0 / 100
3296 ms 656 KB
#include "dango3.h"
#include<bits/stdc++.h>
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<typename T>
using matrix = vector<vector<T>>;

namespace {

int variable_example = 1;

}  // namespace

void Solve(int N, int M) {
    matrix<int> resp(M);

    for(int i = 0; i < N*M; i++){
        int ini = 0, fim = M;

        while(ini!=fim){
            int m = (ini+fim+1)>>1;

            vector<int> ban(N*M);

            for(int i = m+1; i < M; i++){
                for(int j : resp[i])
                    ban[j] = 1;
            }
            ban[i] = 1;

            vector<int> qry;
            for(int i = 1; i <= N*M; i++){
                if(!ban[i])
                    qry.push_back(i);
            }

            if(Query(qry) <= m)
                ini = m;
            else fim = m-1;
        }

        resp[ini].push_back(i);
    }

    for(int i = 0; i < M; i++)
        Answer(resp[i]);
}

Compilation message

dango3.cpp:15:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
   15 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 340 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 728 ms 472 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3296 ms 656 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -