码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
HDU 4339 Query
Query Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2595    Accepted Submission(s): 860 Problem Description You are given two s...
分类:其他好文   时间:2014-08-25 21:12:44    阅读次数:281
POJ 2406 Power Strings
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti...
分类:其他好文   时间:2014-08-25 21:11:14    阅读次数:183
POJ 2305 Basic remains(JAVA练习)
Description Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such tha...
分类:编程语言   时间:2014-08-25 19:20:04    阅读次数:230
Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.思路: 1 cla...
分类:其他好文   时间:2014-08-25 18:38:04    阅读次数:211
UVA - 10951 Polynomial GCD (最大公共多项式)
Description Problem C Polynomial GCD Input: standard input Output: standard output Given two polynomials f(x) and g(x) in Zn, you have to find their GCD polynomial, ie, a polynomial r(x)...
分类:其他好文   时间:2014-08-25 17:09:34    阅读次数:209
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".思路: 1 class Solution { 2 public: 3 strin...
分类:其他好文   时间:2014-08-25 16:58:34    阅读次数:188
[BestCoder Round #6] hdu 4981 Goffi and Median (水题)
Goffi and Median Problem Description A median in a sequence with the length of n is an element which occupies position number ?n+12? after we sort the elements in the non-decreasing order ...
分类:其他好文   时间:2014-08-25 11:55:34    阅读次数:159
UVA - 11768 Lattice Point or Not (拓展gcd)
Now a days a very common problem is:“The coordinate of two points in Cartesian coordinate system is (200, 300) and(4000, 5000). If these two points are connected we get a line segment. How manylattice...
分类:其他好文   时间:2014-08-24 23:54:33    阅读次数:406
HDU 4981 Goffi and Median(水)
HDU 4981 Goffi and Median 思路:排序就可以得到中间数,然后总和和中间数*n比较一下即可 代码: #include #include #include #include using namespace std; const int N = 1005; int n, a[N], sum; int main() { while (~sca...
分类:其他好文   时间:2014-08-24 23:54:23    阅读次数:288
N-Queens
N-Queens  Total Accepted: 12866 Total Submissions: 49759My Submissions The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each oth...
分类:其他好文   时间:2014-08-24 22:21:03    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!