题解列表
通分-题解(Java代码) 使用Java BigInteger类储存大范围整数
摘要:解题思路: 在 Java 中,有许多数字处理的类,比如 Integer类,但是Integer类有一定的局限性。我们都知道 Integer 是 Int 的包装类,i……
蓝桥杯Huffuman树
摘要:import java.util.Arrays;
import java.util.Scanner;
public class tHuffuman {
public stat……
字符逆序cin.get(str,100);
摘要:#include#includeusing namespace std;int main(){ char str[100]; cin.get(str,100);//gets(str); ……
题解 1479: 蓝桥杯算法提高VIP-删除数组中的0元素
摘要:解题思路:注意事项:参考代码:import java.util.Scanner;
public class 删除0 {
/**
* @param args
*/
pu……
优质题解
✔✔✔ 树的直径问题+DFS求解 [c++]
摘要:典型的**树的直径**问题:图中所有最短路径的最大值即为「直径」,可以用两次 DFS 或者树形 DP 的方法在 O(n) 时间求出树的直径。
题解以两遍DFS为例
**定理:**在一个连通无向无环……
2074: [STL训练]A+B(Java)
摘要: import java.math.*;
import java.util.*;
public class Main {
public stat……
字符串的输入输出处理
摘要:#include #include#includeusing namespace std;
int main()
{
int n;char str[1000];
cin>>n……
C************************************
摘要:#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int a[1000],n,i,j,temp; scan……
蓝桥杯][算法提高VIP]我们的征途是星辰大海
摘要:解题思路:注意事项:每行指令都是从新回到原点再走的参考代码:#判断每走一步的结果
def check(x,y,lab):
if x>=len(lab) or x<0 or y>=len(l……