算法训练 leetcode hot 100 239. 滑动窗口最大值
从滑动窗口到单调队列,思考怎样高效维护窗口中的最大值,以及每一步操作背后的原因。
THE NOTEBOOK / ARCHIVE
从滑动窗口到单调队列,思考怎样高效维护窗口中的最大值,以及每一步操作背后的原因。
D. Friends and Subsequences Codeforces Round #361 (Div. 2) RMQ+二分,单调队列
“海康威视杯“ 2022年第十四届四川省大学生程序设计大赛 A-Adjacent Swapping归并排序求逆序对的个数
2021 ICPC 江西省大学生程序设计竞赛(正式赛)(重现赛)A -Mio visits ACGN Exhibition dp
codeforces E1&E2 Array and Segments 差分+思维
I Simple Math Problem + E Color Sequence 2020ICPC 江西省大学生程序设计竞赛(重现赛)
F1 & F2 Pictures with Kittens (easy and hard version) dp,单调队列
F1&F2. Microtransactions (easy& hard version) 二分,贪心
D2. Remove the Substring (hard version) codeforces 思维,字符串
F2. Spanning Tree with One Fixed Degree 并查集+dfs+bfs tarjan+bfs
codeforces E1. String Coloring (easy version) and E2. String Coloring (hard version)
E. Minimum Array 详解 思维,二分,multiset
D. Maximum Sum of Products Educational Codeforces Round 108 (Rated for Div. 2) 区间dp,前缀和
C. Schedule Management Educational Codeforces Round 131 (Rated for Div. 2)二分
codeforces #693 E.Correct Placement problem-1472E(思维,排序)。极易理解。
D2. RGB Substring (hard version) codeforces #575 div3 前缀和 构造
链接:https://codeforces.com/problemset/problem/1512/DCorrupted ArrayYou are given a number n and an array b1,b2,…,bn+2, obtained according to the follow
链接:https://codeforces.com/problemset/problem/1512/CA-B PalindromeYou are given a string s consisting of the characters ‘0’, ‘1’, and ‘?’. You need to
pta 7-20 xrf的镜子碎了?xrf有一面镜子,可以把任何接触镜面的东西变成原来的两倍,同时呢,那增加的那部分是反的。xrf很喜欢他的镜子,但是因为一股神秘力量(可能来自pltdhll),xrf的镜子碎了!xrf很伤心。lyx知道后想要把自己的镜子送给xrf,(lyx的镜子有一个独属于lyx的
7-29 h0121. 螺旋矩阵给定一个包含 N 个正整数的序列,请你将序列中的元素以非递增顺序填充到螺旋矩阵中。从左上角的第一个元素开始填充,并按照顺时针方向旋转。要求矩阵有 m 行 n 列,并且 m,n 满足:m×n=N,m≥n,m−n 尽可能小输入格式:第一行包含整数 N,1≤N≤10000。
6-2 判断两棵二叉树是否同构(递归法)函数接口定义bool Isomorphism(BiTree T1,BiTree T2);裁判测试程序样例#include<iostream>#include<string.h>#define N 100;using namespace std;typedef
这里还没有文章。