锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美激情一区二区久久久,久久久久亚洲AV片无码下载蜜桃,久久精品夜色噜噜亚洲A∨http://www.shnenglu.com/vontroy/category/14347.htmlzh-cnFri, 18 Jan 2013 07:34:30 GMTFri, 18 Jan 2013 07:34:30 GMT60POJ 2488 A Knight's Journey ----- DFShttp://www.shnenglu.com/vontroy/archive/2010/07/29/121524.htmlVontroyVontroyWed, 28 Jul 2010 23:18:00 GMThttp://www.shnenglu.com/vontroy/archive/2010/07/29/121524.htmlhttp://www.shnenglu.com/vontroy/comments/121524.htmlhttp://www.shnenglu.com/vontroy/archive/2010/07/29/121524.html#Feedback0http://www.shnenglu.com/vontroy/comments/commentRss/121524.htmlhttp://www.shnenglu.com/vontroy/services/trackbacks/121524.html#include <stdio.h>
#include 
<string.h>

const int maxn = 50;

int b[8]={-2-2-1-11122},a[8]={-11-22-22-11};
bool check[maxn][maxn], flag;
int ansx[maxn], ansy[maxn];
int row, col;

void dfs(int x, int y, int sum)
{
    
if(sum == col * row)
    {
        
for(int i=1; i<=sum; i++)
        printf(
"%c%d", ansy[i]+'A'-1, ansx[i]);
        printf(
"\n");
        flag
=1;
        
return;
    }
    
for(int i=0; i<8 && !flag; i++)
    {
        
if(!flag && !check[x+a[i]][y+b[i]] && x+a[i]>0 && x+a[i]<=row && y+b[i]>0 && y+b[i]<=col)
        {
            ansx[sum
+1= x+a[i];
            ansy[sum
+1= y+b[i];
            check[x
+a[i]][y+b[i]] = 1;
            dfs(x
+a[i], y+b[i], sum+1);
            check[x
+a[i]][y+b[i]] = 0;
        }
    }
}

int main()
{
    
int n;
    
int cas;
    
while(~scanf("%d",&n))
    {
        cas
=1;
        
while(n--)
        {
            flag 
= 0;
            memset(check,
0,sizeof(check));
            printf(
"Scenario #%d:\n",cas++);
            scanf(
"%d%d"&row, &col);
            check[
1][1]=1;
            ansx[
1= ansy[1= 1;
            dfs(
111);
            
if(!flag) printf("impossible\n");
            printf(
"\n");
        }
    }
    
return 0;
}


Vontroy 2010-07-29 07:18 鍙戣〃璇勮
]]>
HDU 1010 Tempter of the Bonehttp://www.shnenglu.com/vontroy/archive/2010/07/29/121519.htmlVontroyVontroyWed, 28 Jul 2010 22:58:00 GMThttp://www.shnenglu.com/vontroy/archive/2010/07/29/121519.htmlhttp://www.shnenglu.com/vontroy/comments/121519.htmlhttp://www.shnenglu.com/vontroy/archive/2010/07/29/121519.html#Feedback0http://www.shnenglu.com/vontroy/comments/commentRss/121519.htmlhttp://www.shnenglu.com/vontroy/services/trackbacks/121519.html#include <iostream>
#include 
<cstdio>
#include 
<cmath>

const int maxn = 10;

using namespace std;

bool escape;

char map[maxn][maxn];

int dir[4][2= {{-1,0}, {1,0}, {0,-1}, {0,1}};
int n, m, t;
int si, sj, di, dj;

void dfs( int x, int y, int cnt )
{
    
if( escape ) return;

    
if( x == di && y == dj && cnt == t )
    {
        escape 
= 1;
        
return;
    }

    
int temp = t - cnt - ( fabs(di - x) + fabs(dj - y ) );

    
if( temp < 0 || temp % 2 != 0 )     return;//濂囧伓鍓灊

    
if( x <= 0 || y <= 0 || x > n || y > m )    return;

    
forint i = 0; i < 4; i++ )
    {
        
if( map[x+dir[i][0]][y+dir[i][1]] != 'X')
        {
            map[x
+dir[i][0]][y+dir[i][1]] = 'X';
            dfs(x
+dir[i][0], y+dir[i][1], cnt+1);
            map[x
+dir[i][0]][y+dir[i][1]] = '.';
        }
    }

}

int main()
{
    
while( cin >> n >> m >> t, m || n || t )
    {
        
int wall = 0;
        escape 
= 0;
        
for ( int i = 1; i <= n; i++ )
            
for ( int j = 1; j <= m; j++ )
            {
                cin 
>> map[i][j];

                
if( map[i][j] == 'D')
                {
                    di 
= i;
                    dj 
= j;
                }

                
else if ( map[i][j] == 'S' )
                {
                    si 
= i;
                    sj 
= j;
                }

                
else if ( map[i][j] == 'X' )
                    wall 
++ ;
            }

        
if( m * n - wall <= t )
        {
            printf(
"NO\n");
            
continue;
        }
        
else
        {
            map[si][sj] 
= 'X';
            dfs( si, sj, 
0 );
            printf(
"%s\n", escape ? "YES" : "NO" );
        }
    }
    
return 0;
}


Vontroy 2010-07-29 06:58 鍙戣〃璇勮
]]>
久久久久国产精品嫩草影院 | 国产69精品久久久久9999APGF| 亚洲国产成人久久笫一页| 久久精品中文字幕第23页| 日韩精品久久久久久久电影| 亚洲乱码精品久久久久..| 国产精品无码久久综合网| 亚洲欧美成人久久综合中文网| 99精品国产在热久久| 久久亚洲精品无码观看不卡| 亚洲综合伊人久久大杳蕉| 久久精品18| 成人久久综合网| 综合网日日天干夜夜久久| 国内精品伊人久久久久网站| 亚洲国产精品无码久久一区二区| 久久影院午夜理论片无码| 国产成人精品免费久久久久| 亚洲中文久久精品无码| 久久乐国产精品亚洲综合| 久久亚洲高清观看| 久久久久成人精品无码中文字幕| 国产精品久久婷婷六月丁香| 久久久精品波多野结衣| 精品久久人妻av中文字幕| 中文字幕久久波多野结衣av| 久久AAAA片一区二区| 久久精品视频91| 夜夜亚洲天天久久| 日本道色综合久久影院| 国产情侣久久久久aⅴ免费| 九九久久自然熟的香蕉图片| 久久人人爽人人人人爽AV | 69SEX久久精品国产麻豆| 久久久无码精品亚洲日韩软件| 国产农村妇女毛片精品久久| 91精品国产色综合久久| 久久99精品久久久久久秒播| 久久本道久久综合伊人| 日韩十八禁一区二区久久| 久久综合成人网|