今天在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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. Swing用户界面开发工具包开发记录

    Swing是一个用于开发Java应用程序用户界面的开发工具包. 以抽象窗口工具包(AWT)为基础使跨平台应用程序可以使用任何可插拔的外观风格. Swing开发人员只用很少的代码就可以利用Swing丰富 ...

  2. Android 开源动画框架:NineOldAndroids

    介绍 Android 平台提供两种动画系统:Property Animation(Android 3.0引入)和View Animation.这两种动画都可供选择,但是Property Animati ...

  3. JS 在火狐浏览器下关闭弹窗

    1.首先,要确定火狐设置是否允许通过JS代码window.close()方法关闭标签. 确定方式如下:      在Firefox地址栏里输入 about:config    在配置列表中找到dom. ...

  4. asp.net mvc中配置路由默认值(Area中)

    public class RouteConfig { ] { "Best.Site.Areas.BestPalace" }; public static void Register ...

  5. Java设计模式之五大创建型模式(附实例和详解)

    一.概况 总体来说设计模式分为三大类: (1)创建型模式,共五种:工厂方法模式.抽象工厂模式.单例模式.建造者模式.原型模式. (2)结构型模式,共七种:适配器模式.装饰器模式.代理模式.外观模式.桥 ...

  6. yii2 使用阿里大鱼短信

    1.首先申请阿里账号 2.开通短信服务 3.短信签名 4.添加模板 以上4步是前期工作 -------------------------------------------------------- ...

  7. mysql Communication link failure, message from server: "Can't get hostname for your address"

    在连接mysql jdbc时候,抛出了 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communicat ...

  8. Eclipse安装图形JFrame,Jswing编程界面

    打开eclipse,选择help--->install new software 来源http://www.cnblogs.com/xiaobo-Linux/p/7954274.html 打开网 ...

  9. MyEclipse远程调试Tomcat

    程序就是这么一个神奇的东西,有时你的一个项目,在本机上运行得还是好好的,可当你把这货放到了服务器上,同样的条件就是结果不一样.于是就灰常想看一下程序在远程运行时候的状态,希望让程序在远程运行,还可以在 ...

  10. Android立刻终止一个线程

    /** * Created by JuTao on 2017/2/4. * 如何中止一个线程 */ public class ThreadDone { public static void main( ...