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
A. BabelfishTime Limit: 3000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:MainYou have just moved from Waterloo to a big city. ...
分类:
其他好文 时间:
2014-07-26 01:20:26
阅读次数:
297
D. Going in Cycle!!Time Limit: 3000msMemory Limit: 131072KB64-bit integer IO format:%lld Java class name:MainYou are given a weighted directed graph w...
分类:
其他好文 时间:
2014-07-26 01:00:36
阅读次数:
209
J. Drainage DitchesTime Limit: 1000msMemory Limit: 32768KB64-bit integer IO format:%I64d Java class name:MainEvery time it rains on Farmer John's fiel...
分类:
其他好文 时间:
2014-07-26 00:21:56
阅读次数:
257