题意:给你一个数组,问你交换最多K个数以后,最大子串和为多少;解题思路:枚举这个数组最大字串和的起点和终点,然后优先队列交换这段里面的小数去换外面的大数,即可求出答案!解题代码:
1 // File Name: c.cpp 2 // Author: darkdream 3 // Created Ti...
分类:
其他好文 时间:
2014-04-29 21:44:33
阅读次数:
605
我使用crontab同步一个文件夹时,发现一个问题,我在crontab中设置的1分钟运行一次.但当那个文件夹的内容改变时。1分钟不一定能同步完,但这时第二个rsync进行又起来了。这个就产生一个问题,二个rsync一起处理相同的文件,这样会出问题。如下1
* * * * /usr/bin/rsync...
分类:
其他好文 时间:
2014-04-29 21:28:07
阅读次数:
560
After having installed Ubuntu OS, you should
update config file for root account. The commands are listed as follow:vi
/etc/lightdm/lightdm.conf #open...
分类:
其他好文 时间:
2014-04-29 19:21:56
阅读次数:
555
java.lang.SecurityException: Requires
READ_PHONE_STATE: Neither user 10088 nor current process has
android.permission.READ_PHONE_STATE.今天写了一款发短信的软件,拿了...
分类:
移动开发 时间:
2014-04-29 18:16:15
阅读次数:
1324
2014-04-28
22:05题目:写个程序判断三连棋哪一方赢了。解法:三个相同的棋子连成一条横线,竖线或者对角线就判断为赢了。代码: 1 // 17.2 Write an
algorithm to check if someone has won the tic-tac-toe game. 2 ...
分类:
其他好文 时间:
2014-04-29 18:12:07
阅读次数:
474
vim toolis a commom editor, for the sake of
improving effeicient, it is necessary to configurate vim config file. The
following comands will help you....
分类:
其他好文 时间:
2014-04-29 17:58:49
阅读次数:
502
上一周的工作进度有点慢,因为找学校的平面图上遇到了瓶颈。因为上一周的工作,有一半都是要基于平面图进行的,最后找到了一张平面图,由于此图太大,一般的电脑处理图片的软件都处理不动,处理图片又花了两天的时间,最后图片的效果还没有达到预期的要求。已完成工作的总结:1.界面的简单布局都已经确定。当左侧选择相应...
分类:
其他好文 时间:
2014-04-29 16:52:50
阅读次数:
447
happens-beforerelation on memory operations
such as reads and writes of shared variables. The results of a write by one
thread are guaranteed to be .....
分类:
移动开发 时间:
2014-04-29 16:38:32
阅读次数:
511
Download .NET
Profilerhttp://www.yourkit.com/dotnet/download/dotTrace 5.5
Performancehttp://www.jetbrains.com/profiler/
分类:
Web程序 时间:
2014-04-29 16:36:27
阅读次数:
448
导入工程:File->New->project:选择“Java project
from existing ant buildfile”再从菜单windows->show view->ant
打开ant工具对话框打开ant编译文件build.xml当编译完成后,在源码根目录下会生成一个target目...
分类:
其他好文 时间:
2014-04-29 16:17:53
阅读次数:
519