⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbfs.h

📁 滑块问题求解系统:利用深度优先搜索和广度优先搜索解决有趣的滑块问题求解系统。
💻 H
字号:
#include "searcher.h"

#ifndef _TBFS_H_
#define _TBFS_H_

class TBFS: public searcher{
public:
	virtual CString getIntroduction();	
	virtual int search(int begin, int end, int &stop, int val = 0);
	void combinepath(int index, int index_back);
};

class HASH_TBFS{
protected:
	struct Node{
		int data;	
		int index;
		struct Node* next;
	};
	const static int MAXSIZE= 70001, ALL = 182000;	
	int ID;
	struct Node *hash[MAXSIZE], node[ALL];
public:
	int add(const int m_data, const int index, const int mode = 0);
	void reset(){
		memset(hash, 0, sizeof(hash) );
		ID = 0;
	}
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -