题解列表

筛选

使用递归,轻松拿下

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

dfs 一行一行来

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

ISBN码--string

摘要:解题思路:按位计算得到检验码,与之比较参考代码:#include<bits/stdc++.h> using namespace std; void solve(){ int sum = 0……

防御导弹---线性dp详细注释

摘要:解题思路:线性dp//dp[i][0]表示不去阻止第i个炮弹时的最大数(即前面i-1个炮弹的阻拦最大数) // dp[i][1]表示组织第i个炮弹时的最大数注意事项:考虑前面炮弹高度等于后面炮弹高度……

前缀和秒杀

摘要:解题思路:注意事项:边界参考代码:#include <bits/stdc++.h> #define int long long #define rep(i, j, n) for (int i = ……

找出规律 for循环输出即可

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;using ll = long long;const int N = 1e5+9;i……