赞
踩
以下是用 C 语言实现的代码:
#include <stdio.h> #include <stdbool.h>
#define MAX_SIZE 20
char maze[MAX_SIZE][MAX_SIZE]; // 迷宫 int key_count[5]; // 每种钥匙的数量 int door_key[5]; // 每扇门所需的钥匙数量
// 记录 Acm 当前的位置和已经拥有的钥匙数量 struct { int x; int y; int key[5]; } acm;
// 判断 Acm 是否能够找到宝藏 bool find_treasure() { // 定
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。