1.包装类除了Void和Character,其他六个全部都继承自Number。Number是一个抽象类。如下:
public abstract class Number implements java.io.Serializable {
public abstract int intValue();
public abstract long longValue();
pu...
分类:
编程语言 时间:
2014-08-03 12:51:35
阅读次数:
307
Consider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root node is X, we can get the minimum number in this subtree by repe...
分类:
其他好文 时间:
2014-08-03 12:49:15
阅读次数:
229
题目:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit i....
分类:
编程语言 时间:
2014-08-03 07:49:34
阅读次数:
246
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
/**
* Definition for binary tree
...
分类:
其他好文 时间:
2014-08-02 23:32:04
阅读次数:
232
Description
The puzzle game of Sudoku is played on a board of N2 × N2 cells. The cells are grouped in N × N squares of N × N cells each. Each cell is either empty or contains a number between
1 a...
分类:
其他好文 时间:
2014-08-02 23:26:34
阅读次数:
344
LightOJ 1205 - Palindromic Numbers (数位dp)
ACM
题目地址:SPOJ MYQ10 Mirror Number
题意:
求[a,b]中回文的个数。
分析:
是SPOJ MYQ01的简单版...其实有非递归方法的。
代码:
/*
* Author: illuz
* Blog: http:...
分类:
其他好文 时间:
2014-08-02 20:56:24
阅读次数:
218
SPOJ MYQ10 10649. Mirror Number (数位dp)
ACM
题目地址:SPOJ MYQ10 Mirror Number
题意:
求[a,b]中镜像回文的个数。
0
分析:
看到题目和数据范围就知道是数位dp了。
很明显镜像回文只有0,1,8,跟回文的一题一样,在dfs的时候得开个辅助数组记录前面已经选择的数字。
注意还得去掉前...
分类:
其他好文 时间:
2014-08-02 18:27:13
阅读次数:
242
枚举支点之后数位DP,注意姿势#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace st...
分类:
其他好文 时间:
2014-08-02 18:11:43
阅读次数:
301
很裸,注意状态的记录和存储#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;...
分类:
其他好文 时间:
2014-08-02 15:24:13
阅读次数:
236
安装了一个2008的VM,欢天喜地准备做一些测试,结果在用UNC访问VM的过程中出现了如下错误,这个错误其实非常普遍,在google里搜error number能搜出好多文章,这其实也是最可怕的地方,搜出来的东西千奇百怪,却没有一个能和自己的错误对应上。本例就是其中一个,windows firewa...
分类:
Windows程序 时间:
2014-08-02 15:23:53
阅读次数:
1025