![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法笔记
Levi_Tang
这个作者很懒,什么都没留下…
展开
-
PAT A1052
虽然表面是链表排序,但实际上需要使用静态链表解决问题。此处附上代码#include <cstdio>#include <algorithm>const int maxsize = 100005;using namespace std;struct Node{ int addr,data,next; bool flag;//是否在链上}node[maxsize];bool cmp(Node a,Node b){ if(a.flag==f原创 2020-06-11 18:30:25 · 152 阅读 · 0 评论 -
Codeup 算法笔记 4.2-哈希 Problem C&Problem D:Be Unique & String Subtraction
Problem C题目描述Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The firs...原创 2020-03-24 22:14:27 · 184 阅读 · 0 评论 -
Codeup 算法笔记4.2-哈希 problem B:分组统计
题目描述先输入一组数,然后输入其分组,按照分组统计出现次数并输出,参见样例。输入输入第一行表示样例数m,对于每个样例,第一行为数的个数n,接下来两行分别有n个数,第一行有n个数,第二行的n个数分别对应上一行每个数的分组,n不超过100。输出输出m行,格式参见样例,按从小到大排。样例输入173 2 3 8 8 2 31 2 3 2 1 3 1样...原创 2020-03-22 16:45:45 · 273 阅读 · 0 评论