题目链接:http://hihocoder.com/contest/hihointerview12 期末完事了,终于有时间成套刷题了.这套题比较简单,难度上感觉和上一套差不多.除了最后一个题是看了讨论版说数据水才敢写的. A Word Construction 解法:正解应该是dfs+剪枝,我的思路是贪心,竟然过了.先把字符串按字典序排序,然后枚举每一个串作为起始,记下串内有什么字符,再从头到尾枚举所有字符串,看看每一个是否符合条件.就那么100个字符串,数据弱得很. #include <alg…
题目链接:https://hihocoder.com/problemset/problem/1334 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 Given N words from the top 100 common words in English (see below for reference), select as many words as possible as long as no two words share common letters.…