A:即求长度为偶数的异或和为0的区间个数,对前缀异或和用桶记录即可。 B:显然如果有解,答案一定不大于2,因为原串是回文串,找到第一个不是回文串的前缀和对其对应后缀切掉并交换即可。无解直接判断是否字母都相同或只有最中间字母不同。然后只需要check是否为1,暴力枚举切割点暴力判断即可。 D:显然枚举 ...
分类:
其他好文 时间:
2019-02-17 20:49:19
阅读次数:
170
#user nobody; #开启进程数 <=CPU数 worker_processes 1; #错误日志保存位置 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info;... ...
分类:
其他好文 时间:
2019-02-15 22:27:22
阅读次数:
195
"152. Combinations" / "77. Combinations" 本题难度: Medium Topic: Search & Recursion Description Given two integers n and k, return all possible combinatio ...
分类:
其他好文 时间:
2019-02-15 01:11:29
阅读次数:
181
nginx.conf #user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/ng... ...
"75. Find Peak Element" Description There is an integer array which has the following features: The numbers in adjacent positions are different. A[0] ...
分类:
其他好文 时间:
2019-02-09 10:45:29
阅读次数:
177
模板如下: Copyright (c) <year> <copyright holders> This software is provided 'as-is', without any express or impliedwarranty. In no event will the authors ...
分类:
其他好文 时间:
2019-02-01 11:27:36
阅读次数:
342
主要内容: 一、IntelliJ IDEA 安装 二、maven 安装 三、设置IDEA和mvn的关系 一、IntelliJ IDEA 安装 1.1. 下载编辑器:前往下载 (Ultimate和Community都是可以的,我一般下载前一个) 1.2. 注册码记得搜索 二、maven 安装 2.1. ...
分类:
编程语言 时间:
2019-01-28 10:58:31
阅读次数:
161
#运行用户 user nobody; #启动进程,通常设置成和cpu的数量相等 worker_processes 1; #全局错误日志及PID文件 #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs ...
分类:
其他好文 时间:
2019-01-27 21:36:47
阅读次数:
167
ginx通过ngx_http_rewrite_module模块支持url重写、支持if条件判断,但不支持else。 该模块需要PCRE支持,应在编译nginx时指定PCRE源码目录, nginx安装方法。 nginx rewrite指令执行顺序: 1.执行server块的rewrite指令(这里的块 ...
分类:
其他好文 时间:
2019-01-27 21:36:34
阅读次数:
183
原文:https://adolphor.com/blog/2017/03/21/the-different-and-choice-of-license.html各协议授权详情先来了解一些下相关用词的解释:协议和版权信息(License and copyright notice):在代码中保留作者提供... ...
分类:
其他好文 时间:
2019-01-25 11:31:29
阅读次数:
234