码迷,mamicode.com
首页 >  
搜索关键字:problem 2171 防守阵地 ii    ( 43577个结果
Codeforces 997E - Good Subsegments(线段树维护最小值个数+历史最小值个数之和)
Portal 题意: 给出排列 \(p_1,p_2,p_3,\dots,p_n\),定义一个区间 \([l,r]\) 是好的当且仅当 \(p_l,p_{l+1},p_{l+2},\dots,p_r\) 包含了连续的 \(r-l+1\) 个数。 \(q\) 次询问,每次询问给出两个数 \(l,r\), ...
分类:其他好文   时间:2020-12-31 12:03:23    阅读次数:0
59. 螺旋矩阵 II
题目: 给定一个正整数 n,生成一个包含 1 到 n2 所有元素,且元素按顺时针顺序螺旋排列的正方形矩阵。 示例: 输入: 3 输出: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 代码: 1 class Solution { 2 public int[][] ...
分类:其他好文   时间:2020-12-30 10:52:55    阅读次数:0
45. 跳跃游戏 II Jump Game II
Given an array of non-negative integers nums, you are initially positioned at the first index of the array. Each element in the array represents your ...
分类:其他好文   时间:2020-12-29 11:18:24    阅读次数:0
【题解】Ynoi2019模拟赛 Yuno loves sqrt technology II
考虑莫队。 如果是单纯的莫队的话,还需要一个树状数组来维护逆序对数,这样子的话复杂度是 \(O(n^{1.5}\log n)\),难以接受。 怎么将这个树状数组消除? 考虑当前区间为 \([l,r-1]\) ,需要将右端点向右移动,即加入 \(a_r\) ,并且将答案加上 \(a_{l,l+1,\c ...
分类:其他好文   时间:2020-12-25 12:28:35    阅读次数:0
3. 无重复字符的最长子串
原题链接:https://leetcode-cn.com/problems/longest-substring-without-repeating-characters/ class Solution { public int lengthOfLongestSubstring(String s) { ...
分类:其他好文   时间:2020-12-25 11:54:02    阅读次数:0
CF1462E2 Close Tuples (hard version)
Description This is the hard version of this problem. The only difference between the easy and hard versions is the constraints on $ k $ and $ m $ . I ...
分类:其他好文   时间:2020-12-25 11:42:12    阅读次数:0
E. Plan of Lectures(给定拓扑图求输出序列满足存在给定链)
题:https://codeforces.com/contest/1463/problem/E 题意:给定拓扑图,在给定链(以边的形式给出),问是否能在拓扑顺序中找出一个序列使得这个序列包含给定的链(x->y->z)。 分析: 给定的拓扑图我们可以当作一个DAG,然后给定的m个边我们可以在原图上进行 ...
分类:其他好文   时间:2020-12-24 11:46:03    阅读次数:0
Transformation HDU - 4578
简单线段树操作 咕咕咕 Transformation HDU - 4578 vj talk is cheap, chow the code. #include <iostream> #include <cstring> using namespace std; typedef long long l ...
分类:其他好文   时间:2020-12-23 12:30:38    阅读次数:0
C. Kevin's Meme Reacts(UTPC Contest 11-06-20 Div. 2 (Beginner))
题意 这题大体意思就是你一开始给一个数1,之后每一天这个数都会自乘2,并且你可以在其中的任意一天把这个数加1,以此来得到你最终想要的数n,并且要求操作次数最少。 题目链接:https://codeforces.com/gym/102830/problem/C 解析 这种题其实遇到过好多次了,但是每次 ...
分类:其他好文   时间:2020-12-23 12:26:35    阅读次数:0
0454. 4Sum II (M)
4Sum II (M) 题目 Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is ze ...
分类:其他好文   时间:2020-12-22 12:32:53    阅读次数:0
43577条   上一页 1 ... 31 32 33 34 35 ... 4358 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!