自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

WZJRJ28

为了看到更大的世界

  • 博客(6)
  • 收藏
  • 关注

原创 Hdu-5921 Binary Indexed Tree(数位DP)

Problem Description Recently, Mr. Frog has learned binary indexed tree. Here is the code of adding t to the interval [1,x]: void add (int x, int t ){ for (int i = x; i != 0; i -= i & (-i

2017-01-31 14:27:28 1020

原创 SPOJ-GSS7 Can you answer these queries VII(树上区间最大和)

Given a tree with N (N |x_i| You have to apply Q (Q  1. 1 a b : answer the maximum contiguous sum (maybe empty,will always larger than or equal to 0 ) from the path a->b ( inclusive ). 2. 2 a b c :

2017-01-28 21:15:22 599

原创 Bzoj-2243 [SDOI2011]染色(动态树/树链剖分)

Description 给定一棵有n个节点的无根树和m个操作,操作有2类: 1、将节点a到节点b路径上所有点都染成颜色c; 2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。 请你写一个程序依次完成这m个操作。 Input 第一行包含2个整数n和m,分别表示节点

2017-01-28 20:10:08 287

原创 SPOJ-COT2 Count on a tree II(树上莫队)

You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight. We will ask you to perform the following operation: u v : ask for how many different in

2017-01-26 16:30:29 495

原创 Bzoj-3289 Mato的文件管理(离线求区间逆序对数)

Mato同学从各路神犇以各种方式(你们懂的)收集了许多资料,这些资料一共有n份,每份有一个大小和一个编号。为了防止他人偷拷,这些资料都是加密过的,只能用Mato自己写的程序才能访问。Mato每天随机选一个区间[l,r],他今天就看编号在此区间内的这些资料。Mato有一个习惯,他总是从文件大小从小到大看资料。他先把要看的文件按编号顺序依次拷贝出来,再用他写的排序程序给文件大小排序。排序程序可以在1单

2017-01-25 23:23:02 416

原创 Codeforces Round #390 (Div. 2) D. Fedor and coupons

All our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket. The goods in the supermarket have unique integer ids. Also, for every integer there i

2017-01-07 08:35:14 509

空空如也

空空如也

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

TA关注的人

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