hiho week 51 register

Ended

Participants:269

Verdict:Accepted
Score:100 / 100
Submitted:2015-06-23 10:22:56

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
using namespace std;
int a[16384][3];
void m(int i)
{
    static int sint=0;
    int temp=a[i][1];
    if(temp != -1)
    {
        a[i][1] = -1;
        m(temp);
    }
    temp=a[i][2];
    if(temp != -1)
    {
        a[i][2]=-1;
        m(temp);
    }
    if(sint++)
        cout<<i%2;
}
int main(int argc,char* argv[])
{
    int n=3;
    cin>>n;
    for(int i=0;i<((1<<(n-1)));++i)
    {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX