2020年6月19日

摘要: 地址 http://poj.org/problem?id=1258 Sample Input 4 0 4 9 21 4 0 8 17 9 8 0 16 21 17 16 0 Sample Output 28 解答 根据题目的输入格式 还是使用prim比较好 #include <iostream> # 阅读全文
posted @ 2020-06-19 12:14 itdef 阅读(206) 评论(0) 推荐(0)
摘要: 地址 http://poj.org/problem?id=1789 解析aaaaaaabaaaaaaabaaaaaaabaaaa aaaaaaa 和 baaaaaa 差别度为1abaaaaa 和 baaaaaa 差别度为2其余同理 那么以字符串为点差别度作为连点的边权就有下图(作画工具限制,双箭头看 阅读全文
posted @ 2020-06-19 11:57 itdef 阅读(408) 评论(0) 推荐(0)
摘要: 模板来自 www.acwing.com // 23132423543426561213.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <vector> using namespace std; int tes 阅读全文
posted @ 2020-06-19 11:25 itdef 阅读(387) 评论(0) 推荐(0)
摘要: 地址 https://leetcode-cn.com/problems/valid-palindrome/ 给定一个字符串,验证它是否是回文串,只考虑字母和数字字符,可以忽略字母的大小写。 说明:本题中,我们将空字符串定义为有效的回文串。 示例 1: 输入: "A man, a plan, a ca 阅读全文
posted @ 2020-06-19 09:17 itdef 阅读(144) 评论(0) 推荐(0)

导航