#include <iostream> #include <map> using namespace std; typedef struct alertInfo { double alertUp; double alertDown; alertInfo(double up, double down) ...
分类:
其他好文 时间:
2020-07-28 22:25:22
阅读次数:
75
题目描述 给定n个点,第i个点的坐标为(xi,yi)(xi?,yi?),如果想连通第i个点与第j个点,需要耗费的代价为两点的距离。第i个点与第j个点之间的距离使用欧几里得距离进行计算,即:(xi-xj)2+(yi-yj)2 我们规定耗费代价小于c的两点无法连通,求使得每两点都能连通下的最小代价,如果 ...
分类:
其他好文 时间:
2020-07-28 10:09:18
阅读次数:
72
结构体内的一些操作 重载 #include <bits/stdc++.h> using namespace std; struct test { int a, b; friend bool operator < (const test &x, const test &y) { return x.a ...
分类:
其他好文 时间:
2020-07-26 23:02:39
阅读次数:
72
数据结构中的栈——先进后出,先进先出 数据结构中的堆——堆的本质是一个二叉树,包括二分法查找,朗格朗日差值查找,堆排序查找极值 结构体 void main006() { struct myStruct // 结构体的意义:将多种类型的数据整合在一起 { int a[10]; int i; }; st ...
分类:
其他好文 时间:
2020-07-26 00:04:36
阅读次数:
96
1.消息的概念 消息是指windows操作系统发给应用程序的一个通告,告诉程序某个特定的事件发生了。比如用户点击鼠标,会引发相关的消息,并交给相应的程序去处理。最终处理消息的是应用程序的窗口函数,如果程序不负责处理的话,系统会作出默认的处理。 从数据结构的角度来说,消息是一个结构体,包含了消息的类型 ...
https://www.luogu.com.cn/problem/P1478 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n, s, a, b; 4 struct apple{ //结构体定义苹果的高度和摘苹果所用的力气 5 int ...
分类:
移动开发 时间:
2020-07-23 15:54:43
阅读次数:
85
https://www.luogu.com.cn/problem/P1223 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n; 4 struct t{ //定义结构体存放等待时间和排队编号 5 int w, no; 6 }; 7 t ...
分类:
其他好文 时间:
2020-07-22 20:56:08
阅读次数:
73
对比标准库的流程使用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
在学习32中的滴答定时器的时候,我进入底层去分析代码,然后就遇到了拦路虎。我遇到了这样的代码 1 //core_cms.h中的宏定义 2 #define SCS_BASE (0xE000E000) 3 #define SysTick_BASE (SCS_BASE + 0x0010) 4 #defin ...
分类:
其他好文 时间:
2020-07-22 11:12:01
阅读次数:
88
Go语言中数据类型极其丰富,除了基本的整型、浮点型、布尔型、字符串外,还有数组、切片、结构体、函数、map、通道channel等。Go语言的基本类型和其他语言大同小异。 基本数据类型 整型 整型分为以下两个大类: 按长度分为:int8、int16、int32、int64 对应的无符号整型:uint8 ...
分类:
编程语言 时间:
2020-07-22 01:40:44
阅读次数:
87