hiho week 100 register

Ended

Participants:432

Verdict:Accepted
Score:100 / 100
Submitted:2016-05-30 22:35:32

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<cstdio>
#include<cstring>
#include<queue>
using namespace std;
#define MAXN 3
int mover[4][2]={{0,1},{1,0},{-1,0},{0,-1}};
int productorList[9] = {1,1,2,6,24,120,720,5040,40320};
bool flag;
struct state{
    int grid[3][3];
    int step;
    int curx;
    int cury;
    friend bool operator<(state a,state b){
        return a.step > b.step;
    }
}st;
bool visited[400000];
int unzip(state a)
{
    int i,j;
    int sum = 0;
    int number[9];
    for(i=0;i<3;i++){
        for(j=0;j<3;j++)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX