- 博客(3)
- 收藏
- 关注
原创 HDU5654 xiaoxin and his watermelon candy 莫队
作死一定要用莫队,优化到吐。QAQ#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;const int MAXN=
2016-03-30 12:23:05 332
原创 hdu5653 Bomber Man wants to bomb an Array 线性dp
dp [ R ] = 0到R的区间最大总破坏指数,log ( 最大总破坏指数 )=log ( x1 )+ log ( x2 )+..... + log ( xm )。dp [ R ] = max( dp [ L -1 ] + log ( R-L+1 ) )。答案就是dp [ n-1 ]。#include using namespace std;
2016-03-27 18:40:22 457
原创 cf 459D Pashmak and Parmida's problem 树状数组
给你n个数(1相等的数的个数。问你有多少对 i , j (i f (j , n , a[ j ])。问1到i区间有多少数和a[ i ]相等显然可以预处理出来,得 pre[ i ] == f (1 , i , a[ i ]) 同理得suf[ j ] == f (j , n , a[ j ])。在满足偏序关系 i f (1 ,
2016-03-18 21:09:56 397
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人