码迷,mamicode.com
首页 >  
搜索关键字:coins    ( 511个结果
Lucky Coins Sequence
Lucky Coins Sequence Problem Description As we all know,every coin has two sides,with one side facing up and another side facing down.Now,We consider ...
分类:其他好文   时间:2017-02-11 10:46:25    阅读次数:206
Codechef APRIL14 ANUCBC Cards, bags and coins 题解
题目大意 有n个数字,选出一个子集,有q个询问,求子集和模m等于0的方案数%1000000009。(n <= 100000,m <= 100,q <= 30) 假设数据很小,我们完全可以做一个背包。 我们沿着背包的思路,看能不能给物品分一下类,由于m比较小,完全按N个数字模M后的值进行分类,这样就变 ...
分类:其他好文   时间:2017-02-10 22:56:37    阅读次数:235
LeetCode Arranging Coins
原题链接在这里:https://leetcode.com/problems/arranging-coins/ 题目: You have a total of n coins that you want to form in a staircase shape, where every k-th ro ...
分类:其他好文   时间:2017-01-25 16:35:21    阅读次数:160
Hello Kiki(中国剩余定理——不互质的情况)
Hello Kiki Problem Description One day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and s ...
分类:其他好文   时间:2017-01-20 22:20:24    阅读次数:328
【动态规划】Gym - 101102A - Coins
Hasan and Bahosain want to buy a new video game, they want to share the expenses. Hasan has a set of N coins and Bahosain has a set of M coins. The vi ...
分类:其他好文   时间:2017-01-15 22:30:23    阅读次数:256
尽快写完Math!
(1)Arranging Coins 解题思路一:这个想法是关于二次方程,得到算术和的公式是sum =(x + 1)* x / 2 所以对于这个问题,如果我们知道和,那么我们可以知道x =(-1 + sqrt(8 * n + 1))/ 2 向下取整。 代码如下: 1 public class Sol ...
分类:其他好文   时间:2016-12-22 00:32:08    阅读次数:206
【poj2096】Collecting Bugs
题目描述 Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets ...
分类:其他好文   时间:2016-12-19 21:59:35    阅读次数:201
【POJ2096】Collecting Bugs
【POJ2096】Collecting Bugs Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collec ...
分类:其他好文   时间:2016-12-17 17:16:35    阅读次数:186
*HDU 1398 母函数
Square Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11529 Accepted Submission(s): 7897 P ...
分类:其他好文   时间:2016-11-25 23:41:49    阅读次数:262
[Leetcode + Lintcode] 441. Arranging Coins
You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number ...
分类:其他好文   时间:2016-11-15 14:34:57    阅读次数:201
511条   上一页 1 ... 21 22 23 24 25 ... 52 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!