题意:
如果一个数它的每一位(除了最高最低位)都大于或小于它两边的数字 则这个数字叫波浪数 输入n和k (10^14) 求%n==0的第k小的波浪数 如果没有或者大于10^14就输出-1
思路:
这也算是一种分治的搜索策略吧 meet-in-mid
由于数字最多14位 因此可以暴力高7位和低7位(均为80+w种) 然后枚举高位和低位去拼
这题对于代码书写要求较高!! ...
分类:
其他好文 时间:
2014-11-06 23:41:46
阅读次数:
492
官网:https://wiki.jenkins-ci.org/display/JENKINS/Meet+Jenkins我的这篇文章不过简单的依据上文,介绍Jenkins提供了哪些功能。详细大家还是要自己学习啦~官网首页就提供了windows版本号的Jenkins安装包。我们能够下载一个用于学习。安装...
分类:
其他好文 时间:
2014-11-06 10:39:40
阅读次数:
192
题目大意:给出一棵树,在上满找三个点,问那个点到这三个点的距离和最短。
思路:可以证明,这个店必然是这三个点之间两个的LCA,然后枚举就可以了。
CODE:
#include
#include
#include
#include
#define MAX 1000010
#define INF 0x3f3f3f3f
using namespace std;
int...
分类:
其他好文 时间:
2014-11-03 17:48:16
阅读次数:
246
传送门Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show....
分类:
其他好文 时间:
2014-11-02 22:19:42
阅读次数:
169
分块LCA什么的,意外地快呢……就是对询问的3个点两两求LCA,若其中两组LCA相等,则答案为第三者。然后用深度减一减什么的就求出距离了。 1 #include 2 #include 3 #include 4 using namespace std; 5 #define maxn 500001 6 ...
分类:
其他好文 时间:
2014-10-29 16:28:09
阅读次数:
205
As the state vigorously promote technological innovation and new dry cement design optimization, in order to meet market demand for cement, relying An...
分类:
其他好文 时间:
2014-10-19 16:54:44
阅读次数:
254
October 16, 2014 19:00~21:00 Feishang Cafe
As a guest I came here once again. I was glad to meet Neo, Nicole, Rubio, Susan, and so on. They are the members of TMC Jinan, and they ar...
分类:
其他好文 时间:
2014-10-17 15:41:57
阅读次数:
140
原:http://ho.ax/posts/2012/02/resolving-kernel-symbols/KXLD doesn’t like us much. He has KPIs to meet and doesn’t have time to help out shifty rootkit ...
分类:
其他好文 时间:
2014-10-17 13:35:42
阅读次数:
314
运行 install.packages("RCurl") 得到这样的结果 > I have some problem in running R-cran‘s Demography package. > The hmd.mx function need Rcurl. I tried to install RCurl, but meet the following error...
分类:
编程语言 时间:
2014-10-15 23:11:42
阅读次数:
328
A straight tunnel without branches is crowded with busy ants coming and going. Some ants walk left
to right and others right to left. All ants walk at a constant speed of 1 cm/s. When two ants meet, ...
分类:
其他好文 时间:
2014-09-26 02:19:18
阅读次数:
188