2020 Multi-University Training Contest 2 施工中。。。 1001 Total Eclipse 并查集。由于每次选择最大的连通块,所以连通块每次选择最小的点,删除后选择新的连通块组继续操作。 对于每个连通块,用并查集反向处理连通块即可。 将当前最大的点加入图,并 ...
分类:
其他好文 时间:
2020-07-23 23:11:17
阅读次数:
218
基数上限为给定的那个数(不懂),需要二分查找?'?'? #include<bits/stdc++.h> typedef long long ll; int n, tag, radix; char num[2][15]; #define val(c) ('0'<=(c)&&(c)<='9'?(c)-' ...
分类:
其他好文 时间:
2020-07-23 22:22:19
阅读次数:
70
为了方便,创建头文件ElemType规定操作状态码和数据元素类型以及用于数据元素类型的匹配函数 typedef double ElemType; //操作成功 #define OK 1 //操作错误 #define ERROR 0 //操作异常 #define OVERFLOW -2 //定义元素类 ...
分类:
编程语言 时间:
2020-07-23 16:26:16
阅读次数:
65
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define mem(a) memset(a,0,sizeof(a)) #define sc1(a) scanf("%lld",&a) #define sc2(a, ...
分类:
其他好文 时间:
2020-07-23 16:24:13
阅读次数:
69
P3919 【模板】可持久化线段树 1(可持久化数组) AC_Code: 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn=1e6+10; 5 const int mo ...
分类:
其他好文 时间:
2020-07-22 20:49:10
阅读次数:
77
对比标准库的流程使用HAL库编写流水灯 标准库: 1.开时钟 2.初始化GPIOInit结构体 3.调用GPIO_Init(GPIOB, &GPIO_InitStructure) 初始化函数 1 typedef struct 2 { 3 uint16_t GPIO_Pin; /*!< Specifi ...
分类:
其他好文 时间:
2020-07-22 16:19:27
阅读次数:
86
代码: /*单链表(含头结点)*/ #include<stdio.h> #include<stdlib.h> typedef int ElemType; typedef struct LNode{ ElemType data; //数据域 struct LNode *next; // 指针域 }LN ...
分类:
其他好文 时间:
2020-07-22 11:28:44
阅读次数:
101
这题是真GOU了,改bug改到自闭了。 ‘ 同样都是预处理,人家加了个素数筛就能过,我没加就疯狂W,W到自闭,其实知道题简单的一批,只需要预处理一下,从n分解到1需要多少次,然后存到数组里就行了,真的是W吐了 #include <bits/stdc++.h> typedef long long ll ...
分类:
其他好文 时间:
2020-07-21 09:42:09
阅读次数:
73
#include<stdio.h> #include<stdlib.h> #include<malloc.h> typedef struct LNode{ int data; struct LNode* next; //next是一个指向结构体类型的指针, LNode* 是一个指针数据类型类似int ...
分类:
编程语言 时间:
2020-07-19 23:54:49
阅读次数:
96
#include<stdio.h> #include<stdlib.h> #include<malloc.h> typedef struct LNode{ int data; struct LNode* next; }LNode,*LinkList; LinkList List_TailInsert ...
分类:
编程语言 时间:
2020-07-19 23:53:50
阅读次数:
108