# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1270485 | algoproclub | Hiperkocka (COCI21_hiperkocka) | C++20 | 0 ms | 320 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 time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |