码迷,mamicode.com
首页 >  
搜索关键字:up    ( 7825个结果
poj 3122
Pie Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10309   Accepted: 3651   Special Judge Description My birthday is coming up and traditionally I'm servi...
分类:其他好文   时间:2014-08-09 15:53:58    阅读次数:214
搜索:A - Tempter of the Bone题解
问题描述:The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie co...
分类:其他好文   时间:2014-08-09 15:49:08    阅读次数:292
JAVA浮点数保留位数
方式一:      BigDecimal.setScale用于格式化小数点     setScale(1)表示保留以为小数,默认用四舍五入方式    setScale(1,BigDecimal.ROUND_DOWN)直接删除多余的小数位,如2.35会变成2.3    setScale(1,BigDecimal.ROUND_UP)进位处理,2.35变成2.4    setSca...
分类:编程语言   时间:2014-08-09 11:44:27    阅读次数:250
CF#260 C.Boredom
Alex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game and decided to play it. Given a sequence a consisting of n integ...
分类:其他好文   时间:2014-08-09 11:42:48    阅读次数:311
HDU1698_Just a Hook(线段树/成段更新)
解题报告 题意: 原本区间1到n都是1,区间成段改变成一个值,求最后区间1到n的和。 思路: 线段树成段更新,区间去和。 #include #include #include using namespace std; int sum[500000],lz[500000]; void push_up(int root,int l,int r) { sum[root]=sum...
分类:其他好文   时间:2014-08-09 11:39:47    阅读次数:343
LeetCode——Search in Rotated Sorted Array II
Follow up for "Search in Rotated Sorted Array": What if duplicates are allowed? Would this affect the run-time complexity? How and why? Write a function to determine if a given target is in the...
分类:其他好文   时间:2014-08-09 11:38:57    阅读次数:147
POJ3468_A Simple Problem with Integers(线段树/成段更新)
解题报告 题意: 略 思路: 线段树成段更新,区间求和。 #include #include #include #define LL long long #define int_now int l,int r,int root using namespace std; LL sum[500000],lazy[500000]; void push_up(int root,int l,...
分类:其他好文   时间:2014-08-09 00:18:46    阅读次数:470
POJ 3280 Cheapest Palindrome DP题解
看到Palindrome的题目,首先想到的应该是中心问题,然后从中心出发,思考如何解决。 DP问题一般是从更加小的问题转化到更加大的问题,然后是从地往上 bottom up地计算答案的。 能得出状态转移方程就好办了,本题的状态转移方程是: if (cowID[i] == cow{j]) tbl[id][i] = tbl[id][i+1];//相等的时候无需改动 else tbl[id][i...
分类:其他好文   时间:2014-08-09 00:14:16    阅读次数:344
[leetcode]Unique Paths II
Unique Paths IIFollow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle an...
分类:其他好文   时间:2014-08-08 23:55:17    阅读次数:263
[leetcode]Binary Tree Level Order Traversal II
Binary Tree Level Order Traversal IIGiven a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level...
分类:其他好文   时间:2014-08-08 23:53:16    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!