题解列表

筛选

使用深度优先搜索DFS

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { static int[] arr=new int[4]; sta……

编写题解 1118: Tom数

摘要:解题思路:注意事项:参考代码:while True:     try:         print(sum(list(map(int, input()))))     except:     ……

1003: [编程入门]密码破译

摘要:解题思路:注意事项:参考代码:str = input().lower() s = "" for i in str:     if i == 'w':         s += ……

C++ 地宫取宝 DP

摘要:解题思路:看了一眼数据这么小想到可以利用DP解决 想出dp表达式idp[i][j][t][c];//坐标为 i j 最大价值为t 身上宝物为c时候的状态数量 分两种情况转移 1.没选当前格子的 2.能……

等差数列求和(求和公式)

摘要:解题思路:活用数学中数列的概念以及性质。注意事项:An=a1+(n-1)d//n正好为用户输入Sn=[a1+x(末尾)]*n/2参考代码://等差数列求和 #include <stdio.h>int ……