[题解]:二进制拆分 任意一个整数都可以拆分成 2^0 + 2^1 + 2^2 + 2^3 + ....+ m [code]: #include <iostream> #include <stdio.h> #include <string.h> #include <math.h> using namespace std; int main() { int n; while(~scanf("%d",&n)) { ; ;;i++) {…
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=5 [题解]: 没想通这题暴力可以过.... [code]: #include<iostream> #include<stdio.h> #include<string.h> using namespace std; ]; int main() { int n,m; while(~scanf("%d%d",&n,&…
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=1 [题解]:卡特兰数取模 h(n) = h(n-1)*(4*n-2)/(n+1) 这题我们公式选择错了,不过还是能AC的 因为要取模,应该选 h(n)=h(0)*h(n-1)+h(1)*h(n-2)+...+h(n-1)*h(0) (n>=2) [code-java]: import java.math.BigInteger; import java.util.Scanne…
[题解]: 最短路径问题,保证距离最短的同时,学妹权值最大,哈哈 [code]: #include<iostream> #include<queue> #include<stdio.h> #include<string.h> #include<stdlib.h> #define N 50005 #define INF 100000000 using namespace std; struct Edge { int to; int next; in…
http://acm.csu.edu.cn/OnlineJudge/problem.php?cid=2037&pid=9 [题解]: 这题卡了一下,卡在负数的情况,负数输出 0 这题主要找到一个个相邻重复的位置,然后加1上去,看是否进位,直到满足条件为止 [code]: #include<iostream> #include<stdio.h> #include<string.h> #include<stdlib.h> using namespace…
Problem A: Small change 题解:http://www.cnblogs.com/crazyapple/p/3349469.html Problem B: Scoop water 题解:http://www.cnblogs.com/crazyapple/p/3349478.html Problem D: CX and girls 题解:http://www.cnblogs.com/crazyapple/p/3349480.html Problem F: ZZY and his…
博客地址:http://blog.csdn.net/foxdave 原文地址 在该系列文章中,作者展示了SharePoint 2013最显著的新功能概观--对移动设备的支持. 该系列文章: 移动设备和SharePoint 2013 - 第1部分:概述 移动设备和SharePoint 2013 - 第2部分:设备管道和SharePoint页面模型 移动设备和SharePoint 2013 - 第3部分:推送通知 移动设备和SharePoint 2013 - 第4部分:定位 移动设备和SharePo…
博客地址:http://blog.csdn.net/foxdave 原文地址 在该系列文章中,作者展示了SharePoint 2013最显著的新功能概观--对移动设备的支持. 该系列文章: 移动设备和SharePoint 2013 - 第1部分:概述 移动设备和SharePoint 2013 - 第2部分:设备管道和SharePoint页面模型 移动设备和SharePoint 2013 - 第3部分:推送通知 移动设备和SharePoint 2013 - 第4部分:定位 移动设备和SharePo…
博客地址:http://blog.csdn.net/foxdave 原文地址 在该系列文章中,作者展示了SharePoint 2013最显著的新功能概观--对移动设备的支持. 该系列文章: 移动设备和SharePoint 2013 - 第1部分:概述 移动设备和SharePoint 2013 - 第2部分:设备管道和SharePoint页面模型 移动设备和SharePoint 2013 - 第3部分:推送通知 移动设备和SharePoint 2013 - 第4部分:定位 移动设备和SharePo…
博客地址:http://blog.csdn.net/foxdave 原文地址 在该系列文章中,作者展示了SharePoint 2013最显著的新功能概观--对移动设备的支持. 该系列文章: 移动设备和SharePoint 2013 - 第1部分:概述 移动设备和SharePoint 2013 - 第2部分:设备管道和SharePoint页面模型 移动设备和SharePoint 2013 - 第3部分:推送通知 移动设备和SharePoint 2013 - 第4部分:定位 移动设备和SharePo…
博客地址:http://blog.csdn.net/foxdave 原文地址 在该系列文章中,作者展示了SharePoint 2013最显著的新功能概观--对移动设备的支持. 该系列文章: 移动设备和SharePoint 2013 - 第1部分:概述 移动设备和SharePoint 2013 - 第2部分:设备管道和SharePoint页面模型 移动设备和SharePoint 2013 - 第3部分:推送通知 移动设备和SharePoint 2013 - 第4部分:定位 移动设备和SharePo…
题目链接  ZOJ Monthly, March 2018 Problem G 题意  给定一个字符串.现在求一个下标范围$[0, n - 1]$的$01$序列$f$.$f[x] = 1$表示存在一种方案,删掉原字符串中的连续$x$个字母, 使得剩下的字符串中任意相邻的两个字母都不同.在这道题中所有的字符串首尾字符看做是相邻的. 对于每个起始位置求出最多往右延伸到的位置,满足该区间代表的字符串是一个满足任意相邻字母不同的字符串. 首先考虑一个连续的满足任意相邻字母不同的字符串.设其长度为$l$…
题目链接  ZOJ Monthly, March 2018 Problem F 题意很明确 这个模数很奇妙,在$[0, mod)$的所有数满足任意一个数立方$48$次对$mod$取模之后会回到本身. 所以开$48$棵线段树,和一个永久标记.当对某个区间操作时对这个区间加一层永久标记. 即当前我要查找的第$x$层,实际找的是第$up[i] + x$层. 时间复杂度$O(48nlogn)$ #include <bits/stdc++.h> using namespace std; #define…
myeclipse 启动tomcat时报错:Cannot change deployment state from ERROR to REDEPLOYING.ds - 刘琦的专栏 - 博客频道 - CSDN.NET http://blog.csdn.net/u012922219/article/details/42869361   错误 : 无改将部署状态从"错误"变成"重新部署"状态. 解决办法: 右击"项目名" –> MyEclipse…
迁移到Android Studio中的项目,在运行时有时会在Event Log中报这种错: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation 并且右下角还有红色的叹号,非常刺眼. 然后从真机调试换到模拟机运行,依然存在. 虽然不影响编译运行,但是对于有强迫症的人来说简直不能忍. 点击File->Invalidate Cache and Restar…
A simple problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3702 Accepted Submission(s): 1383 Problem Description Zty很痴迷数学问题..一天,yifenfei出了个数学题想难倒他,让他回答1 / n.但Zty却回答不了^_^. 请大家编程帮助他. Input 第一行…
H - Solve this interesting problem Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5323 Appoint description:  System Crawler  (2015-07-28) Description Have you learned something about segment tr…
The 3n + 1 problem Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 53927   Accepted: 17142 Description Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In th…
Sum Problem Time Limit: 1000/500 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 338086    Accepted Submission(s): 85117 Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this pro…
转载请注明原文地址:http://blog.csdn.net/milado_nju 1. 该演讲主要介绍WebKit的渲染机制的内部工作原理和一些新的技术,特别是针对不断出现的多种终端所做的一些努力. 2. 讲稿地址:http://djt.qq.com/ppt/237 3. 一些个人见解,不一定准确,欢迎发表自己的观点: http://www.infoq.com/cn/news/2013/04/interview-zhuyongsheng…
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1600 题意: 给你一个长度为n的木板,让你把这个木板切割成四段(长度为整数),并且要求这四段可以构成一个四边形. 问你有多少种切割方法(切割点不同就算不同). 题解: 构成四边形的条件: 任意一边长度 < 周长/2 证明:设四边为a,b,c,d.因为有a < b+c+d,所以2*a < a+b+c+d = C,所以a < C/2. 简化问题: 给你n个小木块,排成一排.问你…
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1601 题意: Farmer John已经决定把水灌到他的n(1<=n<=300)块农田,农田被数字1到n标记. 把一块土地进行灌水有两种方法,从其他农田饮水,或者这块土地建造水库. 建造一个水库需要花费wi(1<=wi<=100000),连接两块土地需要花费P[i][j](1 <= p[i][j] <= 100000, p[i][j]=p[j][i], p[i]…
题目链接:http://begin.lydsy.com/JudgeOnline/problem.php?id=1333 题意: 有n种不同币值的硬币,并保证大币值一定是小币值的倍数. 每种硬币的币值为val,数量为cnt. 每个月你要给Bessie发金额为c的津贴(可以比c多,但不能少). 问你最多能发多少个月. 题解: 贪心. 贪心策略: (1)如果能恰好凑出c的钱,则应尽可能使用大币值的硬币. (2)如果不能恰好凑出,则应让花的冤枉钱尽可能少. 实现: 先按币值从大到小排序... (1)在保…
On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010. Please use the Design Manager -> Snippet Gallery. In short: You must wrap the Register tag with: <!--SPM: register tag --> Like this: <!--SPM:<%@Regis…
题目描述 花匠栋栋种了一排花,每株花都有自己的高度.花儿越长越大,也越来越挤.栋栋决定 把这排中的一部分花移走,将剩下的留在原地,使得剩下的花能有空间长大,同时,栋栋希 望剩下的花排列得比较别致. 具体而言,栋栋的花的高度可以看成一列整数h1,h2..hn.设当一部分花被移走后,剩下的花的高度依次为g1,g2..gn,则栋栋希望下面两个条件中至少有一个满足: 条件 A:对于所有g(2i)>g(2i-1),g(2i)>g(2i+1) 条件 B:对于所有g(2i)<g(2i-1),g(2i)…
<学得少却考得好Learn More Study Less>这本书最早是从褪墨网站上看到的,crowncheng翻译了全文.这本书介绍了不少学习方法,非常适合在校的学生,原文的作者Scott Young在高中和大学的学习成绩很好,但花在学习上的时间并不太多. 全书一上来引入了Holistic(整体性学习方法)这个单词,用来与死记硬背(Rote Memorization)学习法相区别,书的第四部分为小结,所以主要内容实际上是三个部分: 一.策略Strategy 二.技术Technology 三.…
Have you learned something about segment tree? If not, don't worry, I will explain it for you.  Segment Tree is a kind of binary tree, it can be defined as this:  - For each node u in Segment Tree, u has two values: $L_u$ and $R_u$.  - If $L_u = R_u$…
首先嘚瑟一下这场比赛的排名:59 (第一次看到这么多 √ emmmm) 好了进入正文QAQ ...这道题啊,思路很清晰啊. 首先你看到树上路径边权和,然后还带修改,不是显然可以想到 树剖+线段树 维护重链么? 然后你再看啊,这是一个连通图,然后有 n 个点 n 条边,于是很显然会有一个环(然后就构成了一个 仙人掌 ...不过我并不了解仙人掌) 然后你再看!这里只会有一个环,我们假设没有这个环,那么这就是一道 树剖 模板题,那么我们可不可以特殊地,让这个环当根,除这个环以外的其他节点来简单 树剖…
网络基础命令 [root@localhost sysconfig]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface eth0 #DHCP服务器及submask eth0 #网关,DNSserver [root@localhost network-scripts]# route -n Kernel IP routing table Destination Gat…
描述: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note t…