两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
2020-2021:teams:mian:weekly_report:2020_summer_week_6_report [2020/08/21 15:20] grapelemonade [Pantw] |
2020-2021:teams:mian:weekly_report:2020_summer_week_6_report [2020/08/21 16:10] (当前版本) withinlover |
||
---|---|---|---|
行 59: | 行 59: | ||
def getTicket(self, races, index): | def getTicket(self, races, index): | ||
- | # if not (type(races) is tuple and type(index) is int): | ||
- | # return 'Error' | ||
total = self.prefixSum(races, '') | total = self.prefixSum(races, '') | ||
if index >= total: | if index >= total: | ||
行 84: | 行 82: | ||
index -= tot | index -= tot | ||
return ans | return ans | ||
- | |||
- | # print((() + () + tuple([233]) + () + tuple([666]))[1]) | ||
- | # print(type([2333, 4444, 2333])) | ||
- | print(HorseTicket().getTicket(("B", "A"), 4)) | ||
- | print(HorseTicket().getTicket(("B", "A"), 6)) | ||
- | print(HorseTicket().getTicket(("ace", "bhg", "fdz"), 47)) | ||
- | print(HorseTicket().getTicket(("Top", "C0Der", "1s", "fun"), 673)) | ||
- | print(HorseTicket().getTicket(("q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", | ||
- | "l", "z", "x", "c", "v", "b", "n", "m"), 1000000000000000)) | ||
</code></hidden> | </code></hidden> | ||
===== Withinlover ===== | ===== Withinlover ===== | ||
+ | |||
+ | [[http://acm.hdu.edu.cn/showproblem.php?pid=6598|HDU6598]] | ||
+ | |||
+ | * 分类:网络流 | ||
+ | * 题意:给定n个点m组关系(u, v, a, b, c),对点黑白染色,若u, v均为黑色答案加a,均为白色答案加c,一黑一白答案加b。求最大值。 | ||
+ | * 解法:玄学建图,把一条边拆成6条做。转换成最小割问题 | ||
+ | * 评论:建图思路很妙,知道了怎么建图就是板子题了。 | ||
===== Gary ===== | ===== Gary ===== | ||
行 122: | 行 118: | ||
==== 专题 ==== | ==== 专题 ==== | ||
+ | 无 | ||
==== 比赛 ==== | ==== 比赛 ==== | ||
+ | ABC175,TCO20R3B | ||
==== 题目 ==== | ==== 题目 ==== | ||
+ | |||
+ | CF1379D CF1379E CF1380D CF1380E | ||
+ | |||
+ | ABC175 A-E | ||
===== Gary ===== | ===== Gary ===== |