#1 栈 ##1.1 栈的基本概念 栈(stack)又名堆栈,它是一种 运算受限的线性表。限定 仅在表尾进行插入和删除操作 的线性表。表尾被称为栈顶,相对地,把另一端称为栈底。 ###1.1.1 特点 它的特殊之处在于限制了这个线性表的插入和删除的位置,它始终只在栈顶进行。这也就使得:栈底是固定的, ...
分类:
编程语言 时间:
2020-07-27 23:47:07
阅读次数:
64
//It is made by jump~ #include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <ctim ...
分类:
其他好文 时间:
2020-07-27 17:46:04
阅读次数:
68
交通灯状态转换: (其中黄灯会进行闪烁) #include <msp430.h> typedef unsigned char uchar; typedef unsigned int uint; const uchar STATES[4] = { 0xCC, 0xD4, 0x78, 0xAC }; v ...
分类:
其他好文 时间:
2020-07-27 16:03:34
阅读次数:
98
采用行(列)扫描法: 1.初始化:所有行线输出低电平,所有列线上拉输入 2.确定列:输入为低电平的一列 3.确定行:轮流让行线输出低电平,其它行线输出高电平。若使得上一步确定的列线输入为低电平,可以确定按键所在行就是当前输出低电平的一行 4.显示数码:列号(0~3) + 4 * 行号(0~3) #i ...
分类:
其他好文 时间:
2020-07-26 01:51:08
阅读次数:
72
C/C++ 编程语言中,typedef 关键字用来为特定的数据类型取一个别名,或者将其称之为 “定义了一种新的数据类型”。无论如何,其最终的目的是为了使源代码更易于阅读和理解。它通常用于简化声明复杂的数据类型组成的结构 。 比如,在 C 中没有 bool 类型,于是很可能出现一个程序员使用 int, ...
分类:
其他好文 时间:
2020-07-26 00:21:14
阅读次数:
51
水个题解压压惊 A. String Transformation 1 贪心就好了。每次选择所有A里最小的、需要改变的字符,然后改变成最小的对应B值,差不多这个意思吧(?) #include <bits/stdc++.h> using namespace std; #define repeat(i,a ...
分类:
其他好文 时间:
2020-07-25 09:14:40
阅读次数:
91
代码: #include <stdio.h> #include "stdlib.h" //宏定义 #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define MAXSTRLEN 100 typedef char SStrin ...
分类:
编程语言 时间:
2020-07-24 21:17:25
阅读次数:
74
题目链接 树哈希直接套就完了 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef unsigned long long ll; 4 const int N=1e5+10,M=19260817,inf=0x3f3f3f3f,mod=1e ...
分类:
编程语言 时间:
2020-07-24 16:00:39
阅读次数:
74
为了方面使用,先定义头文件ElemType #include "stdio.h" typedef double ElemType; //操作成功 #define OK 1 //操作错误 #define ERROR 0 //操作异常 #define OVERFLOW -2 //定义元素类型,int可使 ...
分类:
编程语言 时间:
2020-07-24 15:23:15
阅读次数:
78
1010.Lead of Wisdom 暴搜。。。我去除了比某一同类装备4个属性都低的装备 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) for (register i ...
分类:
其他好文 时间:
2020-07-23 23:22:33
阅读次数:
184