BlueJ code pad shell/REPL...
分类:
其他好文 时间:
2014-06-14 17:34:53
阅读次数:
231
自己实现了一下二叉搜索树的数据结构,记录一下:
#include
using namespace std;
struct TreeNode{
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int value) { val=value; left=NULL; right=NULL; }
};
clas...
分类:
编程语言 时间:
2014-06-14 13:36:40
阅读次数:
265
在单选按钮操作中,可以使用ItemListener接口进行事件的监听。
package com.beyole.util;
import java.awt.Container;
import java.awt.GridLayout;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.a...
分类:
编程语言 时间:
2014-06-14 12:52:27
阅读次数:
325
使用DWR实现自动补全 类似百度搜索框的自动显示效果
自动补全:是指用户在文本框中输入前几个字母或汉字的时候,自动在存放数据的文件或数据库中将所有以这些字母或汉字开头的数据提示给用户供用户选择
在日常上网过程中,我们经常使用搜索引擎,当我们输入想要检索的关键字时,搜索引擎会提示我们相关的关键字...
分类:
其他好文 时间:
2014-06-14 12:51:24
阅读次数:
234
承接上一讲。
2.7文件I/O
关于读写文件,C++中有一个专门的头文件。
首先是读文件示例,如下:
/*************************************************************************
> File Name: list1301_file.cpp
> Author: suool
> Mail: 102...
分类:
编程语言 时间:
2014-06-14 12:42:17
阅读次数:
286
Problem Description
give you a string, please output the result of the following function mod 1000000007
n is the length of the string
f() is the function of fibonacci, f(0) = 0, f(1) = 1...
a...
分类:
其他好文 时间:
2014-06-14 11:45:49
阅读次数:
243
package com.he.list;
import java.util.Arrays;
import org.w3c.dom.ls.LSException;
class ArrayList {
private int length;// the list's length
private int[] store;// store the data
// initialize ...
分类:
其他好文 时间:
2014-06-14 11:16:05
阅读次数:
224
题目链接:Frogger
题意:两只青蛙,A和B,A想到B哪里去,但是A得弹跳有限制,所以不能直接到B,但是有其他的石头作为过渡点,可以通过他们到达B,问A到B的所有路径中,它弹跳最大的跨度的最小值
PS:最小生成树过的,刚开始用Dijstra做,Kao,精度损失的厉害,对于Dijksra的变形不大会变啊,看了Discuss有人用最小生成树过,我一划拉,还真是,敲了,就过了,等会研究研究最...
分类:
其他好文 时间:
2014-06-14 10:35:14
阅读次数:
271
#include
#include
using namespace std;
#define read(x) scanf("%lld",&x)
int main()
{
priority_queue,greater >q;
long long n,temp,sum;
read(n);
if(n==1)
{
read(temp);
printf("%lld\n",temp);
...
分类:
其他好文 时间:
2014-06-14 10:34:12
阅读次数:
223
题目链接:Stockbroker Grapevine
题意: n个人炒股,每个人都可以给其他人报信,第 1 行 n,第x行 第一个 是 第 x-1个人可以给几个人报信,和时间 球最少时间 和从第几个人开始报信
水题,Floyd 一遍 过;
ME 676KB
TI 16MS
#include
#include
#include
#include
#incl...
分类:
其他好文 时间:
2014-06-14 10:26:59
阅读次数:
168