#include using namespace std;int main(){ int a[51],n,k=1; while(cin>>n,n) { int i,ans=0,s=0; for(i=0;i>a[i]; s+=a[i]...
分类:
其他好文 时间:
2014-08-02 01:31:52
阅读次数:
315
传送门:http://poj.org/problem?id=1442Black BoxTime Limit: 1000MSMemory Limit: 10000KDescriptionOur Black Box represents a primitive database. It can save...
分类:
其他好文 时间:
2014-08-01 19:12:02
阅读次数:
211
2014年8月1日 15:34:15基于slice-box 写了一个图片轮播的插件。一、功能:1、图片轮播功能2、自定义功能(数量,效果,打开方式)3、多重效果一键切换4、独立性强,不影响其他代码二、效果图: 下载地址:http://download.csdn.net/detail/douniwa....
分类:
Web程序 时间:
2014-08-01 18:44:32
阅读次数:
587
瀑布流
*{
margin: 0px;
padding:0px;
}
.box{
position: relative;
top:0px;
}
ul li{
list-style-type: none;
position...
分类:
Web程序 时间:
2014-08-01 16:17:01
阅读次数:
294
这题跟 hdu 1734 push box 是一样的,只不过这题推的是一个箱子,另外求的是箱子被推了多少次,那么只要在箱子被推的时候 次数才加1,然后使用优先队列就ok了
写了1734就会觉得这题很水啦 HDU1734题解
网上主流的都是bfs+bfs,或者是bfs+dfs
#include
#include
#include
#include
#include
using nam...
分类:
其他好文 时间:
2014-08-01 10:58:21
阅读次数:
326
ioctl.h 分析
我自己画了个解析图。。。不要嫌弃丑啊。。。哈哈
type
The magic number. Just choose one number (after consultingioctl-number.txt ) and use it throughout the driver. This field is eight b...
分类:
其他好文 时间:
2014-08-01 10:55:41
阅读次数:
234
Software License
.box { overflow:hidden; width:96%; margin: 0 auto; padding-top: 20px;}
.lan { overflow:hidden; margin-bottom:20px; color:#2f2f2f; background-color:#eee;}
...
分类:
移动开发 时间:
2014-07-31 20:57:17
阅读次数:
332
分享下PHP return语句的另一个作用,在bbPress的代码中看到的一个奇葩使用方法。一直以为,return只能出现在函数中,直到看了bbPress的代码:<?phprequire_once('./bb-load.php');bb_repermalink(); // The magic hap...
分类:
Web程序 时间:
2014-07-31 19:57:57
阅读次数:
257
HDU 3988 Harry Potter and the Hide Story(数论-整数和素数)
题目大意:
给定 n和k , 求 n! % k^i 等于0时,i 的最大取值是多少?
解题思路:
将 k分解质因素,n也根据k的质因素求出关系限制i,最后算出最大的i即可。...
分类:
其他好文 时间:
2014-07-31 17:14:37
阅读次数:
220
题意:有n个数,按顺序加入,求加入前Gi个数时第i个最小的数是多少思路:这里需要用到STL里的优先队列priority_queue,建一个大堆和一个小堆,若想在一个无序的序列里找第n个小的数,可以先把一个序列的n-1个数放入大堆(即假设这n-1个数是该序列里最小的),然后向小堆里push数,若小堆....
分类:
其他好文 时间:
2014-07-31 16:41:36
阅读次数:
276