[STL训练]{A} + {B}(用STL中的set) 摘要:#用STL中的set求解 ```cpp #include using namespace std; int main() { sets; int tmp,s1; while(ci…… 题解列表 2021年05月13日 0 点赞 0 评论 332 浏览 评分:0.0
模块化简单易懂解决问题(一看就会)[C] 摘要:解题思路:运用函数模块化思想编写两个子函数一个函数用来求循环长度一个函数用来求输入范围内的最大循环长度注意事项:不要忘记输入顺序可能是先输入大的后输入小的 如果先输入的值大于后面的值则需要调换位置参考…… 题解列表 2021年05月13日 0 点赞 0 评论 274 浏览 评分:0.0
可别另用一个数组来存,剩下的不重复的数字,我就是这一一直答案错误27; 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<string.h>int main(){ int N; scanf("%d",…… 题解列表 2021年05月12日 0 点赞 0 评论 252 浏览 评分:9.9
优质题解 01背包问题-DP--c语言 摘要:** 基本思路** 这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。 用子问题定义状态:即 F[i, v] 表示前 i 件物品恰放入一个容量为 v 的背包可以获得的最大价值。则…… 题解列表 2021年05月12日 0 点赞 0 评论 792 浏览 评分:5.3
题解 1250: 素数回文 摘要:参考代码:#include <stdio.h>#include <stdlib.h>#include<string.h>#include<math.h>int sushu(int n){ int…… 题解列表 2021年05月12日 0 点赞 0 评论 185 浏览 评分:0.0
C++递归解题《数组的距离》 摘要:###** 注意:没有很好的处理递归,所以耗时可能会有所延长。 #### 基本思路就是:对于一个递增数组,如果前一个数大于b,则它后面的数一定大于b,所以后面的数不用考虑,这样会节省很多时间。 `…… 题解列表 2021年05月12日 0 点赞 0 评论 636 浏览 评分:9.9
题解 1249: 简单编码 摘要:参考代码:#include <stdio.h>#include <stdlib.h>#include<string.h>#include<math.h>int main(){ char str[…… 题解列表 2021年05月12日 0 点赞 0 评论 259 浏览 评分:0.0
c++深度搜索解题 摘要:#### ### ## # 本题的原思路来自用户名为‘gyh0416’的用户(首先在此感谢这位用户),我在看到这位作者的题解后觉得非常好,便写了这个翻版。大家可以在本题题解中找到这位作者用C#写的代码…… 题解列表 2021年05月12日 0 点赞 0 评论 260 浏览 评分:0.0
字符串编辑 摘要:解题思路:swicth语句进行操作选项注意事项:参考代码:#include<stdio.h>#include<string.h>void del(char *ch,char c){ int i,key…… 题解列表 2021年05月12日 0 点赞 0 评论 267 浏览 评分:0.0
不知道错哪里了... 摘要:```c #include int main(void) { int n, sn = 0, a; scanf("%d", &n); for(n; n > 0; n--) { …… 题解列表 2021年05月12日 0 点赞 0 评论 401 浏览 评分:0.0