BFS 1:队列stl #include <iostream> #include <cmath> #include <cstdio> #include <cstring> #include <string> #include <map> #include <iomanip> #include <al ...
分类:
其他好文 时间:
2019-03-12 22:37:15
阅读次数:
174
题目大意: 树上每个点有一个正的点权,选k条不相交的链使权值和最大 思路: 被长链剖分的标签骗进来 法1: 这道题长链剖分标签的由来,类似重链剖分把树剖成若干条链,然后贪心的选k条即可 1 #include<iostream> 2 #include<cstdio> 3 #include<cstrin ...
分类:
其他好文 时间:
2019-03-12 19:57:12
阅读次数:
185
变量:声明变量以$开始,变量名可以用中文但是不要用;不能使用特殊字符,比如@,下划线除外;变量名区分大小写。可变变量 $a = b; $b = c; => $$a = c; 理论上$可以无限使用,但是正常最多使用两个。 十六进制:0x开头,八进制:0开头,二进制:0b开头。 变量类型:int 包括0 ...
分类:
Web程序 时间:
2019-03-12 18:39:16
阅读次数:
241
链接 [https://codeforces.com/contest/1136/problem/C] 题意 给你两个规模一样的矩阵 问是否可以通过不断选取A矩阵的子“方正”转置得到B矩阵 分析 明确一点,那些i+j相等的位置一定是在某个子方正的斜对角上(右上往左下画线就知道), 而且这个斜对角的任意 ...
分类:
其他好文 时间:
2019-03-12 18:24:45
阅读次数:
168
简单懒汉模式: Foo.h Foo.cpp ...
分类:
编程语言 时间:
2019-03-12 10:44:45
阅读次数:
174
1、mykernel部署 使用实验楼的虚拟机打开shell 依次输入如下指令: 如图所示: 经过漫长时间的等待。我们得到了如下的界面: 接下来我们输入如下指令: 得到如下的界面: 我们发现有两类字符串不断交替输出。 关闭QEMU窗口,并输入cd mykernel,可以看到在QEMU窗口输出的内容的代 ...
分类:
其他好文 时间:
2019-03-11 20:10:35
阅读次数:
266
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note: For the purpose of this problem, w ...
分类:
其他好文 时间:
2019-03-10 13:43:21
阅读次数:
150
15分的题写了半个小时。。。记录一下警示自己 isdigit里面应该是字符,zzl 看了一下百度首页的代码,感觉不如自己的简洁 #include<iostream> #include<cstdio> #include<string.h> #include<string> #include<math. ...
分类:
其他好文 时间:
2019-03-10 11:15:25
阅读次数:
271
本文介绍了如何接收传感器的模拟信号和如何使用PCF8591 AD/DA转换模块对光敏传感器的模拟信号进行转换。讲述了51单片机和Arduino如何读取模拟信号,并通过串口实时显示出来。 ...
分类:
其他好文 时间:
2019-03-09 23:52:51
阅读次数:
290
1 #include 2 3 using namespace std; 4 5 #define re register 6 #define rep(i, a, b) for (re int i = a; i = b; --i) 8 #define For(i, a, b, s) for (re in... ...
分类:
其他好文 时间:
2019-03-08 23:46:03
阅读次数:
223