短发y
短发y
全部文章
分类
CF(1)
博弈SG函数(2)
博弈进阶(3)
未归档(148)
构造题(1)
简单博弈(7)
归档
标签
去牛客网
登录
/
注册
短发
我也有一壶酒,也可以慰风尘
全部文章
(共162篇)
2017女生赛---HDU-6025(思维)
2017女生赛---HDU-6025(思维) 题意: 给你一个长为n的序列 ,删去其中一个数 , 使得剩下的数gcd最大 如果删去第i个数 , 那么前i-1个数的gcd 不会改变 , 第i+1到n个的gcd也不会改变 那么我们可以求其前缀gcd 和 后缀gcd , 然后再for循环找最...
2019-05-29
0
495
2017女生赛--HDU-6024(简单dp)
HDU--6024(简单DP) 搜了搜题解 , 全是说这题是个简单DP的 , 然鹅。。。。。。。我看了好久好久好久。。。。。。。。。。 题意: 在一条路上散布着多个房子 , 每个房子可以选择建或不建糖果屋。满足以下条件: 建糖果屋 , 需要花费cost[i] 不建糖果屋 , 需要花费...
2019-05-29
0
723
2017女生赛--HDU--6023(模拟)
A.模拟题 注意:AC之前错误时要加罚时 , 该题AC之后再错不算罚时 代码: #include <bits/stdc++.h> using namespace std; bool vis[10000]; int book[10000]; int main() { int x ...
2019-05-29
0
489
HDU - 6047-Maximum Sequence (思维题)
题意很难看懂。 给你一个长度为 n 的a[i]数组和b[j] 数组 , 求a[n+1] 到 a[2*n]的和 , a[n+1] 到 a[2*n]的值要满足在a[b[j]]-b[j] 到 a[end]-end 中的最大值。如果a[n+1],a[n+2]...等的值已经算出来了 , 那么a[end]是...
2019-05-17
0
403
Sliding Window(单调队列 )
附上题目链接:点击这里 题意: 给你一个长度为 n 的数组 , 再给你一个只能看见 k 个数字的窗口 , 现在把这个窗口放在数组上从左到右依次滑动 , 求出每滑动一次时窗口可见的数字中的最大值和最小值。 注意这一题的数据范围是1e6 , 因此暴力是不可能的 ; 这时要用到单调队列。(就是维护...
2019-03-26
0
484
P1886 滑动窗口(单调队列)
题目描述 现在有一堆数字共N个数字(N<=10^6),以及一个大小为k的窗口。现在这个从左边开始向右滑动,每次滑动一个单位,求出每次滑动后窗口中的最大值和最小值。 例如: The array is [1 3 -1 -3 5 3 6 7], and k = 3. 输入输出格式 输入...
2019-03-21
0
691
Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2)
学大佬来一波题解。。。。。 A. Be Positive 题意:给你一个数组 a , a 里面的每一个数除以一个相同的数 x , 得到的新的 a 数组 , 若该数组里的正数或负数的个数大于数组长度的一半 , 便输出 x 的值 , 若没有则输出0; 思路 :记录数组里的正数和负数 ,...
2019-03-03
0
400
Polycarp and Div 3 CodeForces - 1005D ---小shi shi 给小天天的 Day2
Polycarp likes numbers that are divisible by 3. He has a huge number ss. Polycarp wants to cut from it the maximum number of numbers that are divisib...
2019-01-23
0
419
Maximum of Maximums of Minimums CodeForces - 872B---小shi shi 给小天天的 Day2
You are given an array a1, a2, ..., an consisting of n integers, and an integer k. You have to split the array into exactly k non-empty subsegments. Y...
2019-01-23
0
824
Round House CodeForces - 659A ----小shi shi 给小天天的 Day2
Vasya lives in a round building, whose entrances are numbered sequentially by integers from 1 to n. Entrance n and entrance 1 are adjacent. Today Vas...
2019-01-23
0
633
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页