LucienShui

www.lucien.ink

Codeforces 842C - Ilya And The Tree - 树形DP或DFS

链接:  http://codeforces.com/contest/842/problem/C题目:Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a ver...

2017-08-31 00:55:16

阅读数 435

评论数 0

Codeforces 844B - Rectangles - 思维

链接:  http://codeforces.com/contest/844/problem/B题目:You are given n × m table. Each cell of the table is colored white or black. Find the number of no...

2017-08-31 00:40:45

阅读数 485

评论数 0

POJ 1617 - Phone List - 字典树

链接:  http://acm.hdu.edu.cn/showproblem.php?pid=1671题目:Problem DescriptionGiven a list of phone numbers, determine if it is consistent in the sense th...

2017-08-31 00:29:44

阅读数 98

评论数 0

UPCOJ 4198 - Birthday present - 暴力

链接:  http://exam.upc.edu.cn/problem.php?id=4198题目:题目描述Bob’s father’s birthday is coming,.Because Bob’s father is a math teacher so that Bob wanted to...

2017-08-31 00:26:15

阅读数 140

评论数 0

UPCOJ 4199 - Coach's plan - 二分图匹配 + 二分答案

链接:  http://exam.upc.edu.cn/problem.php?id=4199题目:题目描述NEUACM team holds summer training every year. This year n students participate in the training...

2017-08-31 00:18:55

阅读数 174

评论数 1

UPCOJ 4201 - Teacher’s Day - 二分贪心

链接:  http://exam.upc.edu.cn/problem.php?id=4201题目:题目描述Teacher’s Day is coming, a group of n students decided to buy gifts. The store offered them M ...

2017-08-31 00:06:41

阅读数 145

评论数 0

UPCOJ 4333 - Covering - 矩阵快速幂

链接:  http://exam.upc.edu.cn/problem.php?id=4333题目:题目描述Bob’s school has a big playground, boys and girls always play games here after school. To prot...

2017-08-30 23:58:45

阅读数 802

评论数 0

「模板」 随机遍历数组

#include <iostream> #include <cstdlib> // srand rand #include <ctime> // time #include <algorithm> using namespace std; /...

2017-08-19 23:51:05

阅读数 282

评论数 0

「模板」 归并排序

void mergearray(int a[], int first, int mid, int last, int temp[]) { int i = first, j = mid + 1; int m = mid, n = last; int k = 0; ...

2017-08-19 23:49:38

阅读数 107

评论数 0

「模板」 左偏树 - 实现可并优先队列

template<typename T, typename _Compare=std::less<T> > class leftist_tree { private: struct node { T data; int deep; ...

2017-08-19 23:47:35

阅读数 213

评论数 0

Double Queue - POJ 3481 - 树堆Treap的数组实现

链接:  题目:DescriptionThe new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environ...

2017-08-19 23:27:24

阅读数 151

评论数 0

Black Box - POJ 1442 - Treap

链接:  http://poj.org/problem?id=1442题目:DescriptionOur Black Box represents a primitive database. It can save an integer array and has a special i vari...

2017-08-19 22:57:38

阅读数 149

评论数 0

Shaolin - HDU 4585 - 树堆

链接:  http://acm.hdu.edu.cn/showproblem.php?pid=4585题目:Problem DescriptionShaolin temple is very famous for its Kongfu monks.A lot of young men go to ...

2017-08-19 21:21:34

阅读数 183

评论数 0

非诚勿扰 - HDU 4557 - Treap入门

链接:  http://acm.hdu.edu.cn/showproblem.php?pid=4557题目:Problem Description  作为2013年699万应届毕业生中的一员,由于宏观经济的不景气,小明在毕业当天就华丽丽地失业了!   经历了千难万苦的求职过程,小明特别能理解毕业...

2017-08-19 21:15:50

阅读数 233

评论数 0

[模板] 树堆 - Treap的指针和数组实现及一些例题

指针版:template <class T, class Compare = std::less<T> > class Treap { private: struct treap {//成员结构体 int size, fix;//以当前节点为根的树的...

2017-08-19 21:11:15

阅读数 251

评论数 0

[模板] 二叉堆 - 优先队列的二叉堆数组实现

最近开始学数据结构,一直无心更新博客,今天结束集训,晚上打算码一下最近的进度。/* * 创建一个最大容量为MaxSize的int型堆:MaxHeap<int> que(MaxSize); * 默认最大容量为1007:MaxHeap<int> que; * * 作为优...

2017-08-19 20:53:37

阅读数 223

评论数 0

图论500题!

转自:Enstein_Jun=============================以下是最小生成树+并查集====================================== 【HDU】 1213 How Many Tables 基础并查集★ 1272 ...

2017-08-11 15:14:26

阅读数 261

评论数 0

Ants - HDU 3565 - 二分图KM - 详解

链接:  http://poj.org/problem?id=3565题目:DescriptionYoung naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple trees...

2017-08-10 23:27:51

阅读数 155

评论数 0

奔小康赚大钱 - HDU 2255 - 二分图匹配

链接:  http://acm.hdu.edu.cn/showproblem.php?pid=2255题目:Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。 这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n...

2017-08-10 23:12:17

阅读数 119

评论数 0

The Accomodation of Students - HDU 2444 - 二分图匹配

链接:  http://acm.hdu.edu.cn/showproblem.php?pid=2444题目:Problem DescriptionThere are a group of students. Some of them may know each other, while other...

2017-08-10 23:07:08

阅读数 112

评论数 0

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