摘要:
题意:很Uva项链题目类似。 区别: 1、字符串很多,用map hash超时,用Trie查找。 2、DFS判断连通,和并查集判连通,被我写错的地方时,查森林的时候,还是要Find_Set。 1 #include <iostream> 2 #include <cstring> 3 #include < 阅读全文
摘要:
A. Vladik and Courtesy At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Val 阅读全文