1052链表合并(c语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<stdlib.h> typedef struct node { int xh,score; struc…… 题解列表 2021年11月09日 0 点赞 0 评论 442 浏览 评分:9.9
[归并排序]数组法(c++) 摘要:解题思路:先分别将两个数组各自排序,再使用归并排序注意事项:参考代码:#include <iostream>using namespace std;int main() { int n, m, t; …… 题解列表 2021年10月23日 0 点赞 0 评论 292 浏览 评分:9.9
巧用sort解题 摘要:解题思路: 1、首先要创建两个链表,并且给数值域赋值; 2、重要的是排序,STL里有sort函数能对结构体进行排序,因为是链表,无法调用sort排序 …… 题解列表 2021年10月23日 0 点赞 0 评论 456 浏览 评分:9.9
超级好用的C++容器 摘要:解题思路:采用C++的set容器,自动按第一个元素排序,在加入set<pair<int,int>> S;注意事项:auto 是C++13 的语法参考代码:#include<bits/stdc++.h>…… 题解列表 2021年10月13日 0 点赞 0 评论 175 浏览 评分:0.0
题目 1052: [编程入门]链表合并 摘要:解题思路:注意事项:在线编程通过了,测试提交出错了,有hxd提点建议吗参考代码:n,m = map(int,input().split())l = []for i in range((n+m)): …… 题解列表 2021年10月10日 0 点赞 1 评论 204 浏览 评分:2.0
利用STL中的map解题(C++) 摘要:看到学号和成绩是一一对应的, 并且学号不重复,需要根据学号(key)排序。 可以用STL中的map处理信息。 ```cpp #include //先引入一个万能库 using names…… 题解列表 2021年09月13日 0 点赞 0 评论 211 浏览 评分:0.0
[编程入门]链表合并-题解(C语言) 摘要:```c #include int ave1=0,ave2=0,ave3=0; struct a{ int b; int c; }student[100],temp; void …… 题解列表 2021年09月10日 0 点赞 0 评论 218 浏览 评分:0.0
1052 链表合并(C语言) 非常易懂 摘要:解题思路:话不多说看注释就行注意事项:看注释咯参考代码:#include<stdio.h>#include<stdlib.h> typedef struct _node{ int id…… 题解列表 2021年08月30日 0 点赞 0 评论 699 浏览 评分:9.9
链表合并(C语言) 摘要:# C99是支持动态数组的 ## 思路与一般的排序题一样 ``` c #include struct Student{ int num; int score; }; …… 题解列表 2021年08月20日 0 点赞 0 评论 305 浏览 评分:9.3
链表插入的两种姿势,中间插入和尾插 摘要:解题思路:先构建两个链表,然后按照链表内的学号进行升序排序,这里我的思路是每次插入前找到比链表2待插入的节点学号大的节点,然后进行插入注意事项:参考代码:#include<stdio.h>#inclu…… 题解列表 2021年08月17日 0 点赞 0 评论 343 浏览 评分:9.9