[ACTF新生赛2020]Oruga 题解

简介: [ACTF新生赛2020]Oruga 题解

这是一个迷宫题

进入关键函数

迷宫的控制逻辑如上图,JMEW控制上下左右

执行完移动之后,下面还有一段函数,如上图,这四个判断是判断我们走迷宫的时候是否越界了,走出迷宫了,如果越界就退出程序

而且如果所在位置是0的话,就会一直执行这个循环体,v2+=v4

就是说每一步都会一直走下去,直到走到碰到障碍物为止,但是如果走下去会跑出迷宫的话会异常退出

截取一下迷宫地图的数据

我们可以将迷宫打印一下

map=[0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x23,0x23,0x23,0x00,0x00,0x00,0x23,0x23,0x00,0x00,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4f,0x4f,0x00,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x00,0x4f,0x4f,0x00,0x4f,0x4f,0x00,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x00,0x4f,0x4f,0x00,0x4f,0x4f,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x4c,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4f,0x4f,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x4d,0x4d,0x00,0x00,0x00,0x23,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4d,0x4d,0x4d,0x00,0x00,0x00,0x00,0x45,0x45,0x00,0x00,0x00,0x30,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x45,0x45,0x54,0x54,0x54,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x54,0x00,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x00,0x00,0x00,0x00,0x45,0x00,0x00,0x54,0x00,0x49,0x00,0x4d,0x00,0x4d,0x00,0x4d,0x21,0x00,0x00,0x00,0x45,0x45]
for i in range(0,16):
    for j in range(0,16):
        if(map[i*16+j]==0):
            print('0',end='')
        elif(map[i*16+j]==33):
            print('!', end='')
        else:
            print('#', end='')
    print()

0是通路,#是障碍物,!是终点

手走出路径

flag{MEWEMEWJMEWJM}

相关文章
|
8月前
14-周赛348总结
14-周赛348总结
60 0
|
8月前
|
存储
10-周赛336总结
10-周赛336总结
67 0
|
8月前
9-周赛335总结
9-周赛335总结
57 0
|
8月前
|
人工智能 BI
12-周赛338总结
12-周赛338总结
61 0
|
8月前
13-周赛347总结
13-周赛347总结
61 0
|
存储
[ACTF新生赛2020]SoulLike 题解
[ACTF新生赛2020]SoulLike 题解
156 0
|
8月前
|
数据安全/隐私保护
BUUCTF [ACTF新生赛2020]outguess 1
BUUCTF [ACTF新生赛2020]outguess 1
151 0
BUUCTF [ACTF新生赛2020]outguess 1
|
8月前
|
存储 移动开发
6-周赛332总结
6-周赛332总结
58 0
|
8月前
|
机器学习/深度学习 索引
11-周赛337总结
11-周赛337总结
61 0
|
8月前
|
算法
8-周赛334总结
8-周赛334总结
57 0

热门文章

最新文章