SkyWT

SkyWT

我们的征途是星辰大海

🚧 本站已迁移到 skywt.cn/blog。所有链接都已重定向。
✨ 如果想体验这个 Typecho 博客主题,可访问 beta.skywt.cn

Description

给出一个长度为 n 的数列,$2\leq n\leq 4\ast 10^5$,每个数字 $a_i$ 都在 $[1,20]$ 内。
可以对这个数列中相邻的两个数字交换位置,最终要使得相同的数字都在一起。
求最小交换次数。

Link

More...


Description

Link: LightOJ 1873 DNA Sequence

You are given a list of strings over the alphabet A (for adenine), C (cytosine), G (guanine), and T (thymine), and your task is to find the shortest string (which is typically not listed) that contains all given strings as substrings. If there are several such strings of shortest length, find the smallest in alphabetical/lexicographical order.

Time Limit: 4 second(s)
Memory Limit: 32 MB

More...