题意: 给了一个n,k,s,和一个数组,求使用小于s次的交换使得前k个整数的和尽可能的小,交换指的的是相邻的两个数交换,首先考虑 如果最小的k个数全部再最后面,那么至少要花费( n - k + 1 + n)*k/2 - (( k + 1 ) * k / 2) 这么多下才能把这k个数搬运到最前面,也就...
分类:
其他好文 时间:
2015-11-02 23:04:43
阅读次数:
390
You are playing the followingBulls and Cowsgame with your friend: You write a 4-digit secret number and ask your friend to guess it, each time your fr...
分类:
其他好文 时间:
2015-11-02 06:43:30
阅读次数:
246
You are playing the followingBulls and Cowsgame with your friend: You write a 4-digit secret number and ask your friend to guess it, each time your fr...
分类:
其他好文 时间:
2015-11-01 17:51:10
阅读次数:
176
Bulls and CowsYou are playing the followingBulls and Cowsgame with your friend: You write a 4-digit secret number and ask your friend to guess it, eac...
分类:
其他好文 时间:
2015-10-31 22:56:45
阅读次数:
281
The scenario is about Business Secret and our client do worry about data leakage. They want to know whether Suspect copy those data to external hard d...
mysql时间戳转日期格式SELECT FROM_UNIXTIME(add_time,'%Y-%m-%d %H:%i:%s') FROM `wh5_username` where id=23;显示进程show processlist连接数据库mysql -uroot -pPwd.Secret -S ...
分类:
数据库 时间:
2015-10-26 22:16:50
阅读次数:
316
(一)、字符串加密设计思想:加密字符串时,将用户输入的字符串转换成字符数组,分别加三,最后将它们相加得到新的字符串,进行输出。解密亦然。程序流程图:源代码://余尉兴 字符串加密 20151020import javax.swing.*;public class Secret { public...
分类:
其他好文 时间:
2015-10-24 12:59:23
阅读次数:
168
telnet:远程登录23/tcp端口,默认C/S架构类型S:Telnet服务器C/telnet客户端命令都是明文发送,不安全,现在已经很少使用ssh:secureSHell,应用层协议,22/tcp通信的过程中都是通过加密的:服务器会发送主机秘钥服务器有私钥:secretkey客户端有公钥:publickey秘钥交换用户认证..
分类:
其他好文 时间:
2015-10-23 00:17:47
阅读次数:
241
telnet:远程登录23/tcp端口,默认C/S架构类型S:Telnet服务器C/telnet客户端命令都是明文发送,不安全,现在已经很少使用ssh:secureSHell,应用层协议,22/tcp通信的过程中都是通过加密的:服务器会发送主机秘钥服务器有私钥:secretkey客户端有公钥:publickey秘钥交换用户认证..
分类:
其他好文 时间:
2015-10-23 00:06:30
阅读次数:
211