题意: 给出一棵 $n$ 个点的树,每条边上有一个字母($a\to v$,共 $22$ 个),对于每一个子树,询问其中最长的,满足:路径上的字符集可以重组成回文字符串的路径的长度。 数据范围:$1 ≤ n ≤ 5·10^5$ 分析: $dsu\;on\;tree$ 可用于解决不带修改的树上问题。 其 ...
分类:
其他好文 时间:
2020-03-30 21:42:43
阅读次数:
63
复制文章:https://blog.csdn.net/lxllzl/article/details/86484885 cygpath — Convert Unix and Windows format paths, or output system path information。 下面是命令模板 ...
分类:
其他好文 时间:
2020-03-27 11:10:27
阅读次数:
98
题目描述 The cows are being invaded! Their republic comprises N (1 <= N <= 50,000) towns that are connected by M (1 <= M <= 100,000) undirected paths betw ...
分类:
其他好文 时间:
2020-03-24 09:16:45
阅读次数:
78
不同路径II。题意跟版本一一样,唯一的不同点在于路径上会有障碍物。依然是返回到底有多少不同的路径能从左上角走到右下角。例子, Example 1: Input: [ [0,0,0], [0,1,0], [0,0,0] ] Output: 2 Explanation: There is one obs ...
分类:
其他好文 时间:
2020-03-23 12:40:29
阅读次数:
85
Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] ...
分类:
其他好文 时间:
2020-03-12 09:53:25
阅读次数:
54
暴露出一个微服务echo " apiVersion: extensions/v1beta1 kind: Ingress metadata: name: demo spec: rules: - http: paths: - path: /foo backend: serviceName: httpbi ...
分类:
其他好文 时间:
2020-03-07 11:26:02
阅读次数:
64
环境变量配置文件 MacOS Linux 如果shell的类型是zsh时,还会存在 和`~/.zshrc`。 其中 ,`/etc/paths /etc/bashrc /etc/profile /etc/paths /etc/bashrc`在bash shell执行时,会读取该文件。 MacOS默认用 ...
分类:
其他好文 时间:
2020-02-27 14:37:14
阅读次数:
73
You are given a square board of characters. You can move on the board starting at the bottom right square marked with the character 'S'. You need to r ...
分类:
其他好文 时间:
2020-02-22 13:33:15
阅读次数:
59
原题链接在这里:https://leetcode.com/problems/all-paths-from-source-to-target/ 题目: Given a directed, acyclic graph of N nodes. Find all possible paths from no ...
分类:
其他好文 时间:
2020-02-18 09:41:25
阅读次数:
63