锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久WWW成人,成人午夜精品久久久久久久小说 ,久久综合视频网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 鍙戣〃璇勮
]]>
香蕉99久久国产综合精品宅男自 | 色婷婷综合久久久久中文| 久久久久久精品久久久久| 亚洲精品蜜桃久久久久久| 色综合久久天天综合| 看全色黄大色大片免费久久久| 亚洲国产精品一区二区久久hs| 伊人丁香狠狠色综合久久| 久久综合久久综合亚洲| 久久亚洲综合色一区二区三区| 漂亮人妻被中出中文字幕久久| 久久免费国产精品一区二区| 久久成人国产精品免费软件| 国产精品99久久久久久www| 亚洲人成精品久久久久| 一本色道久久88加勒比—综合| 伊人久久综合成人网| 久久国产精品免费一区| 精品久久久久中文字幕日本| 麻豆国内精品久久久久久| 久久国产免费观看精品| 久久99国产综合精品| 免费久久人人爽人人爽av| 欧美一级久久久久久久大片| 中文精品久久久久国产网址| 精品久久无码中文字幕| 久久精品aⅴ无码中文字字幕不卡| 亚洲精品乱码久久久久久蜜桃| 国产精品美女久久久久AV福利| 精品久久久久久亚洲| 精品久久香蕉国产线看观看亚洲| 婷婷伊人久久大香线蕉AV| 伊人久久精品无码av一区| 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 99久久免费国产精品特黄| 久久播电影网| 久久人妻少妇嫩草AV蜜桃| 久久99精品九九九久久婷婷| 国产午夜精品理论片久久| 久久国产成人精品国产成人亚洲| 777久久精品一区二区三区无码|