特征多项式 约定: $I_n$是$n$阶单位矩阵,即主对角线是$1$的$n$阶矩阵 一个矩阵$A$的$|A|$是$A$的行列式 定义 对于一个$n$阶的矩阵$A$,它的特征多项式 $p(\lambda)=|\lambda I_n A|$ $\lambda$定义域不止是$\R$,还可以是矩阵 $p(\ ...
分类:
其他好文 时间:
2020-05-24 11:31:30
阅读次数:
42
题目:Candies 题目链接:https://vjudge.net/problem/CodeForces-1343A 思路: 其实就是把给出的式子等比数列求和整理一下,便可求出x。 解题代码: // . . // | Try First One| // ' ' // | . . // | | | ...
分类:
其他好文 时间:
2020-05-24 11:25:18
阅读次数:
49
题目链接:https://vjudge.net/problem/POJ-3045 题意:n个奶牛堆成一堆,每个都有重量和力气,奶牛i的危险值=i上方奶牛的总重量减去i的力气,求最大危险值的最小值。n<=50000 看到进阶指南上写了个邻项交换,大概就知道怎么想了。考虑两头奶牛p和q(其实就是比较函数 ...
分类:
其他好文 时间:
2020-05-24 09:24:30
阅读次数:
54
https://www.luogu.com.cn/problem/P2563 完全背包。 预处理出来 $200$ 以内的素数。 以每个素数为物品进行背包。 时间复杂度:$O(200\times \sqrt{200}+200\times \frac{200}{\ln 200}+T)\approx O( ...
分类:
其他好文 时间:
2020-05-23 18:23:07
阅读次数:
72
维护区间加法 https://www.luogu.com.cn/problem/P3374 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxN=500000; struct Node{ i ...
分类:
其他好文 时间:
2020-05-23 18:04:04
阅读次数:
40
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2724 https://onlinejudge.org/index.php?option=c ...
分类:
其他好文 时间:
2020-05-23 16:29:58
阅读次数:
52
题意:给两段航班的起始时间a ,b 这两段航班的飞行时间分别为ta,tb 给k次删除航班的次数, 问如何让飞从A飞到B 再从B起飞到目的地的时间最久 题目链接:https://codeforc.es/contest/1148/problem/B 刚开始想的是贪心选怎么删除航班,但是贪心的话是受k影响 ...
分类:
其他好文 时间:
2020-05-23 12:53:50
阅读次数:
47
A Candies + 题目链接: "https://vjudge.net/contest/375138?tdsourcetag=s_pctim_aiomsg problem/A" 涉及知识点: + 位运算/思维 solution: + $通过读题我们发现这个题是让你算出x$ + $x + 2x + ...
分类:
其他好文 时间:
2020-05-23 10:06:33
阅读次数:
49
题目链接:http://class.51nod.com/Challenge/Problem.html#problemId=1163 一、题目描述 有N个任务,每个任务有一个最晚结束时间以及一个对应的奖励。 在结束时间之前完成该任务,就可以获得对应的奖励。完成每一个任务所需的时间都是1个单位时间。 有 ...
分类:
其他好文 时间:
2020-05-23 09:20:17
阅读次数:
41
方法一:递归 public TreeNode buildTree(int[] preorder, int[] inorder) { return buildTreeHelper(preorder, 0, preorder.length, inorder, 0, inorder.length); } ...
分类:
其他好文 时间:
2020-05-23 00:43:34
阅读次数:
59