Submission #1270485

#TimeUsernameProblemLanguageResultExecution timeMemory
1270485algoproclubHiperkocka (COCI21_hiperkocka)C++20
0 / 110
0 ms320 KiB
// UUID: 60aa264b-d0f2-4b37-a643-2438edc7108a
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;


vector<ll>edges[16];
ll h[17];
int main() {
	ll n; cin>>n;

	for(ll i=0; i<n; i++)
	{
		ll a,b;
		cin>>a>>b;
		if(a>b) swap(a,b);
		h[b]=(h[a]^(1<<(b-1)));
	}
	cout<<(1<<(n-1))<<endl;
	for(ll i=0; i<(1<<n); i++)
	{
		if((__builtin_popcount(i)%2)==0)
		{
			for(ll j=0; j<=n; j++)
			{
				cout<<(h[j]^i)<<" ";
			}cout<<"\n";
		}
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...