Time Limit Exceeded/*Contains Duplicate II Given an array of integers and an integer k, find out whether there there are two distinct indices i and j....
分类:
其他好文 时间:
2015-06-02 12:54:18
阅读次数:
88
题目:
Contains Duplicate III
Given an array of integers, find out whether there are two distinct indices i and j in
the array such that the difference between nums[i] and nums[j] is
at mo...
分类:
其他好文 时间:
2015-06-02 11:21:48
阅读次数:
90
Euler discovered the remarkable quadratic formula:
n² + n + 41
It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 402 + 40 + 41 = 40...
分类:
其他好文 时间:
2015-06-02 11:16:49
阅读次数:
139
Using names.txt (right click and 'Save
Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical ...
分类:
其他好文 时间:
2015-06-02 09:33:28
阅读次数:
117
JAVA静态方法形式上可以重写,但从本质上来说不是JAVA的重写。因为静态方法只与类相关,不与具体实现相关,声明的是什么类,则引用相应类的静态方法(本来静态无需声明,可以直接引用),看下例子:
Java代码
class Base{ static void a( ){System.out.println("A"); } ...
分类:
编程语言 时间:
2015-06-02 09:28:10
阅读次数:
124
Given an array of integers, find out whether there are two distinct indices i and j in the array such that the difference between nums[i] and nums[j] ...
分类:
其他好文 时间:
2015-06-02 01:37:36
阅读次数:
111
public class Test02 {
public static void main(String[] args){
int x = 5;
System.out.println(x);
}
}
这个时候int前面是不能加static的
public class Test02 {
static int x = 5;
public static void main...
分类:
编程语言 时间:
2015-06-01 22:45:34
阅读次数:
129
///////////////////
#include
//-----------------
union int_char
{
unsigned char ch[4];
float i;
};
void out_put(union int_char x)//x86是小端对其模式,即最数据的最低位存储在地址的最低位上。
{
printf("单精度浮点数值为:%f\n"...
分类:
其他好文 时间:
2015-06-01 22:37:36
阅读次数:
264
以下部分内容并非原创,原作者见到还请谅解~大数String s=”12345”;BigInteger c=BigInteger.valueOf(s);格式输出System.out.printf("%+8.3f\n", 3.14); //"+"表示后面输出的数字会有正负号,正的+,负的- ;8.3f表...
分类:
编程语言 时间:
2015-06-01 22:30:52
阅读次数:
187
1、加载驱动String drivername="com.mysql.jdbc.Driver"; //数据库驱动类路径try{Class.forName(drivername); //创建驱动System.out.println("创建驱动成功!");}catch(ClassNotFoundExce...
分类:
数据库 时间:
2015-06-01 20:20:44
阅读次数:
142