根据完全二叉树的性质(编号为$u$的节点的左儿子编号为$u2$,右儿子编号为$u2+1$),并利用后序遍历进行递归建树。 $level[i]$存储编号为$i$的节点的值。 const int N=35; int post[N]; int level[N]; int n; int k; void df ...
分类:
其他好文 时间:
2021-04-21 12:54:57
阅读次数:
0
1. nginx.cof配置文件说明 # 运行用户 user nobody; # 启动进程,通常设置成和cpu的数量相等 worker_processes 1; # 全局错误日志及PID文件 #error_log logs/error.log; #error_log logs/error.log n ...
分类:
其他好文 时间:
2021-04-21 12:37:55
阅读次数:
0
堆排序 public class HeapSort { public static void main(String[] args) { int[] arr = {1, 3, 519, 2, 10, 8, 0, 998}; heapSort(arr); System.out.println(Arra ...
分类:
编程语言 时间:
2021-04-21 12:26:45
阅读次数:
0
CodeForces-1178F1 Short Colorful Strip 区间DP 题意 给定$0-n$ 一共 $n+1$种颜色,现有$m$段初始时刻颜色都是0的纸,对这张纸的段进行操作,第$i$次操作会选择第$l$段到第$r$段纸进行区间染色,条件是这段此时必须为同种颜色,染为$i$。给出最终 ...
分类:
其他好文 时间:
2021-04-21 11:55:16
阅读次数:
0
前言 在学习算法很美课程的时候,学习到了一些位运算的奇技淫巧,收录在此 判断奇偶数 判断奇数1 & x == 1 System.out.println((1991 & 1) == 1); 判断偶数1 & x == 0 System.out.println((1990 & 1) == 0); 获取二进 ...
分类:
编程语言 时间:
2021-04-20 15:43:24
阅读次数:
0
Meta 表示变化 name 名字 viewport 视口 centent 内容 device 配置 scale 比例&范围 Maximum 最大比例&范围&限度 screen 屏幕 手机兼容性适配 @media screen and (max-width:600px) { .content{wid ...
分类:
Web程序 时间:
2021-04-20 15:42:04
阅读次数:
0
Now our job as programmers changes from figuring out the rules, to determining the activities, to writing the code that matches the data to the labels ...
分类:
其他好文 时间:
2021-04-20 15:41:14
阅读次数:
0
1.进程 定义:进程是运行中的程序,运行中的程序可以理解为内存中的代码指令和运行相关的数据被CPU读写并计算的过程。 有人会认为,要提升CPU的利用率,可以开多个进程,但是开多个进程的话,进程间通讯是个比较麻烦的事情(进程之间地址空间是独立的,需要通过其他方式,例如:管道来解决) 相反,线程之间是可 ...
分类:
编程语言 时间:
2021-04-20 15:30:44
阅读次数:
0
简单实例: >存储过程,参数的传入! delimiter $ create procedure p1() begin declare i int default 10; select concat ('i的取值是:',i) as QuZhi; end $ delimiter $ create pro ...
分类:
数据库 时间:
2021-04-20 15:04:52
阅读次数:
0
artisan是laravel提供的命令行接口,这里记录下常用的命令 ...
分类:
其他好文 时间:
2021-04-20 14:56:59
阅读次数:
0