题解列表

筛选

矩阵嵌套 (C++代码)

摘要:码一下代码:#include <iostream> using namespace std; int main() {     int N, n, a, b;     int i, j……

等待戈多 (Java代码)

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main{private static int k;private static int n;……

汉诺塔 (Java代码)

摘要:解题思路:  汉诺塔:  拿题目的 n=4来举例:柱子用a,b,c来方便表示.  我们逆向看,即看            当第4个盘子放在c时,此时b一定存放着3个盘子,因为根据题意此时第4个盘子一定……

等待戈多 (C语言代码)

摘要:解题思路:用dijkstra算法解决该题。注意事项:无参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>#include<string.h……

蓝桥杯算法训练VIP-单词接龙 (C语言代码)

摘要:解题思路:dfs注意事项:我开始提交的时候本以为会错的,结果对了。有一个情况没考虑到位举个例子比如abcdd,ddfgh,将它们单词接龙应该是abcddfgh吧,代码跑出来是abcdddfgh,多了一……

数数字 (C++代码)

摘要:公式准备:    (16 * x) % 15 = x    (16 ^ n * x) % 15 = x    (1+2+... ...+15) % 15 = 0    (n + n+1 + n+2 +……