码迷,mamicode.com
首页 >  
搜索关键字:gtys gay friends    ( 1079个结果
nyoj 1189 yougth和他的朋友们 (DP)
题目:nyoj 1189 yougth和他的朋友们 这题目是14年北京赛区的原题,讲题的时候说有三种解法,我们是用dp做的当时,原题目链接:Happy Matt Friends 题意就不在说了。因为要求的是满足条件的种数。 我们定义状态dp【i】【j】:当我们把第 i 个数放进去之后得到 j 的种数是多少 那么我们可以得到状态转移方程:dp【i】【j^ a [ i ] 】 ...
分类:其他好文   时间:2015-03-31 20:12:26    阅读次数:122
BZOJ3916: [Baltic2014]friends
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3916题解:随便hash.刚开始看错题WA了N发.(我连双hash都写了!)代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6...
分类:其他好文   时间:2015-03-31 19:36:28    阅读次数:96
【字符串哈希】bzoj3916 [Baltic2014]friends
枚举断点,哈希判断。#includeusing namespace std;typedef unsigned long long ull;ull hs,hs1,hs2,seeds[1000010],hsgoal;int n;int del=-1;char s[2000002],s2[2000002]...
分类:其他好文   时间:2015-03-30 11:01:28    阅读次数:228
倒排索引原理
这里介绍一个基础的搜索引擎技术 假如有两段文字 1,books and friends should be few but good 2,A good book is a good friend 假如我们忽略掉大小写和复数,可以整理出一张单词表,显示哪个单词再哪段文字, 英文单词 文章编号 a 2 and 1 be 1 bo...
分类:其他好文   时间:2015-03-29 22:17:03    阅读次数:450
poj 1815 Friendship 字典序最小+最小割
题目链接:http://poj.org/problem?id=1815In modern society, each person has his own friends. Since all the people are very busy, they communicate with each ...
分类:其他好文   时间:2015-03-20 23:29:59    阅读次数:214
CF417D--- Cunning Gena(排序+状压dp)
A boy named Gena really wants to get to the “Russian Code Cup” finals, or at least get a t-shirt. But the offered problems are too complex, so he made an arrangement with his n friends that they will s...
分类:编程语言   时间:2015-03-16 14:36:02    阅读次数:141
hdu 5119 dP
E - Happy Matt Friends Time Limit:6000MS     Memory Limit:510000KB     64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5119 Description Matt has N friends. They are playing ...
分类:其他好文   时间:2015-03-16 13:00:17    阅读次数:142
1079条   上一页 1 ... 68 69 70 71 72 ... 108 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!