7816时序 7816时一个比较早的老通讯时序了,最近项目上需要用UART模拟所以,简单学习时序。 时序比较简单,熟悉UART的一眼看着就像是串口的时序,只是他没有停止位,取而代之的就是保护时间guradtime,一般是两个etu所以可以使用两个停止位来模拟。电路图上就是将RX和TX短接,在发送关闭 ...
分类:
其他好文 时间:
2020-06-26 20:38:31
阅读次数:
93
The Prices 题目描述 你要购买$m$种物品各一件,一共有$n$家商店,你到第$i$家商店的路费为$d[i]$,在第家商店购买第$j$种物品的费用为$c[i][j]$,求最小总费用。 输入格式 第一行包含两个正整数$n,m(1<=n<=100,1<=m<=16)$,表示商店数和物品数。 接下 ...
分类:
其他好文 时间:
2020-06-26 20:34:00
阅读次数:
66
导入头文件 编写代码过程中,涉及动态内存分配等常用的函数,需要引入如下头文件 #include<stdio.h> #include<stdlib.h> 结构体定义 // 定义二分搜索树结构体 typedef struct Node { int data; struct Node * left; st ...
分类:
编程语言 时间:
2020-06-26 18:43:11
阅读次数:
77
1 #define Max 50 2 #define ElemType int 3 #define OK 1 4 using namespace std; 5 6 typedef struct Stack //顺序栈的定义 7 { 8 int data[Max]; 9 int top; 10 }St ...
分类:
其他好文 时间:
2020-06-26 18:02:19
阅读次数:
49
一、第六章内容小结 本章内容思维导图 1. 邻接矩阵储存 1 #define MVNum 100 //最大顶点数 2 typedef char VerTexType;//假设顶点的数据类型为字符型 3 typedef int ArcType;//假设边的权值类型为整型 4 5 typedef str ...
分类:
其他好文 时间:
2020-06-26 16:49:04
阅读次数:
61
裸题:https://ac.nowcoder.com/acm/contest/5929/B #include<bits/stdc++.h> using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; int n; st ...
分类:
其他好文 时间:
2020-06-26 16:23:42
阅读次数:
104
1 //链式链表c语言版 2 3 typedef struct Node //链式链表定义 4 { 5 struct Node* next; 6 int data; 7 }ListLink; 8 9 ListLink* ListInit()//链式链表初始化 10 { 11 ListLink* he ...
分类:
其他好文 时间:
2020-06-26 16:20:17
阅读次数:
41
题目 Description 给定一个序列a1,a2,…,an,如果存在i<j,a[i]>a[j],那么我们称之为逆序对,求逆序对的数目 Input 第一行为n,表示序列长度,接下来的n行,第i+1行表示序列中的第i个数。 N<=10^5。Ai<=10^5 Output 两行,第一行为所有逆序对总数 ...
分类:
其他好文 时间:
2020-06-25 21:50:26
阅读次数:
76
HDU5739 Fantasia 题意: 给出一张$N$个点的无向图$G$,每个点都有权值$w_i$,要求计算$\sum_^i\cdot G_i % 1e9+7$ 其中$G_i$为删掉点$i$之后剩下各连通块内点权乘积之和 题解: 显然对于不是割点的点很容易计算出答案 对于割点,我们需要知道删掉这个 ...
分类:
其他好文 时间:
2020-06-25 21:41:29
阅读次数:
63
就是线性代数的初等行变化: 倍加。 倍乘。 交换行。 #include <bits/stdc++.h> #define mp make_pair #define pb push_back using namespace std; typedef long long ll; typedef pair< ...
分类:
其他好文 时间:
2020-06-25 21:24:54
阅读次数:
60