连接数据库的一个框架,Orm框架的一种。一、下载:http://hibernate.org/二、配置:1、导入必须的包hibernate-release-4.3.5.Final\lib\required(必须的jar)如果需要时用annotataion的话,导入:hibernate-release-...
分类:
系统相关 时间:
2014-05-19 17:10:36
阅读次数:
498
Context.javapackage edu.interpreter;public class
Context { private String input; private int output; public String getInput() {
return...
分类:
其他好文 时间:
2014-05-19 14:56:22
阅读次数:
322
Description
科协里最近很流行数字游戏。某人命名了一种不降数,这种数字必须满足从左到右各位数字成大于等于的关系,如123,446。现在大家决定玩一个游戏,指定一个整数闭区间[a,b],问这个区间内有多少个不降数。
Input
题目有多组测试数据。每组只含2个数字a, b (1
Output
每行给出一个测试数据的答案,即[a, b]之间有多少阶梯数。...
分类:
其他好文 时间:
2014-05-18 15:09:13
阅读次数:
355
windy定义了一种windy数。
不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。
windy想知道,在A和B之间,包括A和B,总共有多少个windy数?
Input
包含两个整数,A B。
满足 1
Output
包含一个整数:闭区间[A,B]上windy数的个数。
Sample Input
1 10
...
【题目】
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
For example, given array S = {...
分类:
其他好文 时间:
2014-05-18 10:37:57
阅读次数:
269
很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。
这让很多学生很反感。
不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。
Input...
分类:
其他好文 时间:
2014-05-18 10:14:18
阅读次数:
273
【题目】
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.
The brackets must close in the correct order, "()" and "()[]{}" are all valid but "(]" and "([)]" are not.
【题意】
判断给定的字符串是否是合法的...
分类:
其他好文 时间:
2014-05-18 10:08:11
阅读次数:
327
【题目】
Given a roman numeral, convert it to an integer.
Input is guaranteed to be within the range from 1 to 3999.
【题意】
把罗马数转换为整数
【思路】
罗马数字中只使用如下七个基值字母:M,D,C,L,X,V,I,分别用来表示1000、500、100、50、10、5、1。
大体思路是每个罗马字母对应的值相加即可,
但需要处理900, 400, 90, 40, 9, 4这几个特殊...
分类:
其他好文 时间:
2014-05-18 07:58:54
阅读次数:
293
【题目】
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit string "23"
Output: ["ad", "ae", "af", "bd", "be", "bf",...
分类:
其他好文 时间:
2014-05-18 07:30:12
阅读次数:
340
3SumClosest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution....
分类:
其他好文 时间:
2014-05-18 05:57:48
阅读次数:
244