题解列表

筛选

误落迷宫2-题解(C++代码)

摘要: 普通的搜索题,两个BFS()即可,第一个从S搜到T,第二个从T搜到E,两个距离相加即为最短距离。 ``` #include using namespace std; typed……

发工资咯 (贪心法)

摘要:``` #include using namespace std; int Dno[6]={100,50,10,5,2,1};//面额大小 int sum(int x){ int y=0……

数数字 (C++代码)

摘要:等差数列求和,求下2在mod15下的逆元就行了,因为15不是质数,所以使用费马小定理求不了逆元,所以我采用了扩欧来求。 ```c #include using namespace ……