动态规划的一般解题方法 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int arr[100][100] ={0}; int dp[100][100]…… 题解列表 2024年06月25日 0 点赞 0 评论 153 浏览 评分:0.0
tarjan的离线做法 摘要:刚学习tarjan求最近公共祖先,以此题记录 要求的两点距离可用两点深度之和减去两点公共祖先节点的深度,即: d[x,y]=d[0,x]+d[0,y]-2*d[0,p] ~~~ #incl…… 题解列表 2024年06月24日 0 点赞 0 评论 231 浏览 评分:9.9
数列(多项式之和) 摘要:解题思路: 转二进制: 多项式之和注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e3 + 10; int a[…… 题解列表 2024年06月23日 1 点赞 0 评论 443 浏览 评分:9.9
链式栈的练习,可供食用参考... 摘要:解题思路:无注意事项:无参考代码:#include<stdio.h>#include<stdlib.h>#include<stdbool.h>#include<string.h>typedef str…… 题解列表 2024年06月23日 0 点赞 0 评论 247 浏览 评分:9.9
顺序栈练习,可供食用 摘要:解题思路:简陋代码但还算简单,可供食用参考。注意事项:①清理缓冲区换行符。 ②题目要求:一次开始时堆栈为空。参考代码:#include#include#include#i…… 题解列表 2024年06月23日 0 点赞 0 评论 230 浏览 评分:9.9
迭代法求平方根 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float X; scanf("%f", &X); float x1, x2; x1 =…… 题解列表 2024年06月22日 0 点赞 0 评论 170 浏览 评分:0.0
C语言训练-大小写问题 摘要:参考代码:#include <stdio.h>#include<ctype.h>#include<string.h>int main(){ char a[100] = {'\0'}…… 题解列表 2024年06月22日 0 点赞 0 评论 418 浏览 评分:9.9
求矩阵的两对角线上的元素之和 摘要:参考代码:#include<stdio.h>int main(){ int x,y,sum=0,N,a[10][10]; scanf("%d",&N); for(x=0;x<N;x++){…… 题解列表 2024年06月22日 0 点赞 0 评论 296 浏览 评分:9.9
最适合新手的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int k;scanf("%d",&k);if(k<=2){ printf("1");}else{ int a[…… 题解列表 2024年06月22日 0 点赞 0 评论 294 浏览 评分:0.0
我的思路找*号周围加一(*号不加) 摘要:```cpp #include using namespace std; char jia (char a) { if(a!='*') { a++; } return…… 题解列表 2024年06月22日 0 点赞 0 评论 306 浏览 评分:0.0