📝 change codes in test files.

This commit is contained in:
ValKmjolnir 2022-07-14 19:52:27 +08:00
parent d1a7d32e7b
commit 29084143d6
4 changed files with 11 additions and 14 deletions

View File

@ -28,6 +28,8 @@ var bfs=func(begin,end){
que.push(begin);
map[begin[0]][begin[1]]=2;
map[end[0]][end[1]]=0;
if(map[1][0]==1 and map[0][1]==1)
map[1][0]=0;
while(!que.empty()){
var vertex=que.front();
que.pop();

View File

@ -21,11 +21,8 @@ var myers=func(src,dst,show_table=0){
if(show_table){
var curve=[
["+---",
"| "],
[
"+---",
"| \\ "]
["+---","| "],
["+---","| \\ "]
];
var s="";
forindex(var y;dst){
@ -41,9 +38,7 @@ var myers=func(src,dst,show_table=0){
print(s~"+\n");
}
var total=[];
var path=[];
var vec=[[0,0,-1]];
var (total,path,vec)=([],[],[[0,0,-1]]);
visited[0]=1;
while(size(vec)){
append(total,vec);