A. Scout YYF ITime Limit: 1000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainYYF is a couragous scout. Now he is on a danger...
分类:
其他好文 时间:
2014-07-27 22:04:39
阅读次数:
316
常见的:
我们在Set中很方便的使用了诸如Integer和String这样的Java预定义类型,这些类型被设计为可以在容器内部使用。
当你创建自己的类型时,要意识到Set需要一种方式来维护存储顺序,而存储顺序如何维护,则是在Set的不同实现之间会有所变化。因此,不同的Set实现不仅具有不同的行为,而且它们对于可以在特定的Set中放置的元素的类型也有不同的要求:
* ----------...
分类:
其他好文 时间:
2014-07-27 11:32:52
阅读次数:
179
题目:The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return a....
分类:
编程语言 时间:
2014-07-27 11:00:22
阅读次数:
262
10628. Count on a treeProblem code: COTYou are given a tree with N nodes.The tree nodes are numbered from 1 to N.Each node has an integer weight.We wi...
分类:
其他好文 时间:
2014-07-27 10:31:42
阅读次数:
304
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.For example, Given n = 3,You should return the followin...
分类:
其他好文 时间:
2014-07-27 10:21:02
阅读次数:
219
C. 方格取数(1)Time Limit: 5000msMemory Limit: 32768KB64-bit integer IO format:%I64d Java class name:Main给你一个n*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没...
分类:
其他好文 时间:
2014-07-26 16:57:11
阅读次数:
361
题目:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or anothe....
分类:
编程语言 时间:
2014-07-26 14:14:35
阅读次数:
225
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 class Solution { 2 public: 3 int reverse(int x){ 4 ...
分类:
其他好文 时间:
2014-07-26 13:54:24
阅读次数:
206
begin ShowMessage(IntToStr(Byte(^A))); {1} ShowMessage(IntToStr(Integer(^b))); {2} ShowMessage(IntToStr(Integer(^^))); {30} ShowMessage(IntToStr(Int.....
分类:
其他好文 时间:
2014-07-26 01:39:36
阅读次数:
213
B. Power StringsTime Limit: 3000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainGiven two strings a and b we define a*b to be...
分类:
其他好文 时间:
2014-07-26 01:25:26
阅读次数:
300