自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Yishui_lovely

败犬~~

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

原创 1002 数塔取数问题 (DP

1002 数塔取数问题Description一个高度为N的由正整数组成的三角形,从上走到下,求经过的数字和的最大值。 每次只能走到下一层相邻的数上,例如从第3层的6向下走,只能走到第4层的2或9上。5 8 4 3 6 9 7 2 9 5例子中的最优方案是:5 + 8 + 6 + 9 = 28Input第1行:N,NN,N为数塔的高度。(2<=N<=5002 <= N <= 500)

2017-09-30 01:19:35 371

原创 51Nod 1183 编辑距离 (DP

1183 编辑距离Description编辑距离,又称Levenshtein距离(也叫做Edit Distance),是指两个字串之间,由一个转成另一个所需的最少编辑操作次数。许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符,删除一个字符。 例如将kitten一字转成sitting: sitten (k->s) sittin (e->i) sitting (->g) 所以kitt

2017-09-30 00:50:37 295

原创 浅谈关于数据结构中的树

树树的定义:​ 在计算机科学中,树(英语:tree)是一种抽象数据类型(ADT)或是实作这种抽象数据类型的数据结构,用来模拟具有树状结构性质的数据集合。它是由n(n>0)个有限节点组成一个具有层次关系的集合。把它叫做“树”是因为它看起来像一棵倒挂的树,也就是说它是根朝上,而叶朝下的。它具有以下的特点: 每个节点有零个或多个子节点; 没有父节点的节点称为根节点; 每一个非根节点有

2017-09-27 18:05:10 352

原创 Codeforces #396 (Div. 2) D. Mahmoud and a Dictionary (并查集+map

DescriptionMahmoud wants to write a new dictionary that contains n words and relations between them. There are two types of relations: synonymy (i. e. the two words mean the same) and antonymy (i. e. t

2017-09-27 00:18:06 446

原创 Codeforces #297( div2) D. Arthur and Walls ( DFS

D. Arthur and WallsDescriptionFinally it is a day when Arthur has enough money for buying an apartment. He found a great option close to the center of the city with a nice price.Plan of the apartment f

2017-09-25 23:32:01 307

原创 POJ 2777 Count Color ( 线段树&&位运算

Count ColorDescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new problem. There is a very long board with lengt

2017-09-21 17:14:25 527

原创 Codeforces Round #435 (Div. 2) A. B. C

A.Mahmoud and Ehab and the MEX题目链接http://codeforces.com/contest/862/problem/A题解给组数 问最少经过几次增加或者减少数字的操作可以得到xx 其中xx为数列中最小的自然数简单模拟就可以了AC代码#include <cstdio>#include <cstring>#include <algorithm>using na

2017-09-21 16:13:44 213

原创 CS Academy Round #49 A, B, C

A.Odd Sum题目链接https://csacademy.com/contest/round-49/task/odd-sum/statement/题解给组数让求其中两两组合可以形成奇数的个数 直接统计奇数偶数个数相乘AC代码#include <bits/stdc++.h>using namespace std;#define LL long long#define CLR(a,b) mem

2017-09-21 15:47:02 627

原创 ICPC2017南宁邀请赛1005&&HDU6185 (矩阵快速幂/黑科技

CoveringDescriptionBob’s school has a big playground, boys and girls always play games here after school.To protect boys and girls from getting hurt when playing happily on the playground, rich boy Bob

2017-09-19 15:27:12 569

原创 ICPC2017南宁邀请赛1005&&HDU6197 (模拟

CS CourseDescriptionLittle A has come to college and majored in Computer and Science.Today he has learned bit-operations in Algorithm Lessons, and he got a problem as homework.Here is the problem:You a

2017-09-19 14:26:28 582

原创 ICPC2017南宁邀请赛1004&&HDU6188 (贪心

Duizi and ShunziDescriptionNike likes playing cards and makes a problem of it.Now give you n integers, ai(1≤i≤n)We define two identical numbers (eg: 2,2) a Duizi, and three consecutive positive intege

2017-09-19 13:58:53 581

原创 ICPC2017南宁邀请赛1001&&HDU6182(水

A Math ProblemYou are given a positive integer n, please count how many positive integers k satisfy k^k≤n.DescriptionYou are given a positive integer n, please count how many positive integers k satisf

2017-09-15 21:00:31 564

原创 ICPC2017沈阳网赛1004&&HDU6197 (LIS

array array arrayDescriptionOne day, Kaitou Kiddo had stolen a priceless diamond ring. But detective Conan blocked Kiddo’s path to escape from the museum. But Kiddo didn’t want to give it back. So, Kid

2017-09-12 09:44:33 363

原创 ICPC2017沈阳网赛1005&&HDU6198 (矩阵快速幂

number number numberDescriptionWe define a sequence F:⋅ F0=0,F1=1; ⋅ Fn=Fn−1+Fn−2 (n≥2).Give you an integer k, if a positive number n can be expressed by n=Fa1+Fa2+…+Fak where 0≤a1≤a2≤⋯≤ak, this posi

2017-09-11 05:35:24 764

空空如也

空空如也

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

TA关注的人

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