# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1157059 | vako_p | Olympiads (BOI19_olympiads) | C++20 | 1 ms | 584 KiB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define debug(x) cerr << '\n' << (#x) << " is " << (x) << " -> line: " << __LINE__ << endl;
//#define cerr if(false) cerr
const int mxN = 1e6;
ll n,k,c,a[mxN][10],x[mxN][10],idx[mxN],curr,val[mxN],mx;
bool ban[mxN][10],vis[mxN][10];
priority_queue<pair<ll,ll>, vector<pair<ll,ll>>> q;
vector<pair<ll,ll>> v[10];
map<vector<ll>,bool> mp;
void f(ll at){
ll cnt = 0;
for(int j = 0; j < n; j++) cnt += 1 - ban[at][j];
if(cnt <= k) return;
for(int i = idx[at]; i < k; i++){
curr++;
idx[curr] = i;
for(int j = 0; j < n; j++) ban[curr][j] = ban[at][j];
for(int j = 0; j < i; j++){
x[curr][j] = x[at][j];
vis[curr][x[curr][j]] = true;
}
ban[curr][x[at][i]] = true;
for(int j = i; j < k; j++){
for(auto it : v[j]){
if(vis[curr][it.second] or ban[curr][it.second]) continue;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |