Submission #986830

# Submission time Handle Problem Language Result Execution time Memory
986830 2024-05-21T10:08:30 Z AlperenT_ Super Dango Maker (JOI22_dango3) C++17
0 / 100
280 ms 848 KB
#include "dango3.h"
#include <bits/stdc++.h>
 
#pragma GCC optimize("O3,unroll-loops")
#define pb push_back
#define F first
#define S second 
#define all(a) a.begin(),a.end()
#define pii pair <ll,ll>
#define PII pair<pii , pii>
#define ld long double
#define ll long long
#define sz(v) (int)v.size()
#define rep(i , a , b) for(int i=a;i <= b;i++)
#define per(i , a , b) for(int i=a;i >= b;i--)
using namespace std ;
const int maxn = 6e5 + 10  , N = 1e5 +1 , lg = 20 , maxq = 202   , inf = 1e9  , maxk = 2022  , mod =998244353;
vector <int> vec; 
int mark[maxn] ;


void sl(vector <int> vec , int m){
    if(m == 1){
        Answer(vec); 
        return ;
    }
    int x= m/2 ;
    rep(i , 0, sz(vec))mark[i] =0 ;
    rep(i , 0 ,sz(vec)-1){
        mark[vec[i]] = 1;
    } 
    rep(i , 0 , sz(vec)-1){
        mark[i] =0 ;
        vector <int> d ;
        rep(i , 0,sz(vec)-1){
            if(mark[i] == 1)d.pb(vec[i]); 
        }
        if(Query(d) < x){
            mark[i] = 1; 
        }
    }
    vector <int> v1 , v2 ;
    rep(i ,0 ,sz(vec)-1){
        if(mark[i] == 1)v1.pb(vec[i]);
        else v2.pb(vec[i]) ;
    }
    sl(v1 , x);
    sl(v2 , m-x) ;
}  

void Solve(int n, int m) {
    rep(i ,1 , n*m)vec.pb(i);
    sl(vec , m);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 596 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 73 ms 640 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 280 ms 848 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -