码迷,mamicode.com
首页 >  
搜索关键字:positive    ( 2430个结果
Codeforces Round #277 (Div. 2)
整理上次写的题目:A:For a positive integernlet's define a functionf:f(n)?= -?1?+?2?-?3?+?..?+?(?-?1)nnYour task is to calculatef(n)for a given integern.InputT....
分类:其他好文   时间:2014-11-13 22:28:30    阅读次数:174
leetcode .First Missing Positive
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru...
分类:其他好文   时间:2014-11-13 22:11:38    阅读次数:141
【sicily系列】1325 digit generator
DescriptionFor a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When M is the digitsum of N , we call N a g...
分类:其他好文   时间:2014-11-13 12:48:57    阅读次数:172
zoj 1425 最大交叉匹配
Crossed MatchingsTime Limit: 2 Seconds Memory Limit: 65536 KBThere are two rows of positive integer numbers. We can draw one line segment between any....
分类:其他好文   时间:2014-11-11 18:49:49    阅读次数:199
Calculate the formula
Problem DescriptionYou just need to calculate the sum of the formula: 1^2+3^2+5^2+……+ n ^2.InputIn each case, there is an odd positive integer n.Outpu...
分类:其他好文   时间:2014-11-10 23:09:21    阅读次数:271
[POJ] 2453 An Easy Problem [位运算]
An Easy ProblemDescriptionAs we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and i...
分类:其他好文   时间:2014-11-10 17:39:08    阅读次数:196
第一轮 K
Maximum Sum Time Limit:500MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Given a 2-dimensional array of positive and negative integers, find the sub-rect...
分类:其他好文   时间:2014-11-10 10:04:21    阅读次数:119
Rearrange a string so that all same characters become d distance away
Given a string and a positive integer d. Some characters may be repeated in the given string. Rearrange characters of the given string such that the s...
分类:其他好文   时间:2014-11-08 16:27:57    阅读次数:186
POJ1019——Number Sequence(大数处理)
Number SequenceDescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number ...
分类:其他好文   时间:2014-11-08 10:25:14    阅读次数:209
Codeforces 21C Stripe 2 卧槽,出题人母语绝对不是English啊
sum = sigma num[i] (1 s[i] = sigam num[j] (1 找到所有满足s[i]*2 =sum-s[i] ,s[i] = 2*(sum-s[i])。然后枚举累加一下。 卧槽,可是题意里明明说每个 piece 里 都要有positive interge。 可是去了这个限制就过了啊。 #include #include #include #include...
分类:其他好文   时间:2014-11-06 21:59:33    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!