码迷,mamicode.com
首页 >  
搜索关键字:first    ( 14115个结果
假设一对耗子每个月都可以生一对小耗子... ...
/*假设一对耗子每个月都可以生一对小耗子。小耗子生长3个月后,从第4个月开始也就能够生小耗子。问:假设所有的耗子都不死的话,那么20个月后一共有多少只耗子? */#include void main(){ int old = 2,first = 0,second = 0,third = 0; ...
分类:其他好文   时间:2014-08-18 12:02:14    阅读次数:204
伪类与伪元素的区别以及由来
伪类: :first-child :link :hover :active :visited :focus :lang伪元素: :first-line :first-letter :before :after注意:CSS3中伪元素前是两个冒号,如 ::first-lin...
分类:其他好文   时间:2014-08-18 09:14:33    阅读次数:240
UVA 1025 A Spy in the Metro(DP)
Secret agent Maria was sent to Algorithms City to carry out an especially dangerous mission. After several thrilling events we find her in the first station of Algorithms City Metro, examining the tim...
分类:其他好文   时间:2014-08-18 00:21:13    阅读次数:383
线段树+离散化 IP地址段检查 SEGMENT TREE
Problem: Give a series of IP segments, for example, [0.0.0.1-0.0.0.3], [123.234.232.21-123.245.21.1]... Now there is a new IP, find which IP segment it's in ? Solution: First, we could map the end...
分类:其他好文   时间:2014-08-18 00:18:13    阅读次数:309
HUD 1501 Zipper(记忆化 or DP)
Problem Description Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitra...
分类:其他好文   时间:2014-08-17 13:04:42    阅读次数:205
POJ 1692 Crossed Matchings(DP)
Description There are two rows of positive integer numbers. We can draw one line segment between any two equal numbers, with values r, if one of them is located in the first row and the other one i...
分类:其他好文   时间:2014-08-16 23:52:01    阅读次数:560
ZOJ 3210 A Stack or A Queue? (I)
A Stack or A Queue?Time Limit:1 Second Memory Limit:32768 KBDo you know stack and queue? They're both important data structures. A stack is a "first i...
分类:其他好文   时间:2014-08-16 23:48:11    阅读次数:308
假设一对耗子每个月都可以生一对小耗子。小耗子生长3个月后,从第4个月开始也就能够生小耗子。问:假设所有的耗子都不死的话,那么20个月后一共有多少只耗子?
#include void main(){ int i=0,old=2,first=0,second=0,third=0,sum=0; for(i=0;i<20;i++) { old=old+third; third=second; second=first; first=old; ...
分类:其他好文   时间:2014-08-16 23:43:11    阅读次数:221
Head first javascript(一)
网页需要更好的交互体验,仅仅有html和css当然不够,因此javascript粉末登场 ...onload : 页面加载完成之后会出发onload eventalert() : 插入一些提示信息example:在页面加载完成之后提示'Hello, world',可以发现调用函数的方式...
分类:编程语言   时间:2014-08-16 23:38:01    阅读次数:224
POJ 1699 Best Sequence (DFS+预处理)
题意:看那张图就一清二楚了吧, N个序列首位相连(相同的序列部分),得到最短的总序列。 题目链接:http://poj.org/problem?id=1699 ~~~~ 思路就是:将N个序列首尾相连能重合的长度求粗来。然后DFS枚举每种首尾相连的情况。 #include #include #include #define N 22 #define INF 0x7fffffff us...
分类:其他好文   时间:2014-08-16 22:32:41    阅读次数:185
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!