http://www.lydsy.com/JudgeOnline/problem.php?id=2763 这也算分层图最短路? dp[i][j]到城市i,还剩k次免费次数的最短路 2763: [JLOI2011]飞行路线 Description Alice和Bob现在要乘飞机旅行,他们选择了一家相对 ...
分类:
其他好文 时间:
2018-02-06 10:15:17
阅读次数:
110
Once Bob saw a string. It contained so many different letters, that the letters were marked by numbers, but at the same time each letter could be met ...
分类:
其他好文 时间:
2018-02-05 12:47:47
阅读次数:
477
这个马拉车算法Manacher‘s Algorithm是用来查找一个字符串的最长回文子串的线性方法,由一个叫Manacher的人在1975年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反读都一样的字符串,比如 "bob", "lev ...
分类:
编程语言 时间:
2018-02-03 12:39:03
阅读次数:
141
1 选择if elif else 注意后面均有:if age>18: print 'adult'elif age>6: print 'teenager'else: print 'kid'2 循环1) for x in xx:names = ['Michael', 'Bob', 'Tracy']for... ...
分类:
编程语言 时间:
2018-01-28 20:06:19
阅读次数:
115
Bob programmed a robot to navigate through a 2d maze. The maze has some obstacles. Empty cells are denoted by the character '.', where obstacles are d ...
分类:
其他好文 时间:
2018-01-27 11:23:22
阅读次数:
163
转载自:http://blog.csdn.net/madaidao/article/details/42616743 Bob was playing MC and was punished by Alice. Bob was trapped in a maze and there were some ...
分类:
其他好文 时间:
2018-01-26 11:03:54
阅读次数:
174
Description Alice and Bob have a set of N cards labelled with numbers 1 ... N (so that no two cards have the same label) and a shuffle machine. We ass ...
分类:
其他好文 时间:
2018-01-24 22:08:42
阅读次数:
187
题目描述 Alice和Bob做游戏,给出一张有向图表示运输网络,Alice先给Bob一种最大流方案,然后Bob在所有边上分配总和等于P的非负费用。Alice希望总费用尽量小,而Bob希望总费用尽量大。求两人都采取最优策略的情况下最大流及总费用。 输入 第一行三个整数N,M,P。N表示给定运输网络中节 ...
分类:
其他好文 时间:
2018-01-21 12:32:06
阅读次数:
156
题目描述 给你一个序列,支持4种操作:1.查询区间最大值;2.查询区间历史最大值;3.区间加;4.区间赋值。 输入 第一行一个正整数T,表示Bob需要监视CPU的总时间。 然后第二行给出T个数表示在你的监视程序执行之前,Bob干的事让CPU在这段时间内每个时刻的使用率达已经达到了多少。 第三行给出一 ...
分类:
其他好文 时间:
2018-01-19 11:26:38
阅读次数:
150
#!/usr/bin/python#*coding:utf-8*s1=set([4,4,5,5,6,6])print(s1)s2=set([2,3,4])print(s1&s2)print(s1|s2)#!/usr/bin/python#*coding:utf-8*d={‘tom‘:95,‘bob‘:75,‘jack‘:88}print(
分类:
其他好文 时间:
2018-01-16 18:17:39
阅读次数:
101