工程化的C++代码实现 摘要:# 思想 创建一个长度为N数组,交换M次,直接用swap交换就行。 #include #define hh ios::sync_with_stdio(false),cin.t…… 题解列表 2021年10月25日 0 点赞 0 评论 781 浏览 评分:0.0
一种直观的方法(附带一点讨论) 摘要:解题思路:想办法把输入的字符串转化为数字再进行判断即可注意事项:参考代码:#include <iostream>#include <stdio.h>#include <string.h>#includ…… 题解列表 2021年10月24日 0 点赞 0 评论 638 浏览 评分:6.0
1165: 明明的随机数(精简代码) 摘要:解题思路: 先排序,再删除参考代码:#include<iostream>using namespace std;#include<algorithm>int main(…… 题解列表 2021年10月24日 0 点赞 0 评论 246 浏览 评分:0.0
编写题解 1160: 出圈 摘要:解题思路: 寻找规律注意事项: 话不多说,代码简单易懂参考代码:#include<iostream>using namespace s…… 题解列表 2021年10月24日 0 点赞 0 评论 531 浏览 评分:9.9
编写题解 1159: 偶数求和 摘要:解题思路:分奇偶情况讨论注意事项:输出次数的计算参考代码:#include<iostream>using namespace std;int main(){ int n, m; while…… 题解列表 2021年10月23日 0 点赞 0 评论 292 浏览 评分:0.0
[C++][基础算法讲解]简单理解动态规划 摘要:视频讲解:https://www.bilibili.com/video/BV1Lh411n7wi/参考代码:#include #include #include #include using name…… 题解列表 2021年10月23日 0 点赞 0 评论 565 浏览 评分:2.0
[归并排序]数组法(c++) 摘要:解题思路:先分别将两个数组各自排序,再使用归并排序注意事项:参考代码:#include <iostream>using namespace std;int main() { int n, m, t; …… 题解列表 2021年10月23日 0 点赞 0 评论 441 浏览 评分:9.9
DNA简单题解 摘要:#include<iostream>using namespace std;struct DNA{ int a;//行数 int b;//重复度};int main(){ int n…… 题解列表 2021年10月23日 0 点赞 0 评论 287 浏览 评分:0.0
新手解约瑟夫问题,代码一看就会(c++) 摘要:解题思路:通过bool数组判断该位置是否有人,结合循环条件写出代码。注意事项:先把过程想明白再写代码参考代码:#include <iostream>#include <stdio.h>using na…… 题解列表 2021年10月23日 0 点赞 0 评论 566 浏览 评分:9.9
巧用sort解题 摘要:解题思路: 1、首先要创建两个链表,并且给数值域赋值; 2、重要的是排序,STL里有sort函数能对结构体进行排序,因为是链表,无法调用sort排序 …… 题解列表 2021年10月23日 0 点赞 0 评论 606 浏览 评分:9.9