Search found 2 matches

by SRXz
Sat May 14, 2005 12:59 pm
Forum: Volume 103 (10300-10399)
Topic: 10377 - Maze Traversal
Replies: 26
Views: 14714

dumb dan wrote:I haven't tested your code, but you should be aware that (-1)%4=(-1) and not 3 as you would want to in this case.
thanks , ans I got AC(P.E)

(and nx-- ny-- I should add in my code )
by SRXz
Sat May 14, 2005 8:18 am
Forum: Volume 103 (10300-10399)
Topic: 10377 - Maze Traversal
Replies: 26
Views: 14714

10377 WA



special input??


#include <iostream>
#include <cstdio>
#include <string>

using namespace std ;
char C[4]={'N','E','S','W'} ;

int go(char map[100][100],int &x,int &y,int now){

if(C[now%4]=='N')
if(map[x-1][y]==' ')
x--;

if(C[now%4]=='E')
if(map[x][y+1]==' ')
y++;
if(C[now%4]=='S ...

Go to advanced search