https://www.acwing.com/problem/content/93/ \(dp[S][i]\) 表示经过点的状态为 \(S\) , 当前在 \(i\) 点时的最短路 时间复杂度$O(n2*2n)$ #include<cstdio> #include<cstring> #include ...
间隙 大致题意 给定一棵$n$个点的带权树,求最长的异或路径。 异或路径指的是指两个结点之间唯一路径上的所有边权的异或 $1≤n≤100000$ 分析 01trie模板 设$f_i$表示从根节点到$i$节点的异或路径,有显然的递推公式:\(f_v = f_{fa}⊕edge.w\) 根据异或的性质, ...
分类:
其他好文 时间:
2020-11-01 10:21:19
阅读次数:
16
A. 挑战 时间限制: 1.0 秒 空间限制: 512 MB 原题地址 题目描述 企鹅豆豆在玩一款叫做 Slay the spire 的游戏。为了简化游戏,我们将游戏规则魔改如下: 主角一开始血量为 HH,游戏里一共有 NN 个房间,每个房间里有一些怪物,第 ii 个房间需要受到 DiDi 的伤害才 ...
分类:
其他好文 时间:
2020-11-01 09:55:56
阅读次数:
18
https://codeforces.com/problemset/problem/1436/D 这题就是让村名尽可能集中在叶子上,但是可能叶子上本来就有很多村民,就是这样。 假设 1. mx[x]为在x点可以抓到的最多的人 2. chal[x]为 在x点还差chal[x]人就可以让x下面所有叶子都 ...
分类:
其他好文 时间:
2020-10-31 01:31:44
阅读次数:
13
leetcode_easy_array problem 1486. XOR Operation in an Array solution #1: code: 参考 1. leetcode_1486. XOR Operation in an Array; 完 ...
分类:
其他好文 时间:
2020-10-30 12:53:24
阅读次数:
17
题目 题目链接:https://codeforces.com/problemset/problem/468/B 给出 \(n\) 个各不相同的数字,将它们分别放入 \(A\) 和 \(B\) 两个集合中,使它们满足: 若数字 \(x\) 在集合 \(A\) 中,那么数字 \(a-x\) 也在集合 \ ...
分类:
其他好文 时间:
2020-10-30 12:08:18
阅读次数:
14
use 3D version to calculate how much water the model can contain this problem need use dfs,from the edge part which mustn't be answer,for the edge can ...
分类:
移动开发 时间:
2020-10-29 10:06:29
阅读次数:
25
我们下载python的库一般会使用pip工具。但在下载的过程中经常会timeout,这是因为资源在国外,我们国内某些资源下载速度特别慢,我比较常用且有效的方法是: 使用国内镜像:使用方法如下(超级简单) # 直接在后面添加 -i "https://pypi.doubanio.com/simple/" ...
分类:
其他好文 时间:
2020-10-29 09:43:12
阅读次数:
17
Dapper - a simple object mapper for .Net Dapper是.NET下一个micro ORM,它和Entity Framework或Nhibnate不同,属于轻量级的,并且是半自动的,也就是说实体类都要自己写。 下载地址:https://github.com/St ...
分类:
移动开发 时间:
2020-10-29 09:39:30
阅读次数:
36
一.题源 https://www.lintcode.com/problem/permutations-ii/description https://leetcode-cn.com/problems/permutations-ii/ 二.代码分析 1 public class Solution { 2 ...
分类:
其他好文 时间:
2020-10-27 11:42:13
阅读次数:
24