原型:extern void *memcpy(void *dest, void *src, unsigned int count);用法:#include 功能:由src所指内存区域复制count个字节到dest所指内存区域。说明:src和dest所指内存区域不能重叠,函数返回指向dest的指针。举...
分类:
其他好文 时间:
2014-08-13 14:46:46
阅读次数:
210
问题见SICP P26此问题的递归方法很简单,类似于背包的思想。 即金额为amount的现金换成n种硬币的种类数 满足循环不变式: count_change(amount,n)=count_change(amount,n-1)+count_change(amount-amount_of_f...
分类:
其他好文 时间:
2014-08-13 14:35:16
阅读次数:
369
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:
其他好文 时间:
2014-08-13 14:20:26
阅读次数:
204
解题报告
题意:
对线段染色,询问线段区间的颜色种数。
思路:
本来直接在线段树上染色,lz标记颜色。每次查询的话访问线段树,求出颜色种数。结果超时了,最坏的情况下,染色可以染到叶子节点。
换成存下区间的颜色种数,这样每次查询就不用找到叶子节点了,用按位或来处理颜色种数。
Count Color
Time Limit: 1000MS
Memory Lim...
分类:
其他好文 时间:
2014-08-12 22:17:24
阅读次数:
376
PHP中简单使用XMLRPC,服务器端和客户端都为PHP代码实现。服务器端:xmlrpc_s.phpgetParam(0)); //返回结果 if(strlen($words) > 0) { return new xmlrpcresp( new xmlrpcval('Server say:...
分类:
Web程序 时间:
2014-08-12 18:50:24
阅读次数:
178
var imagesrcname='a',thissrolltop=300, lazyLoad=(function(){ var map_element = {}, element_obj = [], download_count = 0, last_offset =...
分类:
其他好文 时间:
2014-08-12 18:43:54
阅读次数:
205
在排查一个比较复杂的功能时,怎么查都结果不对,后来发现是因为empty()函数用错了!!!我理所当然的以为$list=array();if(empty(count($list))){ $course_rate = 0;}这样写没什么问题。。。。事实上这是错的。。。因为empty只能检查变量,不能检查...
分类:
其他好文 时间:
2014-08-12 18:15:24
阅读次数:
220
Description
Problem E: Perfect Pth Powers
We say that x is a perfect square if, for some integer b,x = b^2. Similarly,
x is a perfect cube if, for some integerb, x = b^3. More generally,
x is a ...
分类:
其他好文 时间:
2014-08-12 13:48:54
阅读次数:
280
Find them, Catch them
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 31412
Accepted: 9677
Description
The police office in Tadu City decides to say ends...
分类:
其他好文 时间:
2014-08-12 13:38:04
阅读次数:
255
Count Good SubstringsTime Limit: 2000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:451D64-bit integer IO format:%I64d ...
分类:
其他好文 时间:
2014-08-12 12:43:24
阅读次数:
237