码迷,mamicode.com
首页 >  
搜索关键字:round    ( 15566个结果
Codeforces Round #267 (Div. 2)
A.George and Accommodation题意:给定数组a,b,问b-a>=2有多少个思路:直接模拟。。B.Fedor and New Game题意:给定m+1个n位以内的二进制数,求前m个有多少个跟第m+1的二进制下不同位数不超过k的个数思路:直接模拟C.George and Job题意...
分类:其他好文   时间:2014-09-19 23:41:56    阅读次数:232
BestCoder Round #1 HDU4859 (海岸线)
http://acm.hdu.edu.cn/showproblem.php?pid=4859海岸线Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1...
分类:其他好文   时间:2014-09-19 22:28:56    阅读次数:286
BestCoder Round#8 1003
dp[i][j] 表示以i结尾的长度为j的递增子序列dp[i][j] = sum(dp[k][j]) ka[j]如果只是单纯的循环for(j=2; j a[j]) dp[i][j] += dp[k][j-1];时间复杂度是O(n * n * m) TLE但是k循环可以用树状数组来优化,...
分类:其他好文   时间:2014-09-19 19:07:35    阅读次数:210
Codeforces Round #267 (Div. 2) solution
Codeforces Round #267 (Div. 2) solution
分类:其他好文   时间:2014-09-19 19:00:45    阅读次数:192
Codeforces Round #267 (Div. 2)
A 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 using namespace std;11 #define N 10000012 #def....
分类:其他好文   时间:2014-09-19 15:31:45    阅读次数:214
Codeforces Round #267 Div.2 D Fedor and Essay -- 强连通 DFS
题意:给一篇文章,再给一些单词替换关系a b,表示单词a可被b替换,可多次替换,问最后把这篇文章替换后(或不替换)能达到的最小的'r'的个数是多少,如果'r'的个数相等,那么尽量是文章最短。解法:易知单词间有二元关系,我们将每个二元关系建有向边,然后得出一张图,图中可能有强连通分量(环等),所以找出...
分类:其他好文   时间:2014-09-19 13:45:35    阅读次数:151
Codeforces Round #267 (Div. 2) B. Fedor and New Game
After you had helped George and Alex to move in the dorm, they went to help their friend Fedor play a new computer game «Call of Soldiers 3». The game has (m?+?1) players and n types of soldiers in...
分类:其他好文   时间:2014-09-19 12:10:25    阅读次数:233
Codeforces Round #267 (Div. 2)
Codeforces Round #267 (Div. 2) A:签到题,直接for一遍 B:取异或就是不同的数,然后bitcount一下判断即可 C:dp,dp[i]表示到i的最大值,然后对取与不取当前位置进行转移即可,要先把前缀和预处理出来 D:先利用map,把字符串hash掉,然后建图,现场在做的时候是直接记忆化搜索,不过这样处理不了环的情况,果断fst了,后来换了下...
分类:其他好文   时间:2014-09-19 12:07:15    阅读次数:196
poj2942 Knights of the Round Table,无向图点双联通,二分图判定
点击打开链接 无向图点双联通,二分图判定 #include #include #include #include #include using namespace std; struct Edge{ int u, v; }; const int maxn = 1005; int pre[maxn], iscut[maxn], bccno[maxn],dfs_c...
分类:移动开发   时间:2014-09-19 12:02:35    阅读次数:206
Codeforces Round #267 Div2 C George and Job --DP
题意:把长度为n的序列分成k个m长的连续小序列,这些连续小序列的和最大是多少。解法:显然DP。定义: dp[i][j] 为前 i 个元素分成j个m端,且 i 是第j个的末尾的最大和。那么有: dp[i][j] = max(dp[i-1][j], dp[i-m][j-1]+sum[i]-sum[i-m...
分类:其他好文   时间:2014-09-19 11:23:15    阅读次数:171
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!