自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 POJ 2234 Matches Game (经典Nim博弈)

题目连接题意:给你M堆物品,让两个人进行轮流选择,每一个人可以选择任意一堆的任意个物品,假设每个人都很聪明,求解这种情况下是前者必赢还是后者必赢,直接Nim博弈,判断sum = A[0] ^ A[1] ^ A[2] ...即可#include #include #include using namespace std;const int MAXN = 20 + 5;

2016-07-31 23:24:11 538

原创 POJ - 2823 Sliding Window (单调队列求解区间最值)

POJ - 2823Sliding WindowTime Limit: 12000MS Memory Limit: 65536KB 64bit IO Format: %lld & %lluSubmit StatusDescriptionAn array of size n ≤ 10 6 is given to yo

2016-07-27 10:23:46 1204

原创 HDU 5750 Dertouzos (数论)

Dertouzos  Accepts: 76  Submissions: 1357 Time Limit: 7000/3500 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Others)问题描述正整数xx称为nn的positive proper divisor, 当且仅当x | nx

2016-07-26 20:40:47 741

原创 HDU 5749 Colmerauer(单调栈或单调队列求解固定区间最大或最小值)

ColmerauerTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 276    Accepted Submission(s): 118Problem DescriptionPeter has an n

2016-07-26 12:57:55 1195

原创 HDU 5748 Bellovin(最长上升子序列[nlogn])

BellovinTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 627    Accepted Submission(s): 291Problem DescriptionPeter has a seque

2016-07-25 10:47:13 584

原创 HDU 5747 Aaronson(汉明距离)

AaronsonTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 423    Accepted Submission(s): 255Problem DescriptionRecently, Peter s

2016-07-24 18:23:01 766

原创 51Nod 1358 浮波那契 (矩阵快速幂)

1358 浮波那契基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注TengBieBie已经学习了很多关于斐波那切数列的性质,所以他感到一些些厌烦。现在他遇到了一个新的数列,这个数列叫做Float-Bonacci。这里有一个关于Float-Bonacci的定义。对于一个具

2016-07-21 10:45:57 768

原创 Codeforces Round #363 (Div. 2) B. One Bomb(前缀和 + 后缀和)

B. One Bombtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a description of a depot. It is a

2016-07-20 08:16:33 577

原创 Codeforces Round #363 (Div. 2) C. Vacations(DP)

C. Vacationstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has n days of vacations! So he decided to

2016-07-20 00:39:07 480

原创 HDU 5723 Abandoned country (并查集 + DFS+求解树上任意两点间的距离的平均值)

Abandoned countryTime Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 293    Accepted Submission(s): 85Problem DescriptionAn abandone

2016-07-19 19:34:43 1264

原创 HDU 4686 Arc of Dream (矩阵快速幂)

D - Arc of DreamTime Limit:2000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAn Arc of Dream is a curve defined by following function: wh

2016-07-18 12:57:14 616

原创 Codeforces 691E Xor-sequences(矩阵快速幂)

E - Xor-sequencesTime Limit:3000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionYou are given n integers a1,  a2,  ...,  an.A sequence of in

2016-07-17 09:11:19 1055

原创 CodeForces 691D Swaps in Permutation (并查集 + 双向链表)

D - Swaps in PermutationTime Limit:5000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 691DDescriptionYou are given a permutation

2016-07-16 16:31:16 813

原创 CodeForces 350C Bombs(模拟)

C - BombsTime Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 350CDescriptionYou've got a robot, its task is destroying

2016-07-14 23:16:44 914

原创 CodeForces 350B Resort(最长路)

B - ResortTime Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 350BDescriptionValera's finally decided to go on holiday!

2016-07-14 21:54:36 1140

原创 HDU 1254 推箱子 (BFS + DFS)

F - 推箱子Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescription推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬运工,搬运工的工作就是把箱子推到指定的位置,注意,搬运工

2016-07-12 15:37:41 861

原创 HDU-1175 连连看(BFS 或 DFS)

连连看Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29378    Accepted Submission(s): 7330Problem Description“连连看”相信很多人都玩过。没玩过也没

2016-07-12 09:57:26 699 2

原创 POJ - 3414 Pots(BFS)

PotsTime Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uSubmit StatusDescriptionYou are given two pots, having the volume of A and B liters r

2016-07-11 21:16:30 734

原创 UVA624 - CD (DFS)

由于题目给出不会超过20个,所以可以直接DFS暴力过#include #include #include using namespace std;const int MAXN = 20 + 5;int n, m, Max, O[MAXN], X[MAXN], M[MAXN];void dfs(int i,int p, int s) { if(s > n) return;

2016-07-11 21:03:44 553

原创 HDU 2546 饭卡 (变形01背包)

饭卡Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 21574    Accepted Submission(s): 7539Problem Description电子科大本部食堂的饭卡有一种很诡异的设计,即

2016-07-11 18:24:50 563

原创 CSU - 1774 慷慨的奖励(模拟链表)

慷慨的奖励Time Limit: 1000MS Memory Limit: 131072KB 64bit IO Format: %lld & %lluSubmit StatusDescription对于csuxushu来说,能够在CSU(California State University)上学是他一生的荣幸,而通过

2016-07-10 23:17:47 820

空空如也

空空如也

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

TA关注的人

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