题解列表

筛选

工程化的C++代码实现

摘要:# 思想 创建一个长度为N数组,交换M次,直接用swap交换就行。 #include #define hh ios::sync_with_stdio(false),cin.t……

一种直观的方法(附带一点讨论)

摘要:解题思路:想办法把输入的字符串转化为数字再进行判断即可注意事项:参考代码:#include <iostream>#include <stdio.h>#include <string.h>#includ……

编写题解 1160: 出圈

摘要:解题思路:                  寻找规律注意事项:                 话不多说,代码简单易懂参考代码:#include<iostream>using namespace s……

编写题解 1159: 偶数求和

摘要:解题思路:分奇偶情况讨论注意事项:输出次数的计算参考代码:#include<iostream>using namespace std;int main(){    int n, m;    while……

[归并排序]数组法(c++)

摘要:解题思路:先分别将两个数组各自排序,再使用归并排序注意事项:参考代码:#include <iostream>using namespace std;int main() { int n, m, t; ……

DNA简单题解

摘要:#include<iostream>using namespace std;struct DNA{    int a;//行数    int b;//重复度};int main(){    int n……

巧用sort解题

摘要:解题思路: 1、首先要创建两个链表,并且给数值域赋值;               2、重要的是排序,STL里有sort函数能对结构体进行排序,因为是链表,无法调用sort排序            ……