Submission #1172229

#TimeUsernameProblemLanguageResultExecution timeMemory
1172229sasdeArt Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include "art.h"
#define emb empalce_back
using namespace std;
vector<int>ans,res;
int n,tong;
bool k[10];
void cc(int i){
	if(i>n){
		int u=publish(res);
		if(u==tong){
			ans=res;
		}
		tong=u;
		return;
	}
	for(int j=1;j<=n;++j){
		if(!k[j]){
			k[j]=true;
			res.emb(j);
			if(ans.size())return;
			cc(i+1);
			if(ans.size())return;
			res.pop_back();
			k[j]=false;
		}
	}
}
void solve(int N){
n=N;
	cc(1);
	answer(ans);
    
}

Compilation message (stderr)

art.cpp: In function 'void cc(int)':
art.cpp:3:13: error: 'class std::vector<int>' has no member named 'empalce_back'; did you mean 'emplace_back'?
    3 | #define emb empalce_back
      |             ^~~~~~~~~~~~
art.cpp:20:29: note: in expansion of macro 'emb'
   20 |                         res.emb(j);
      |                             ^~~