VK Cup 2016 - Qualification Round 2 B. Making Genome in Berland
今天在codeforces上面做到一道题:http://codeforces.com/contest/638/problem/B
题目大意是:给定n个字符串,找到最短的字符串S使得n个字符串都是这个字符串S的子串。
题目里有一个限制条件是每个字母都最多出现一次,所以可以用下面的方法来解决:
http://codeforces.com/contest/638/submission/16900955
然后我想到如果问题没有“每个字母最多只出现一次”这个限制的话应该怎么解决。
暂时还在想……
VK Cup 2016 - Qualification Round 2 B. Making Genome in Berland的更多相关文章
- VK Cup 2016 - Qualification Round 2 B. Making Genome in Berland 水题
B. Making Genome in Berland 题目连接: http://www.codeforces.com/contest/638/problem/B Description Berlan ...
- VK Cup 2016 - Qualification Round 2 D. Three-dimensional Turtle Super Computer 暴力
D. Three-dimensional Turtle Super Computer 题目连接: http://www.codeforces.com/contest/638/problem/D Des ...
- VK Cup 2016 - Qualification Round 2 C. Road Improvement dfs
C. Road Improvement 题目连接: http://www.codeforces.com/contest/638/problem/C Description In Berland the ...
- VK Cup 2016 - Qualification Round 2 A. Home Numbers 水题
A. Home Numbers 题目连接: http://www.codeforces.com/contest/638/problem/A Description The main street of ...
- VK Cup 2016 - Qualification Round 1 (Russian-Speaking Only, for VK Cup teams) D. Running with Obstacles 贪心
D. Running with Obstacles 题目连接: http://www.codeforces.com/contest/637/problem/D Description A sports ...
- VK Cup 2016 - Qualification Round 1 (Russian-Speaking Only, for VK Cup teams) C. Promocodes with Mistakes 水题
C. Promocodes with Mistakes 题目连接: http://www.codeforces.com/contest/637/problem/C Description During ...
- VK Cup 2016 - Qualification Round 1 (Russian-Speaking Only, for VK Cup teams) B. Chat Order 水题
B. Chat Order 题目连接: http://www.codeforces.com/contest/637/problem/B Description Polycarp is a big lo ...
- VK Cup 2016 - Qualification Round 1 (Russian-Speaking Only, for VK Cup teams) A. Voting for Photos 水题
A. Voting for Photos 题目连接: http://www.codeforces.com/contest/637/problem/A Description After celebra ...
- VK Cup 2016 - Qualification Round 1——A. Voting for Photos(queue+map)
A. Voting for Photos time limit per test 1 second memory limit per test 256 megabytes input standard ...
随机推荐
- (笔记)Mysql命令show databases:显示所有数据库
show databases命令用于显示所有数据库. show databases命令格式:show databases; (注意:最后有个s) 例如:mysql> show databases ...
- imx6 lvds0 lvds1 display
最近调试imx6的屏幕显示,笔记记录于此. 官方文档关于uboot参数的介绍: sin和dul参数已经测试过,sep和spl还没有验证成功. 1 单屏显示 说明:输入命令并按确定键, 观察系统启动过程 ...
- 用OpenGL绘制平滑着色的三角形与相交区域的混合着色
一.三角形的绘制 在OpenGL中,面是由多边形构成的.三角形可能是最简单的多边形,它有三条边.可以使用GL_TRIANGLES模式通过把三个顶点连接到一起而绘出三角形. 使用GL_TRIANGLE_ ...
- aspose.word 使用简单方法
aspose.word使用简单方法 概念介绍 使用aspose生成word报表步骤: 加载word模板 提供数据源 填充 加载模板 提供了4种重载方法 1 2 3 4 5 public Documen ...
- html常用对照表
常用对照表:http://tool.oschina.net/commons
- Linux系统date时间设定
修改linux系统的时间EDT和EST为CST EDT:指美国东部夏令时间 EST:英国时间 CST:北京时间 那么现在只要改成北京时间的时区CST就可以了,修改如下: [root@localhost ...
- XAMPP permissions on Mac OS X
$ cd /Applications $ XAMPP/ 注意: 改变的是XAMPP目录,而不是htdocs ref: http://stackoverflow.com/questions/904697 ...
- iOS 模拟器的“调试-位置”总是变成无的问题
选择项目的“Edit Scheme...” 并且选择“Options”选项卡,更改你喜欢的默认地理位置 你也可以编辑一个gpx文件永久保存坐标,或者在线生成(传送门). 转自:iOS Simulato ...
- hive 配置元数据以mysql 存储
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="confi ...
- 软件设计模式之工厂模式(JAVA)
什么是工厂模式? 工厂模式是我们最常用的实例化对象模式了,是用工厂方法代替new操作的一种模式.著名的Jive论坛 ,就大量使用了工厂模式,工厂模式在Java程序系统可以说是随处可见.因为工厂模式就相 ...