自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 几道dp

http://codeforces.com/problemset/problem/553/A 题意:一串球,每种颜色的球有ci个,并且根据安排,前一种颜色的最后一个球需要放在后一种球最后一个前面,求方案数。 // *1700 // dp[i][j]表示前i种球恰好在前j个位置draw完的方案数,那么第i种球的最后一个定在j位置上。 // 转移方程的dp[i][j] = sum(dp[i-1]...

2019-02-18 00:11:20 172

原创 codeforces980e(倍增、贪心|| 树的dfs序差分+树状数组)

E. The Number Games time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output The nation of Panel holds an annual show called The Number Ga...

2019-02-17 23:38:31 188

原创 最近阅读

  深入理解拉格朗日乘子法(Lagrange Multiplier) 和KKT条件 对于 这样的问题可以采用拉格朗日乘数法来解决: 拉格朗日乘数法: 求导使得: …… 其意义在于目标函数的自变量受约束函数约束,必定在约束函数上,而要使得目标函数在约束条件下达到极值,目标函数在极值点必定和约束函数“相切”,即导数向量的方向一直或相反(在同一直线上)。 KKT(Karush-K...

2019-02-13 20:58:42 1417

原创 codeforces662a(线性基)

A. Gambling Nim time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output As you know, the game of "Nim" is played with n piles of stones, ...

2019-02-12 23:56:49 269

原创 codeforces1111d(dp、组合数学)

D. Destroy the Colony time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output There is a colony of villains with several holes aligned in...

2019-02-11 19:14:40 1754

原创 codeforces1114e(交互题,随机数的锅)

题目链接:传送门 题意:有一串长度为n(2<=n<=1e6)的等差数列,每个数都为小于等于1e9的非负数,且打乱了,现在你有60次询问的机会,询问有两种形式: 1. >  x  查询数组中是否含有大于x的数存在 2.? x  查询数组下标为x的数值 求出等差数列的差和最小值。 思路:比较清晰的,可以在30次里二分求出最大值,接下来应该就是随机取几个数来通过差gcd求d,...

2019-02-11 15:49:18 314

原创 codeforces515e(线段树)

E. Drazil and Park time limit per test 2 seconds memory limit per test 512 megabytes input standard input output standard output Drazil is a monkey. He lives in a circular park. There are n t...

2019-02-06 22:09:32 206

原创 codeforces1106e(优先队列+dp)

传送门:http://codeforces.com/problemset/problem/1106/E E. Lunar New Year and Red Envelopes time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard ...

2019-02-02 16:45:24 748

kdtree模板

kdtree模板,采用c++编写!

2019-02-06

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除