七、(10分) 设 $A$ 为 $n$ 阶复方阵, 证明: 存在复数 $c_1,\cdots,c_{n-1}$, 使得 $$A-c_1e^A-c_2e^{2A}-\cdots-c_{n-1}e^{(n-1)A}$$ 是可对角化矩阵. 本题是18级高等代数II期中考试的第七大题, 虽然结论涉及矩阵的多 ...
分类:
其他好文 时间:
2020-02-05 18:45:06
阅读次数:
109
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s ...
分类:
其他好文 时间:
2020-02-05 17:58:35
阅读次数:
87
其实用不上树链剖分也行,就普通的lca题目 但是经过这道题可以看出树链剖分也可以解决LCA的题目, 注意ptn是dfn的反查,这样能够快速得到dfs序中相应的节点 ...
分类:
其他好文 时间:
2020-02-05 13:33:50
阅读次数:
51
编写一个程序,找出第 n 个丑数。 丑数就是只包含质因数 2, 3, 5 的正整数。 说明: 1 是丑数。 n 不超过1690。 来源:力扣(LeetCode) 链接:https://leetcode cn.com/problems/ugly number ii 1.暴力(brute force) ...
分类:
其他好文 时间:
2020-02-05 11:50:20
阅读次数:
55
Count on a tree II(luogu) Description 题目描述 给定一个n个节点的树,每个节点表示一个整数,问u到v的路径上有多少个不同的整数。 输入格式 第一行有两个整数n和m(n=40000,m=100000)。 第二行有n个整数。第i个整数表示第i个节点表示的整数。 在接 ...
分类:
其他好文 时间:
2020-02-05 11:45:07
阅读次数:
58
Given a list of unique words, find all pairs of distinct indices (i, j) in the given list, so that the concatenation of the two words, i.e. words[i] + ...
分类:
其他好文 时间:
2020-02-04 10:47:17
阅读次数:
71
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we ...
分类:
其他好文 时间:
2020-02-04 10:24:21
阅读次数:
67
题:https://ac.nowcoder.com/acm/contest/4010/K 题意:用一些模式串凑成一个目标串,每个模式串有消耗,问组合的最小消耗,或不能组成输出-1; 分析:典型的AC自动机处理后在跳fail的过程中进行操作,这里操作就是dp计算最小。用dp[i]表示长串前ii位的最小 ...
分类:
其他好文 时间:
2020-02-04 00:46:26
阅读次数:
65
90. Subsets II Given a collection of integers that might contain duplicates, nums , return all possible subsets (the power set). Note : The solution s ...
分类:
其他好文 时间:
2020-02-04 00:42:05
阅读次数:
78
1 """ 2 You have N gardens, labelled 1 to N. In each garden, you want to plant one of 4 types of flowers. 3 paths[i] = [x, y] describes the existence ...
分类:
其他好文 时间:
2020-02-03 22:04:46
阅读次数:
55