Information Entropy Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Information Theory is one of the most popular courses in Marjar Univers ...
分类:
其他好文 时间:
2017-07-13 20:25:12
阅读次数:
235
大概学了一下2-SAT,写了一道模板和一道USACO 输出一个方案的话,tarjan缩点后倒着拓扑,染色输出。 求任何解下选哪个就得枚举每个点dfs来判断选哪个。 HIT 1917(2-sat模板) #include<iostream> #include<cstdlib> #include<cstr ...
分类:
其他好文 时间:
2017-07-13 19:03:38
阅读次数:
170
[BZOJ3817]Sum 试题描述 给定正整数N,R。求 给定正整数N,R。求 给定正整数N,R。求 输入 第一行一个数 T,表示有 T 组测试数据。 接下来 T 行,每行两个正整数 n,r。 第一行一个数 T,表示有 T 组测试数据。 接下来 T 行,每行两个正整数 n,r。 第一行一个数 T, ...
分类:
其他好文 时间:
2017-07-13 01:05:55
阅读次数:
187
Description Jaap, Jan, and Thijs are on a trip to the desert after having attended the ACM ICPC World Finals 2015 in Morocco. The trip included a came ...
分类:
其他好文 时间:
2017-07-12 23:25:30
阅读次数:
212
Description 在一个2维平面上有两条传送带,每一条传送带可以看成是一条线段。两条传送带分别为线段AB和线段CD。lxhgww在AB上的移动速度为P,在CD上的移动速度为Q,在平面上的移动速度R。现在lxhgww想从A点走到D点,他想知道最少需要走多长时间 Input 输入数据第一行是4个整 ...
分类:
其他好文 时间:
2017-07-12 21:15:27
阅读次数:
196
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4275 【题解】 考虑预处理出来a[1..i]和b[1..j]的LCS,记为$f_{i,j}$;a[i..n]和b[j..m]的LCS,记为$g_{i,j}$。 同时预处理出来如果从a[i]开始 ...
分类:
其他好文 时间:
2017-07-11 21:26:38
阅读次数:
271
求补图连通块,用链表优化,势能O(n+m) ...
分类:
其他好文 时间:
2017-07-10 20:17:24
阅读次数:
127
Flower Time Limit: 8 Seconds Memory Limit: 65536 KB Special Judge Gao and his girlfriend's relationship becomes better and better after they flying ba ...
分类:
其他好文 时间:
2017-07-10 13:27:57
阅读次数:
225
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3791 给出两个长度为n的01串,要求进行k次变化,将串1变为串2,每次变化要改变m个字符。 dp[i][j]的含义是在i次变化后,还有j个字符变的情况数,最终结果是dp[k] ...
分类:
其他好文 时间:
2017-07-10 12:07:42
阅读次数:
189
Trim the Nails Time Limit: 2 Seconds Memory Limit: 65536 KB Robert is clipping his fingernails. But the nail clipper is old and the edge of the nail c ...
分类:
其他好文 时间:
2017-07-09 20:49:24
阅读次数:
216