# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1270487 | algoproclub | Hiperkocka (COCI21_hiperkocka) | C++20 | 0 ms | 320 KiB |
// UUID: a14343e5-6647-48a8-9a33-ea8ae548494c
#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;
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... |