摘要: A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves... 阅读全文
posted @ 2017-08-12 20:38 lbq的小屋 阅读(245) 评论(0) 推荐(0)
摘要: 题意:给你一个字符串,定义复杂度为字符的种类。问你最少删除几个字符,能使种类最多为两种?题目还行,注意一点,aabbbcccc这种情况,不要光判断种类数。代码如下,用了一点简单的hash。#includeusing namespace std;int main(){ ... 阅读全文
posted @ 2017-08-12 14:29 lbq的小屋 阅读(191) 评论(0) 推荐(0)
摘要: Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome",... 阅读全文
posted @ 2017-08-12 14:09 lbq的小屋 阅读(182) 评论(0) 推荐(0)