链接 题意: 有字符串$A$,\(B\),每次在$A$中选取一部分相同的字母,改成另一个比该字母大的字母,问将A改成B的最少步骤 分析: 从样例看 3 aab bcc (aab-bbb-bcc) 本例中,第2个‘a'先转化成’b',再连同’b'转化为‘c'。不难看出减少操作次数可以通过先转化为一个中 ...
分类:
其他好文 时间:
2020-07-25 23:50:05
阅读次数:
87
题目链接:https://www.acwing.com/problem/content/258/ 题目给出长度为n的序列,操作有两种,求[p,n]段的异或和再与x的异或,或者增加一个数x,使用可持久化Trie和异或前缀和可以解决,但是需要在[l-1,r-1]区间内,右区间自然满足,左区间的话需要加上 ...
分类:
编程语言 时间:
2020-07-25 23:31:49
阅读次数:
75
本篇我们将学习面向对象中的接口和多态,接口类似我们之前学习继承时的父类或抽象类,接口与众不同的时,接口中跟多的定义事物的功能(方法),子类或实现类可以实现或重写接口中的方法。而接口或继承,则是多态的前提。合理地利用多态可以提高我们程序的可扩展性和灵活性。 ...
分类:
编程语言 时间:
2020-07-25 23:20:01
阅读次数:
63
package LeetCode_283 /** * 283. Move Zeroes * https://leetcode.com/problems/move-zeroes/description/ * * Given an array nums, write a function to move ...
分类:
其他好文 时间:
2020-07-25 09:55:29
阅读次数:
69
题目链接 https://leetcode-cn.com/problems/er-cha-shu-de-shen-du-lcof/ 题目描述 输入一棵二叉树的根节点,求该树的深度。从根节点到叶节点依次经过的节点(含根、叶节点)形成树的一条路径,最长路径的长度为树的深度。 例如: 给定二叉树 [3,9 ...
分类:
其他好文 时间:
2020-07-25 09:44:45
阅读次数:
60
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin:0; padding:0; } .test{ position:fixed; left:50px; top:50px; wid ...
分类:
其他好文 时间:
2020-07-24 22:05:51
阅读次数:
74
Dijkstra's algorithm is one of the very famous greedy algorithms. It is used for solving the single source shortest path problem which gives the short ...
分类:
其他好文 时间:
2020-07-24 21:53:35
阅读次数:
107
由于本人水平不够,这场多校只写了第1题和第10题 第1题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6763 Problem A. Total Eclipse There are n cities and m bidirectional roads ...
分类:
其他好文 时间:
2020-07-24 21:43:59
阅读次数:
171
CF736D Permutations(伴随矩阵) Luogu 题解时间 首先把边直接放进邻接矩阵, 很明显行列式的奇偶和方案数的奇偶一样。 设 \(A_{ i , j }\) 为矩阵的该行列的余子式去掉一条边 \(x,y\) 后是否还为奇数等同于 \(A_{ x ,y }\) 是否为偶数。 至于如 ...
分类:
其他好文 时间:
2020-07-24 21:37:12
阅读次数:
77
C:\Program Files (x86)\Jenkins\plugins\ruby-runtime\WEB-INF\lib\classes.jar: The process cannot access the file because it is being used by another pr ...
分类:
其他好文 时间:
2020-07-24 21:30:48
阅读次数:
197