码迷,mamicode.com
首页 >  
搜索关键字:lossy counting    ( 1053个结果
HDU 5952 Counting Cliques(dfs)
Counting Cliques Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1855 Accepted Submission(s): 735 ...
分类:其他好文   时间:2017-07-21 17:08:41    阅读次数:222
gym-101343K-Counting Time
1 /* 2 用1-9填满方格,每个数一次,相邻的数的位置也必须相邻 3 已经填好一些数,求填剩下数的方案数。 4 直接把剩下的数全排列,然后判断即可 5 */ 6 #include 7 using namespace std; 8 bool v[10]; 9 bool vis[5][5]; 10 ... ...
分类:其他好文   时间:2017-07-21 00:04:28    阅读次数:246
[LeetCode] Reverse String II
Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar ...
分类:其他好文   时间:2017-07-18 22:08:44    阅读次数:167
hdu 2952 Counting Sheep
#include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #in ...
分类:其他好文   时间:2017-07-18 13:28:34    阅读次数:132
POJ 1610 Count the Colors
Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your task is counting the segme ...
分类:其他好文   时间:2017-07-15 11:28:03    阅读次数:216
[CF373C]计算袋鼠是愉快的(Counting Kangaroos is Fun)-贪心
Problem 计算袋鼠是愉快的 题目大意 有n只袋鼠,如果一个袋鼠体积是另一个袋鼠的两倍或以上,则小袋鼠能被大袋鼠装进袋子里,装进去后就看不到袋子里的袋鼠了,问这群袋鼠如何行动才能使得它们看着数量最少,请输出该数量。(注意,如果一个小袋鼠被装在袋子里,则小袋鼠袋子里不能再嵌套袋鼠了) 也就是给出一 ...
分类:其他好文   时间:2017-07-13 10:27:59    阅读次数:127
POJ 2282 Counting Problem
http://poj.org/problem?id=2282 题意:问[a,b]内 数字[0~9]分别出现多少次? a,b<=1e9. 数位DP dp[len][sta]:当前长度为len 数字y的初始状态为sta时,数字y共出现了多少次? 枚举当前位 如果为i!=num ,len-1位y的初始状态 ...
分类:其他好文   时间:2017-07-09 19:50:03    阅读次数:134
搜索专题(不定期更新)
1、POJ 2386 Lake Counting 题意:给出一块区域,询问有多少个湖泊? 思路:DFS,对于‘W’,深搜一次,并标记已访问。之后每次对未访问的‘W’做一次深搜。 1 #include<iostream> 2 #include<memory.h> 3 using namespace s ...
分类:其他好文   时间:2017-07-09 12:33:52    阅读次数:131
【树状数组+dp+离散化】Counting Sequences
https://www.bnuoj.com/v3/contest_show.php?cid=9149#problem/G 【题意】 给定一个数组a,问这个数组有多少个子序列,满足子序列中任意两个相邻数的差(绝对值)都不大于d. 【思路】 首先,朴素的dp思想: dp[i]为以a[i]结尾的子问题的答 ...
分类:编程语言   时间:2017-07-07 00:01:25    阅读次数:257
算法导论第三版思考题8-2.e
1 COUNTING-SORT2(A,k) 2 let C[0..k] be a new array 3 for i = 0 to k 4 C[i]=0 5 for i = 1 to A.length 6 C[A[i]] = C[A[i]]+1 7 for i = 1 to k 8 ... ...
分类:编程语言   时间:2017-07-06 13:15:07    阅读次数:183
1053条   上一页 1 ... 35 36 37 38 39 ... 106 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!