题解列表

筛选

优质题解

蓝桥杯历届试题-九宫重排-题解(C++代码)

摘要:##### bfs来搜索目标局面,一旦搜到一定是最小移动次数 #####任务: 目标检查 判重 ##### 通常利用哈希表记录每一种不同的局面 ```cpp typedef int S……

三位数反转-题解(Python代码)

摘要:这道题可以通过取巧的方式来解答 直接当做字符串来反转即可 也不用考虑100反转后要输出001的问题 代码如下: ```python n = str(input()) while 1: ……

九宫重排 (C++代码)

摘要:#include<cstdio> #include<cstring> using namespace std; typedef int state[9]; const int maxn = 1……

分糖果 (C++代码)

摘要:#include<cstdio> #include<iostream> #include<algorithm> using namespace std; int n ,cnt=0; int ……