hiho week 43 register

Ended

Participants:830

Verdict:Accepted
Score:100 / 100
Submitted:2015-04-27 10:35:22

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>
#include<fstream>
#include<vector>
#include<string>
#include<queue>
#include<map>
#include<stack>
#include<set>
using namespace std;
int temp[28][128][128];
int res[128][128];
int box[128][128];
void dfs(int x,int y,int col,int k)
{
    if (col == k)
    {
        temp[1][x][y] = 1;
        return;
    }
    if (((x&(1 << col)) ^ (y&(1 << col))) == (1<<col))dfs(x, y, col + 1, k);
    if (col + 2 <= k && ((x&(1 << col)) == (1 << col) && (x&(1 << (col + 1))) == (1 << (col+1))
        && (y&(1 << col)) == (1 << col) && (y&(1 << (col + 1))) == (1 << (col+1))))dfs(x, y, col + 2, k);
}
int main()
{
    //ifstream input("data.txt");
    int k, N;
    cin >> k >> N;
    int len = 1 << k;
    for (int i = 0; i != len; i++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX