问题:找出某个元素的位置朴素的暴力方法class Solution {public: int search(int A[], int n, int target) { int i; for(i=0;i<n;i++) { if(A[...
分类:
其他好文 时间:
2014-08-06 21:45:42
阅读次数:
196
问题:消除数组中重复次数超过三次的多余的数分析:若ai-1==ai-2若ai也相等,则清楚aiclass Solution {public: int removeDuplicates(int A[], int n) { int i,j; for(i=2;i<n;i+...
分类:
其他好文 时间:
2014-08-06 21:41:52
阅读次数:
199
这2天 做的都是有关矩阵的 =-=....小小矩阵 竟然有这么多 花头...这题 的特点是 We can swap any two columns any times 就是可以任意交换X列与Y列 任意次一开始 我还担心我的方法 会不会tle 看到3000ms就放心了。。。我总觉得 会有更高效的方法 ...
分类:
其他好文 时间:
2014-08-06 18:14:41
阅读次数:
263
Problem Description
Given two matrices A and B of size n×n, find the product of them.
bobo hates big integers. So you are only asked to find the result modulo 3.
Input
The input con...
分类:
其他好文 时间:
2014-08-06 14:58:51
阅读次数:
220
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
.detail_row?{
????overflow?:hidden;
????font-size?:12px;
}
.detail_col_one,?.detail_col_two,?.detail_col_three,?.detail_col_four,.one-row-label,?.one-row-content?{
????margin-bo...
分类:
其他好文 时间:
2014-08-06 02:06:20
阅读次数:
1254
题目:Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can b....
分类:
编程语言 时间:
2014-08-06 01:52:30
阅读次数:
251
Problem DescriptionGiven two matrices A and B of size n×n, find the product of them.bobo hates big integers. So you are only asked to find the result ...
分类:
其他好文 时间:
2014-08-06 01:43:40
阅读次数:
334
题目:Given two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, such that:Only one letter...
分类:
编程语言 时间:
2014-08-06 01:35:30
阅读次数:
389
DescriptionStacking BoxesBackgroundSome concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when ...
分类:
其他好文 时间:
2014-08-06 01:32:20
阅读次数:
275