自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 资源 (2)
  • 收藏
  • 关注

原创 【BZOJ 1208】【HNOI2004】宠物收养所 [splay]

1208: [HNOI2004]宠物收养所Time Limit: 10 Sec Memory Limit: 162 MB Submit: 6160 Solved: 2383 [Submit][Status][Discuss] Description最近,阿Q开了一间宠物收养所。收养所提供两种服务:收养被主人遗弃的宠物和让新的主人领养这些宠物。每个领养者都希望领养到自己满意的宠物,阿Q根据领

2015-12-28 20:25:33 660

转载 BestCoder Round #68

N bulbs我们注意到总的操作次数是跟nn奇偶的。这个很重要,也就是如果11的数量和nn不同奇偶,那么一定无解。那么现在问题是11和nn同奇偶的情况下,是不是一定有解?答案是显然的。因为11和nn同奇偶,所以00的个数是偶数,我们发现当我们从11走到ii时,假设我们往回走到左边某个点kk,再走回来ii,那么你会发现有且仅有kk和ii这两个数被设成没有操作。也就是说

2015-12-27 08:14:28 478

原创 [codeforces383C - Propagating tree] dfs序 +segment tree

C. Propagating tree time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Iahub likes trees very much. Recently he discovered an interesting tre

2015-12-22 15:13:49 690

原创 splay 模板

#include <iostream>#include <cstdio>#include <cstdlib>#include <algorithm>#include <cstring>#include <cmath>using namespace std;#define rt ch[root][1]#define lrt ch[rt][0]#define ls ch[x][0]#

2015-12-16 20:17:28 596

原创 【POJ 2104】(K-th Number-区间第k大-主席树)

POJ 2104(K-th Number-区间第k大-主席树) !裸题 1.Hash后建树; 2.x-y区间最大—-》sum[y]-sum[x-1]后贪心去找; 3.建树时需1-i(n=>i>=1)的树, 【可持久化】—–》改rson 则lson等;#include<iostream>#include<stdio.h>#include<algorithm>using namespace

2015-12-15 20:55:20 952

原创 NOI 2015 d1t2 洛谷 【P2146】 软件包管理器

Linux用户和OSX用户一定对软件包管理器不会陌生。通过软件包管理器,你可以通过一行命令安装某一个软件包,然后软件包管理器会帮助你从软件源下载软件包,同时自动解决所有的依赖(即下载安装这个软件包的安装所依赖的其它软件包),完成所有的配置。ebian/Ubuntu使用的apt-get,Fedora/CentOS使用的yum,以及OSX下可用的homebrew都是优秀的软件包管理器。 你决定设计你自

2015-12-09 21:09:57 1348

原创 【poj2828】Buy Tickets (segment tree+贪心)

F - Buy Tickets Time Limit:4000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description Railway tickets were difficult to buy around the Lunar New Year in China, so we

2015-12-08 21:42:00 738

原创 【codeforces 115E】Linear Kingdom Races (datestructs(seg.tree)+dp)

E. Linear Kingdom Races time limit per test5 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are a car race organizer and would like to arrange some races

2015-12-08 20:29:26 1025

原创 【codevs 3044】【HDU 1542】【poj 1151】矩形面积并 线段树+‘扫描线’

E - Atlantis Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u SubmitStatus Description There are several ancient Greek texts that contain descriptions of the fabled isla

2015-12-03 22:00:34 928 1

原创 【BZOJ 1012】[JSOI2008]最大数maxnumber

1012: [JSOI2008]最大数maxnumberTime Limit: 3 Sec Memory Limit: 162 MB Description 现在请求你维护一个数列,要求提供以下两种操作: 1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个数中的最大的数,并输出这个数的值。限制:L不超过当前数列的长度。 2、 插入操作。语法:A n 功能:将n加上t,其中t是最近一次查

2015-12-01 20:11:30 803 1

原创 【Codeforces 343D】Water Tree dfs序建树+线段树

D. Water Tree time limit per test4 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mad scientist Mike has constructed a rooted tree, which consists of n vertic

2015-12-01 19:43:50 1053 1

c++ iostream 教程 PPT

C++ solution is a set of classes defined in the iostream and fstream header files.

2018-03-15

网络流Dinic

网络流Dinic

2016-02-01

空空如也

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

TA关注的人

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