G -Self Numbers(2.2.1)Time Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIn 1949 the Indian mathematician D.R. K...
分类:
其他好文 时间:
2014-08-07 00:27:37
阅读次数:
249
问题:根节点到叶子结点的所有权值和分析:从根节点遍历,若遍历到叶子结点,则sum+其路径的所有权值和/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * Tree...
分类:
其他好文 时间:
2014-08-06 21:59:32
阅读次数:
184
Description
The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the qu...
分类:
其他好文 时间:
2014-08-06 19:06:42
阅读次数:
319
Game Description:
1. In a closed door, there will be a circle, and 30 numbers in the circle.
2. Each team (about 10 people) need to take number out of the circle by ascend order.
3. Each team has...
分类:
其他好文 时间:
2014-08-06 19:06:02
阅读次数:
359
Palindrome
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 52571
Accepted: 18124
Description
A palindrome is a symmetrical string, that is, a string read...
分类:
其他好文 时间:
2014-08-06 19:03:12
阅读次数:
194
import java.util.Random;import javax.swing.JOptionPane;public class Numbers { public static void main(String[] args){ double digit; d...
分类:
其他好文 时间:
2014-08-06 18:11:31
阅读次数:
208
Problem Description
bobo has a sequence a1,a2,…,an. He is allowed to swap two adjacent numbers for no more than k times.
Find the minimum number of inversions after his swaps.
Note: The numbe...
分类:
其他好文 时间:
2014-08-06 14:51:38
阅读次数:
177
Description
In the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to select a subse...
分类:
其他好文 时间:
2014-08-06 10:37:11
阅读次数:
358
Problem Description
bobo has a sequence a1,a2,…,an. He is allowed to swap two
adjacent numbers for no more than k times.
Find the minimum number of inversions after his swaps.
Note: The number...
分类:
其他好文 时间:
2014-08-05 22:44:03
阅读次数:
248
Problem Description:
Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
If such arrangement is not possible, it must rea...
分类:
其他好文 时间:
2014-08-05 22:40:40
阅读次数:
241