题目:查找元素target插入一个数组中的位置。代码:public int
searchInsert(int[] A, int target) { int len = A.length; int i; for(i = 0 ; i
< len ; i++){ ...
分类:
其他好文 时间:
2014-05-18 20:28:13
阅读次数:
299
问题描述:默认情况下,table的单元格td的display为table-cell,在IE给td设置position:relative,然后给它包含的一个容器使用position:absolute进行定位是有效的,但在FF下却不可以。但是在IE下,position:absolute的容器的z-ind...
分类:
其他好文 时间:
2014-05-18 19:41:35
阅读次数:
298
http://acm.hdu.edu.cn/showproblem.php?pid=2066
求多源多汇的最短路,n最大为1000,floyd三重循环会超时。继续dijkstra吧。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#...
分类:
其他好文 时间:
2014-05-18 18:26:39
阅读次数:
238
题目链接:11270 - Tiling Dominoes
和POJ 2411一样的题目,试着用插头DP写了下
代码:
#include
#include
#include
using namespace std;
int n, m, pre = 0, now = 1;
long long dp[2][2222];
int main() {
while (~scanf("%d%d",...
分类:
其他好文 时间:
2014-05-18 14:44:37
阅读次数:
264
下面我们来了解如何实现一个自定义的迭代器,然后再开始慢慢理解迭代器的内部工作原理。先来看一个官方的例子:
<?php
class myIterator implements Iterator {
private $position = 0;
private $array = array(
"first_element",
"second_element",
"last_element",
);...
分类:
Web程序 时间:
2014-05-18 13:58:23
阅读次数:
404
a)
通用选项
-L license
-h 帮助
-fromats 显示可用的格式,编解码的,协议的...
-f fmt 强迫采用格式fmt
-I filename 输入文件
-y 覆盖输出文件
-t duration 设置纪录时间 hh:mm:ss[.xxx]格式的记录时间也支持
-ss position 搜索到指定的时间 [-]hh:mm:ss[.xxx]的...
分类:
其他好文 时间:
2014-05-18 09:38:30
阅读次数:
303
IE6有诸多奇葩,不支持position:fixed就是其中之一。所以在做一些比如固定在顶部或者底部或者固定元素的效果时需要考虑兼容IE6的这个问题。解决方案是用Ie6的hack。
*html {/* 只有IE6支持 */
background-image: url(about:blank);
background-attachment: fixed; /* 固定背景 */
}...
分类:
其他好文 时间:
2014-05-18 07:05:34
阅读次数:
203
System:类中的属性方法都是静态的。无法实例化err:"标准"错误输出流in:"标准"输入流out:"标准"输出流常见方法:long
currentTimeMillis();获取当前时间的毫秒值Properties getProperties();
获取系统属性Properties集合中存储的都...
分类:
编程语言 时间:
2014-05-17 22:30:49
阅读次数:
392
数据类型:基本数据类型和引用数据类型基本数据类型包括 数值型(整数类型
byte,short,int,long;浮点类型 float double);字符型char;布尔型boolean引用数据类型包括
类class;接口interface ;数组2.字面量整数字面量为整数(int);小数字面量为双...
分类:
移动开发 时间:
2014-05-17 21:26:27
阅读次数:
321
解题思路:只要看(A-V)*K 这个公式的更新值是否大于等于A
,大于的话继续循环,否则报错注意一点,数据会爆intWA代码:#includeint main(){ long long n ,m, v, k; int t;
scanf("%d",&t); while(t--)...
分类:
其他好文 时间:
2014-05-17 20:49:27
阅读次数:
167