Code
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Problem Description
WLD likes playing with codes.One day he is writing a function.Howerver,his c...
分类:
其他好文 时间:
2015-04-27 11:24:28
阅读次数:
138
#!/usr/bin/expect -f
set timeout 10
set name [lindex $argv 0]
set pwd [lindex $argv 1]
set ip [lindex $argv 2]
spawn ssh -l $name $ip
expect "password:"
send "$pwd\r"
interact...
分类:
其他好文 时间:
2015-04-27 11:22:01
阅读次数:
110
lang="en">
charset="UTF-8">
type="text/css">
#box{width:100px;height:100px;background:red;position: absolute;left:0;}
span{height:900px;border-left:1px red solid;po...
分类:
其他好文 时间:
2015-04-27 11:22:20
阅读次数:
118
problem:
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete as many transactions as ...
分类:
其他好文 时间:
2015-04-27 11:22:20
阅读次数:
123
广告机旨在特定的物理场所、特定的时刻段对特定的人群进行广告信息播映的特性,让其获得了广告的效应......
分类:
其他好文 时间:
2015-04-27 11:19:48
阅读次数:
115
函数简介
函数功能: 打开一个文件
函数原型:FILE * fopen(const char * path,const char * mode);
相关函数:open,fclose,fopen_s[1]?
,_wfopen
所需库: stdio.h>
返回值: 文件顺利打开后,指向该流的文件指针就会被返回。若果文件打开失败则返回NULL,并把错...
分类:
其他好文 时间:
2015-04-27 11:21:23
阅读次数:
109
动态设定GridView的高度,固定column,根据gridview中的item个数设定高度:
调用以下方法:
public static void setListViewHeightBasedOnChildren(GridView listView) {
// 获取listview的adapter
ListAdapter listAdapter = li...
分类:
其他好文 时间:
2015-04-27 11:21:13
阅读次数:
244
#div1{width:100px;height:100px;background:red;position: absolute;}
window.onload=function()
{
var oDiv=document.getElementById("div1");
var dis...
分类:
其他好文 时间:
2015-04-27 11:20:26
阅读次数:
137
工厂方法模式(Factory Method):
Alias :virtual constructory 虚构造器
Intent: 定义一个用于创建对象的接口,让子类决定实例化哪一个类。Factory Method使一个类的实例化延迟到其子类。
Motivation:一个框架使用抽象类定义和管理对象之间的关系。这个框架负责去创建这些对象。
工厂方法模式是类的创建模式,又叫做虚拟构造子模式(V...
分类:
其他好文 时间:
2015-04-27 11:19:30
阅读次数:
115
package com.eyugame.modle;
/**
* 访问者模式
* @author JYC506
*
*/
/*访问者*/
public class Visitor implements IVisitor{
@Override
public void update(IPro o) {
o.doSomeThing();
}
public static void ...
分类:
其他好文 时间:
2015-04-27 11:18:58
阅读次数:
95
problem:
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profit. You may complete at most two transactions...
分类:
其他好文 时间:
2015-04-27 11:18:37
阅读次数:
134
分析:简单DP,转移方程dp[j]=max{dp[i]}+a[j];(0
#include
using namespace std;
__int64 dp[1001];
int a[1001];
int main()
{
int i,n,j;
__int64 max;
while(cin>>n && n)
{
for(i=0;i>a[i];
...
分类:
其他好文 时间:
2015-04-27 11:19:54
阅读次数:
100
数字分隔(二)
时间限制:1000 ms | 内存限制:65535 KB
难度:3
描述
在一个遥远的国家,银行为了更快更好的处理用户的订单,决定将一整串的数字按照一定的规则分隔开来,分隔规则如下:
1、实数的整数部分按照每三个数字用逗号分隔开(整数部分的高位有多余的0时,需先将多余的0过滤后,再进行数字分隔,如:0001234567 输出结果为1,234,567.00)
2、...
分类:
其他好文 时间:
2015-04-27 11:17:50
阅读次数:
103