码迷,mamicode.com
首页 >  
搜索关键字:poj 3252 round numbe    ( 35985个结果
poj 1167 DFS
1 /* 2 题意:给出0~59的一排数字表示某一时刻出现了1辆bus,其中数字重复出现表示多辆bus同时出现,这些bus是 3 由多个bus线路组成的,每条线路都有一个时间间隔,而且同一线路的bus在0~59肯定会出现两次或以上,如果 4 有两条线路的间隔相同且到达时刻相同也算作两条不同...
分类:其他好文   时间:2014-05-10 02:14:42    阅读次数:355
POJ 1149 网络流 合并建图
这个题目我敲了一个简单的EK,这不是难点难点在于建图,按题目的要求 每个猪圈和顾客都建点的话,那也太多了。。。我看了Edelweiss里面的缩点方法才建好的图,哎,惭愧啊实际那些猪圈根本不需要单独建点,猪圈无非就是向顾客输送流量 以及向同时开着的猪圈输送流量,这一步可以直接缩为,当某个猪圈被第一次打...
分类:其他好文   时间:2014-05-05 09:52:56    阅读次数:346
poj 1430 Binary Stirling Numbers
Binary Stirling NumbersTime Limit:1000MSMemory Limit:10000KTotal Submissions:1761Accepted:671DescriptionThe Stirling number of the second kind S(n, m)...
分类:其他好文   时间:2014-05-04 19:34:32    阅读次数:434
poj 1419 Graph Coloring_最大独立集
最大独立集...
分类:其他好文   时间:2014-05-04 18:44:00    阅读次数:273
Codeforces Round #244 (Div. 2)——Match & Catch
给定两个字符串,长度均不超过5000。求两个串的最短相同字串长度,且这个字串在两个串中均只出现一次...
分类:其他好文   时间:2014-05-04 18:41:03    阅读次数:322
Codeforces Round #243 (Div. 1)——Sereja and Two Sequences
给两个长度分别为n和m的序列,现在有两种操作:1.分别选择两个序列的一个非空前缀,切两个前缀的最后一位相同,删除之,得到1分(只累计),消耗e;2.直接删除两个序列,消耗值定于两个序列之前删除的元素个数之和,并且使得得到的分有效(之前没有有效分)...
分类:其他好文   时间:2014-05-04 18:10:51    阅读次数:287
Codeforces Round #244 (Div. 2) B. Prison Transfer
题目是选出c个连续的囚犯,而且囚犯的级别不能大于t#include using namespace std;int main(){ int n,t,c; cin >> n >> t >> c; int a,cnt = 0, res =0;; for(int i = 0 ; i...
分类:其他好文   时间:2014-05-04 12:14:55    阅读次数:340
Codeforces Round #244 (Div. 2) A. Police Recruits
题目的意思就是找出未能及时处理的犯罪数,#include using namespace std;int main(){ int n; cin >> n; int a,recruit = 0, crimes = 0;; for(int i = 0 ; i > a; ...
分类:其他好文   时间:2014-05-04 11:54:32    阅读次数:274
Round #244 (Div. 2) A. Police Recruits
A. Police RecruitsThe police department of your city has just started its journey. Initially, they don’t have any manpower. So, they started hiring ne...
分类:其他好文   时间:2014-05-04 11:22:36    阅读次数:259
poj 1270 Following Orders(拓扑排序+dfs)
大致题意:每个样例包含两行,第一行输入n个字符,可能是无序的。第二行输入成对的a b,代表a要在b前面。输出所有的符合这样的序列。 思路:很明显的拓扑排序。要输出所有的序列,那么就从入度为0的点进行dfs,每次选择一个入度为0的点,加入输出序列并把与它相邻的点的入度减一。dfs结束后要把状态再改回来。 #include #include #include #include #i...
分类:Windows程序   时间:2014-05-04 09:13:47    阅读次数:394
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!