自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(52)
  • 收藏
  • 关注

原创 【splay tree】 HDOJ 1890 Robotic Sort

伸展树的经典操作,注意pushdown

2014-07-31 11:52:09 469

原创 【splay tree】 UVA 11922 Permutation Transformer

题目中只有一种操作,把

2014-07-30 17:25:25 778

原创 【网络流】 HDOJ 4888 Redraw Beautiful Drawings

建图很简单,每行每列看成一个dian

2014-07-30 11:39:23 365

原创 【线段树】 HDOJ 4893 Wow! Such Sequence!

用一个标记记录该区间是否都是Fibonacci

2014-07-29 19:52:03 411

原创 【双连通分量】 HDOJ 2242 考研路茫茫——空调教室

这道题只要求一下双临

2014-07-28 20:11:33 565

原创 【最短路】 HDOJ 4885 TIANKENG’s travel

题目中要求

2014-07-28 16:15:17 539

原创 【强连通缩点+最短路】 POJ 3114 Countries in War

先强连通缩点处理处DAG图,然后再DAG图上求两点

2014-07-27 17:57:58 471

原创 【强连通缩点+二分匹配】 HDOJ 3861 The King’s Problem

先强连通缩点预处理出

2014-07-27 14:05:58 480

原创 【强连通缩点】 HDOJ 3072 Intelligence System

先强连通缩点,然后对每个点调指向这个点的权值最小的bian

2014-07-27 12:07:52 542

原创 【强连通分量】 HDOJ 3639 Hawk-and-Chicken

强连通缩点

2014-07-26 20:49:15 485

原创 【强连通分量+缩点】 POJ 2186 Popular Cows

先求出强连通,再缩点。然后qiu

2014-07-26 16:19:43 431

原创 【强连通分量+缩点】 HDOJ 3836 Equivalent Sets

先求强连通,再缩点。然后再DAG图上求出

2014-07-26 14:53:59 436

原创 【强连通分量+缩点】 HDOJ 1827 Summer Holiday

先求出强连通分量,每个强连通分量都可以看成一个点,这个点d

2014-07-26 12:12:00 482

原创 【强连通分量】 HDOJ 1269 迷宫城堡

tarjan模板题。。。#include #include #include #include #include #include #include #include #include #include #include #include #include #define maxn 10005#define maxm 1000

2014-07-25 19:19:31 498

原创 【杂题】 codeforces 451D Count Good Substrings

一道数学题。。。刚开始

2014-07-25 16:45:09 428

原创 【分块】 HDOJ 4858 项目管理

分块题。。

2014-07-25 11:45:41 510

原创 【主席树】 HDOJ 4866

将所有目标与起点线的距离离散化作为下标,建立函数式线段树,将距离按区间端点从1到X的顺序加入函数式线段树,左端点+1,右端点-1,记录区间元素的距离和,以及元素的个数。对于在x位置的询问,找到其对应的端点,这个可以二分找到,然后在该端点对应的线段树上进行二分查找求解,最后判断前一个答案与P的大小得到当前问题的答案。

2014-07-24 11:52:25 447

原创 【组合数学】 HDOJ Turn the pokers

经过n次翻牌以后,我们能得到在

2014-07-22 20:19:52 542

原创 【线段树套平衡树】 ZOJ 2112 Dynamic Rankings

这道题对内存卡的相当严。。。刚开始用

2014-07-22 10:47:00 537

原创 【最短路】 codeforces 449B Jzzhu and Cities

直接把火车建在

2014-07-21 18:26:38 986

原创 【杂题】 codeforces 449A Jzzhu and Chocolate

附一份CF给出的题解。。。。。We assume that n ≤ m (if n > m, we can simply swap n and m).If we finally cut the chocolate into x rows and y columns (1 ≤ x ≤ n, 1 ≤ y ≤ m, x + y = k + 2), we should maxi

2014-07-21 15:37:25 604

原创 【拓扑排序】 HDOJ 4857 逃生

这道题要件反图,答案反着sh

2014-07-21 14:10:05 682

原创 【treap tree】 HDOJ 3726 && LA 5031 && UVA 1479 Graph and Queries

在线转离线。。先构建出

2014-07-21 14:04:40 591

原创 【treap tree】 HDOJ 4006

pingheng考虑输入的数可能重复。。

2014-07-19 15:02:44 462

原创 【数论】 POJ 2115 C Looooops

设一个X,则X%(1

2014-07-18 15:20:41 419

原创 【杂题】 codeforces 448C Painting Fence

用类似线段树的fa

2014-07-18 11:36:29 556

原创 【杂题】 codeforces 448D Multiplication Table

简单二分。。比赛时没想到。。#include #include #include #include #include #include #include #include #include #include #include #include #define maxn 1000005#define eps 1e-10#defi

2014-07-18 10:59:39 562

原创 【数论】 HDOJ 1930 && ZOJ 2945 And Now, a Remainder from Our Sponsor

中国剩余定理的简单应用。。。给你

2014-07-17 16:54:26 704 2

原创 【数论】 HDOJ 1788 Chinese remainder theorem again

简单的中国剩余定理。。。数论一顿套模板。。。

2014-07-17 14:59:17 574

原创 【中国剩余定理模板】

LL a[maxn], b[maxn], n;void extend_gcd(LL a, LL b, LL &d, LL &x, LL &y){ if(b == 0) { d = a, x = 1, y = 0; } else { extend_gcd(b, a%b, d, y, x), y -= x*(a/b); }}void extend_chinese_reminde

2014-07-17 14:58:42 652

原创 【数论】 HDOJ 1370 && POJ 1006 && ZOJ 1160 Biorhythms

这道题三大OJ都有

2014-07-17 14:27:22 507

原创 【数论】 HDOJ 1573 X问题

非互质的中国剩余定理。。。用哪个叫合并上升法

2014-07-17 12:45:08 566

转载 扩展欧几里得算法

转载来自http://blog.sina.com.cn/u/1885661061。

2014-07-16 17:43:15 411

原创 【后缀数组】 POJ 3450 Corporate Identity

后缀数组+二分。。。思路很简单,把所有的串合并成一个chuan

2014-07-16 12:20:06 501

原创 【后缀数组】 HDOJ 2459 && POJ 3693 Maximum repetition substring

这道题在后缀数组的那篇神论文中

2014-07-15 23:16:30 605

原创 【后缀数组】 POJ Milk Patterns

二分+后缀数组分组,和前几题类似,一样的。。

2014-07-15 14:47:39 443

原创 【杂题】 codeforces 446B - DZY Loves Modification

题解给出的

2014-07-14 09:45:42 620

原创 新的征程

最近略忙,上海邀请赛忙了一天b

2014-07-14 09:01:46 332

原创 【后缀数组】 POJ 1743 Musical Theme

后缀数组+二分,和上一题类似,比较简单。#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ma

2014-07-10 21:28:57 464

原创 【后缀数组】 HDOJ 3518 Boring counting

后缀数组的应用。。先求出后缀数组的

2014-07-10 19:37:23 532

空空如也

空空如也

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

TA关注的人

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