今天在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. Linux 错误记录

    1.libmysqlclient.so.18: cannot open shared object file: No such file or directory 解决办法: [root@linux- ...

  2. e804. 显示JProgressBar的完成百分率

    The progress bar offers the ability to display the actual value of the bar as a percentage. This exa ...

  3. c# mvc 获取 HtmlHelper 表达式值和时间格式化 去边框

    /// <summary> /// 返回没有边框的只读的TextBox标签 /// </summary> /// <typeparam name="TModel ...

  4. MyBatis之one2one与one2many

    <!--顾客信息表,其中一个顾客对应一个国家,一个顾客对应多个订单--> <resultMap id="customerResultMap" type=" ...

  5. CSS3小清新下拉菜单 简易大方

    之前有分享过几款CSS3菜单和jQuery菜单,像这款HTML5/CSS3自定义下拉框 3D卡片折叠动画3D效果非常华丽,这次要分享的这款相对比较简单,很适合用在用户的操作面板上.先来看看效果图: 怎 ...

  6. php 一维数组去重

    $input = array("a" => "green", "red", "b" => "gre ...

  7. 【转】Spring Boot干货系列:(三)启动原理解析

    前言 前面几章我们见识了SpringBoot为我们做的自动配置,确实方便快捷,但是对于新手来说,如果不大懂SpringBoot内部启动原理,以后难免会吃亏.所以这次博主就跟你们一起一步步揭开Sprin ...

  8. C语言中的数组问题

    数组默认最后一位是 结束符 占一位, 假如是7个字节大小的数组 实际输入为6个字节,最后一个字节为'\0' 这样写 char password_set[7]={"123456"}; ...

  9. git忽略已添加版本控制的文件

    今天使用git做maven项目的版本控制,刚开始搭建项目后,把所有文件全部提交了. 已经提交的文件,gitignore中后配置也无效了. 所以使用以下命令来操作,操作后要提交哦. 1.执行 git r ...

  10. UNIX环境编程学习笔记(14)——文件I/O之临时文件

    lienhua342014-10-01 ISO C 标准 I/O 库提供了个两个函数 tmpnam 和 tmpfile 以帮助创建临时文件, #include <stdio.h> char ...