题解列表

筛选

1635(c语言解法)

摘要:解题思路:   1.创建数组  2.指针指向数组3.每拿到一个数据指针就往后移注意事项:参考代码:#include<stdio.h>#define maxsize 10int main(){    i……

dfs 一行一行来

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;const int dx[9]={0,0,0,1,-1,1,1,-1,-1};const in……

使用递归,轻松拿下

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;string t;int ans=0; bool dfs(int x,int y){ if(x……

考虑进去0和1

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){    //判断一个数是否是素数   ……

动态规划-python

摘要:解题思路:其实就是求最大不下降子序列和最大不上升子序列,我的r【i】数组表示以num【i】结尾的最长不降序子序列的长度,d【i】表示以num【i】开头的最大不上升子序列,就是先上后下类似于一个抛物线,……

快速幂模板,java

摘要:参考代码: import java.math.BigInteger; import java.util.Scanner; public class Main {   public stat……