摘要: YJJ's Salesman YJJ is a salesman who has traveled through western country. YJJ is always on journey. Either is he at the destination, or on the way to 阅读全文
posted @ 2019-08-21 22:58 liulex 阅读(272) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/1204/problem/E 给定n个 1 m个 -1的全排 求所有排列的$f(a) = max(0,max_{1≤i≤l} \sum_{j=1}^{i} a_{j} )$之和 组合数,枚举 阅读全文
posted @ 2019-08-21 10:58 liulex 阅读(269) 评论(0) 推荐(0) 编辑
摘要: C. Anna, Svyatoslav and Maps 给定一个有向图,给定一条有向路径,求一条顶点最少的路径,使得给定的路径是它的最短路 folyd预处理出任意两点间的最短路,然后判断是否可以缩点 阅读全文
posted @ 2019-08-21 09:45 liulex 阅读(347) 评论(0) 推荐(0) 编辑
摘要: D1. Kirk and a Binary String (easy version) 01串找最长不降子序列 给定字符串s,要求生成一个等长字符串t,使得任意l到r位置的最长不降子序列长度一致 从后往前暴力枚举,枚举每个一替换成0后是否改变了l到r位置的最长不降子序列长度 01串的最长不降子序列, 阅读全文
posted @ 2019-08-21 08:58 liulex 阅读(454) 评论(0) 推荐(0) 编辑