原文链接:https://blog.csdn.net/m0_37240709/article/details/78434520 js代码中有时会用到“!”,这个我们知道是取反,对于布尔类型会将其值true和false互换,那对于非布尔类型呢? 对于非布尔类型,js会将值先转换成布尔类型,而后取反。 ...
分类:
Web程序 时间:
2019-12-01 18:56:23
阅读次数:
146
题意 https://vjudge.net/problem/CodeForces-1253B 把一个序列划成几段,使得每一段都是+x在-x前面,二者均要有。 问划成几段,每一段的大小是多少。 思路 用两个map,p记录能否抵消,q记录每个数是否唯一,sz记录当前段剩余未抵消的个数。 每遇到一个大于0 ...
分类:
其他好文 时间:
2019-12-01 16:52:20
阅读次数:
239
在程序开发过程中,我们经常会用到按位拷贝一串二进制数,在此提供一个按位拷贝的函数给大家参考,函数源码如下: #define char_t char #define uint8_t unsigned char #define int8_t signed char #define uint16_t un ...
分类:
编程语言 时间:
2019-12-01 12:10:00
阅读次数:
89
UIGestureRecognizerDelegate A set of methods implemented by the delegate of a gesture recognizer to fine-tune an app’s gesture-recognition behavior. 一 ...
分类:
移动开发 时间:
2019-12-01 11:43:08
阅读次数:
128
《挑战程序设计》-找水洼 题解 2019-12-01 Powered by WSY 1.题目传送门:http://poj.org/problem?id=2386 2.题目思路:这道题其实是一个非常简单的搜索,我们只需要对于每一个点,向他的8个方向搜索就可以了。 3.代码:最后给大家粘一个福利(AC代 ...
分类:
其他好文 时间:
2019-12-01 09:16:22
阅读次数:
94
1、安装淘宝npm镜像 输入命令:npm install -g cnpm --registry=https://registry.npm.taobao.org 2、安装全局vue-cli脚手架 cnpm install --global vue-cli 3、初始化一个vue项目 vue init w ...
分类:
其他好文 时间:
2019-11-30 19:15:33
阅读次数:
81
hiho 1996 解析: 观察到如果维护匹配数,空闲的0,空闲的1;具有区间可合并性 故可以用线段树求解 code cpp include using namespace std; define fast() ios_base::sync_with_stdio(0);cin.tie(0);cout ...
分类:
其他好文 时间:
2019-11-30 00:17:09
阅读次数:
75
https://www.luogu.com.cn/problem/P3865 ...
分类:
其他好文 时间:
2019-11-28 21:19:32
阅读次数:
71
题意: 思路: 先建好整棵树。 遇到+val操作用dfn对区间+val 遇到加新点清空一下该点的点值(这里保证了之后查询的点肯定是清空过的) 差分+树状数组or线段树 1 #define IOS ios_base::sync_with_stdio(0); cin.tie(0); 2 #include ...
分类:
其他好文 时间:
2019-11-28 21:16:02
阅读次数:
92
Linus Torvalds I am not a visionary, i do not have a five year plan, i’m an engineer. I am perfectly fine with all the people who are walking around a ...
分类:
其他好文 时间:
2019-11-28 19:13:56
阅读次数:
83