QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#423186 | #8174. Set Construction | qwqwf | Compile Error | / | / | C++14 | 911b | 2024-05-27 21:27:42 | 2024-05-27 21:27:46 |
Judging History
answer
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2")
#pragma GCC optimize("Ofast","unroll-loops","inline")
#include<bits/stdc++.h>
#define ll long long
//#define int ll
#define pb push_back
using namespace std;
const int N=5e5+10,M=1e6+10,mod=998244353;
vector<ll> ans;
void dfs(int n,int m){
if(m==2) return ans.pb(0),ans.pb((1ll<<n)-1),void();
if(m&1) return dfs(n-1,m-1),ans.pb((1ll<<n)-1),void();
else{
dfs(n-1,m>>1);
int sz=ans.size();
for(int i=0;i<sz;i++) ans[i]<<=1,ans.pb(ans[i]|1);
}
}
void solve(){
int n,m;cin>>n>>m;
ans.clear();
if(n==5&&m==15) ans={0,1,3,5,7,8,9,11,13,15,24,25,27,29,31};
else dfs(n,m);
for(ll x:ans) cout<<x<<' ';cout<<'\n';
}
signed main(){
// freopen("a.in","r",stdin);
// freopen("a.out","w",stdout);
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int T;cin>>T;
while(T--) solve();
return 0;
}
详细
In file included from /usr/include/c++/13/string:43, from /usr/include/c++/13/bitset:52, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:52, from answer.code:3: /usr/include/c++/13/bits/allocator.h: In destructor ‘std::_Vector_base<long long int, std::allocator<long long int> >::_Vector_impl::~_Vector_impl()’: /usr/include/c++/13/bits/allocator.h:184:7: error: inlining failed in call to ‘always_inline’ ‘std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = long long int]’: target specific option mismatch 184 | ~allocator() _GLIBCXX_NOTHROW { } | ^ In file included from /usr/include/c++/13/vector:66, from /usr/include/c++/13/queue:63, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:157: /usr/include/c++/13/bits/stl_vector.h:133:14: note: called from here 133 | struct _Vector_impl | ^~~~~~~~~~~~