Detect the Virus
Time Limit: 2 Seconds Memory Limit: 65536 KB
One day, Nobita found that his computer is extremely slow. After several hours' work, he finally found that it was a virus that...
分类:
其他好文 时间:
2014-08-16 09:44:50
阅读次数:
377
import?java.util.concurrent.ExecutorService;
import?java.util.concurrent.Executors;
/**
?*?Created?by?alpha?on?14-8-15.
?*/
public?class?Main?{
????private?static?final?int?TIM...
分类:
编程语言 时间:
2014-08-16 01:12:49
阅读次数:
349
类似于扫雷游戏,在一些格子中散步着一些地雷,具体的埋藏位置并不清楚,但知道每个格子及其周围八个格子的地雷总数。请问此时正中间哪一行最多可能有多少地雷(题目假定所有的输入都是奇数行的)?限制条件输入有R行C列smallR=3,53≤C≤5Large3≤R≤49,R是奇数3≤C≤49样例1输入R=3,C...
分类:
其他好文 时间:
2014-08-16 00:57:59
阅读次数:
280
首先,这关系到java对象中的生命周期的问题。基础数据类型和引用变量(不是被引用的对象)做局部变量时(这里是和做为变量成员变量区别,它们作为成员变量后就作为对象的一部分和对象的生命周期相同了);它们的生命中周期是有作用域的,它没有受生命周期影响这一说,但是同样在这一作用域创建的对象的生命周期并不受作...
分类:
其他好文 时间:
2014-08-15 19:31:09
阅读次数:
245
异常处理:程序在运行过程中,发生错误会导致程序退出,这种错误,就叫做异常。处理这种错误,就叫做异常处理。 1、轻描淡写Try、Catch、Finally、throw用法 在异常处理中,首先需要对可能发生异常的语句进行异常捕捉,try就是用于预测可能出现的异常。捕获异常并对异常进行处理,就...
分类:
其他好文 时间:
2014-08-15 19:14:59
阅读次数:
211
JAVA获取访问用户的客户端IP(适用于公网与局域网) /**
* 获取访问用户的客户端IP(适用于公网与局域网).
*/
public static final String getIpAddr(final HttpServletRequest request)
throws Exception {
if (request == null) {
throw (new E...
分类:
编程语言 时间:
2014-08-15 16:06:19
阅读次数:
275
JAVA将字符串表示的ip地址转换为long表示 /**
* 将字符串表示的ip地址转换为long表示.
*
* @param ip ip地址
* @return 以32位整数表示的ip地址
*/
public static final long ip2Long(final String ip) {
if (!RegexpUtils.isExactlyMatches("(...
分类:
编程语言 时间:
2014-08-15 16:05:19
阅读次数:
253
JAVA将整数表示的ip地址转换为字符串表示 /**
* 将整数表示的ip地址转换为字符串表示.
*
* @param ip 32位整数表示的ip地址
* @return 点分式表示的ip地址
*/
public static final String long2Ip(final long ip) {
final long[] mask = { 0x000000FF, 0...
分类:
编程语言 时间:
2014-08-15 16:05:03
阅读次数:
262
Description
Sewing Buttons with Grandma
After so many years of studying math in the Academy of Colombian Mathematics (ACM) in the tropic, Eloi has finally decided to visit hi...
官方文档对于dex中的class数据结构表示如下:class_idx uint indexintothetype_idslistforthisclass.Thismustbeaclasstype,andnotanarrayorprimitivetype.access_flags uint accessflagsfortheclass(public,final,etc.).See"access_flagsDefinitions"forde..
分类:
其他好文 时间:
2014-08-15 02:53:09
阅读次数:
291