cherish__lin
码龄6年
关注
提问 私信
  • 博客:126,771
    126,771
    总访问量
  • 230
    原创
  • 1,881,919
    排名
  • 48
    粉丝
  • 0
    铁粉

个人简介:I want to be better!

IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:浙江省
  • 加入CSDN时间: 2018-11-27
博客简介:

cherish_lin的博客

查看详细资料
个人成就
  • 获得145次点赞
  • 内容获得41次评论
  • 获得279次收藏
  • 代码片获得1,089次分享
创作历程
  • 220篇
    2019年
  • 11篇
    2018年
成就勋章
TA的专栏
  • 我仍不懂的
    4篇
  • 最短路
    17篇
  • 线段树
    9篇
  • DP
    22篇
  • KMP
    2篇
  • 贪心
    7篇
  • 总结
    4篇
  • 线性规划
    1篇
  • 思维
    68篇
  • 背包
    2篇
  • 数论
    35篇
  • 图论
    21篇
  • 并查集
    17篇
  • 简单搜索(BFS&&DFS)
    12篇
  • 哈希表
    1篇
  • 二叉树
    22篇
  • 离散化
    1篇
  • 差分
    1篇
  • 排序
    6篇
  • 几何
    2篇
  • STL
    4篇
  • 物理知识
  • 二分
    3篇
  • 异或
    1篇
  • 概率&期望
    4篇
  • 博弈
    1篇
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

342人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

L2-005 集合相似度 (25 分)(set巧用)

给定两个整数集合,它们的相似度定义为:N​c​​/N​t​​×100%。其中N​c​​是两个集合都有的不相等整数的个数,N​t​​是两个集合一共有的不相等整数的个数。你的任务就是计算任意一对给定集合的相似度。输入格式:输入第一行给出一个正整数N(≤50),是集合的个数。随后N行,每行对应一个集合。每个集合首先给出一个正整数M(≤10​4​​),是集合中元素的个数;然后跟M个[0,10​9​...
原创
发布博客 2019.03.15 ·
188 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

L1-049 天梯赛座位分配 (20 分)(循环技巧)

天梯赛每年有大量参赛队员,要保证同一所学校的所有队员都不能相邻,分配座位就成为一件比较麻烦的事情。为此我们制定如下策略:假设某赛场有 N 所学校参赛,第 i 所学校有 M[i] 支队伍,每队 10 位参赛选手。令每校选手排成一列纵队,第 i+1 队的选手排在第 i 队选手之后。从第 1 所学校开始,各校的第 1 位队员顺次入座,然后是各校的第 2 位队员…… 以此类推。如果最后只剩下 1 所学校的...
原创
发布博客 2019.03.15 ·
4081 阅读 ·
46 点赞 ·
10 评论 ·
39 收藏

求二叉树的层次遍历(前序+中序==层次)

Problem Description已知一颗二叉树的前序遍历和中序遍历,求二叉树的层次遍历。Input输入数据有多组,输入T,代表有T组测试数据。每组数据有两个长度小于50的字符串,第一个字符串为前序遍历,第二个为中序遍历。Output每组输出这颗二叉树的层次遍历。Sample Input2abcbacabdecdbeacSample Output...
原创
发布博客 2019.02.24 ·
1055 阅读 ·
0 点赞 ·
0 评论 ·
3 收藏

A - Wireless Network POJ - 2236 (并查集)

An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershock attacked, all computers in the n...
原创
发布博客 2019.02.15 ·
222 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

G - Supermarket(贪心)

A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral number of time units starting from the moment the s...
原创
发布博客 2019.03.10 ·
185 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

数据结构上机测试4.1:二叉树的遍历与应用1(先序+中序==后序)

Problem Description输入二叉树的先序遍历序列和中序遍历序列,输出该二叉树的后序遍历序列。Input第一行输入二叉树的先序遍历序列;第二行输入二叉树的中序遍历序列。Output输出该二叉树的后序遍历序列。Sample InputABDCEFBDAECFSample OutputDBEFCAHintSource题解:根据先序和中...
原创
发布博客 2019.02.24 ·
327 阅读 ·
1 点赞 ·
0 评论 ·
2 收藏

B. Preparation for International Women's Day

传送门:http://codeforces.com/problemset/problem/1133/BInternational Women's Day is coming soon! Polycarp is preparing for the holiday.There are
原创
发布博客 2019.03.08 ·
761 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

cyk追楠神系列三(简单KMP)

Problem Description众所周知,cyk给楠神写了一封信表白。作为有一个有礼貌的五好青年,楠神当然得给 cyk 写一封回信咯,俗称“好人信”。楠神是一个非常有文采的人,他在信里引用了很多名言来安慰 cyk,有时候他觉得一句话很好的话,他会引用很多次。现在他想考考 cyk,在告诉 cyk 里面每句名言的情况下,看看 cyk 能不能找到每局名言在信里被引用了多少次。如果能找到的话...
原创
发布博客 2019.02.23 ·
608 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

D. Almost All Divisors

We guessed some integer numberxx. You are given a list ofalmost allits divisors.Almost allmeans that there areall divisors except11andxxin the list.Your task is to find the minimum possible...
原创
发布博客 2019.05.16 ·
734 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

数据结构实验之二叉树三:统计叶子数

Problem Description已知二叉树的一个按先序遍历输入的字符序列,如abc,,de,g,,f,,, (其中,表示空结点)。请建立二叉树并求二叉树的叶子结点个数。Input连续输入多组数据,每组数据输入一个长度小于50个字符的字符串。Output输出二叉树的叶子结点个数。Sample Inputabc,,de,g,,f,,,Sample Output...
原创
发布博客 2019.02.24 ·
250 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

L3-010 是否完全二叉搜索树 (30 分)

将一系列给定数字顺序插入一个初始为空的二叉搜索树(定义为左子树键值大,右子树键值小),你需要判断最后的树是否一棵完全二叉树,并且给出其层序遍历的结果。输入格式:输入第一行给出一个不超过20的正整数N;第二行给出N个互不相同的正整数,其间以空格分隔。输出格式:将输入的N个正整数顺序插入一个初始为空的二叉搜索树。在第一行中输出结果树的层序遍历结果,数字间以1个空格分隔,行的首尾不得有多...
原创
发布博客 2019.03.22 ·
488 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

A. Regular Bracket Sequence(思维)

A string is called bracket sequence if it does not contain any characters other than "(" and ")". A bracket sequence is called regular if it it is possible to obtain correct arithmetic expression by i...
原创
发布博客 2019.03.06 ·
1114 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

KMP详解

https://www.cnblogs.com/ZuoAndFutureGirl/p/9028287.html
转载
发布博客 2019.09.25 ·
323 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

高斯消元

//高斯消元 时间复杂度O(n^3) 使用浮点数计算#include<iostream>#include<string.h>#include<math.h>using namespace std;const double eps=1e-8;const int maxn=101;double a[maxn][maxn];bool l[maxn];...
原创
发布博客 2019.08.20 ·
273 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

w

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=100010;int a[maxn],dp[maxn][2];vector<int>G[maxn];void DFS(int u,int pre){ for(int i=0;i<G[u]....
原创
发布博客 2019.08.05 ·
244 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

KMP

#include <stdio.h>#include <stdlib.h>#include<map>#include<algorithm>#include<iostream>#include<bits/stdc++.h>using namespace std;typedef long long ll;cons...
原创
发布博客 2019.07.26 ·
167 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

博客园地址

https://www.cnblogs.com/cherish-lin/
原创
发布博客 2019.06.12 ·
811 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

E - A New Function LightOJ - 1098

We all know that any integer number n is divisible by 1 and n. That is why these two numbers are not the actual divisors of any numbers. The function SOD(n) (sum of divisors) is defined as the summati...
原创
发布博客 2019.05.22 ·
290 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

D - Nim POJ - 2068 (记忆化搜索)

Let's play a traditional game Nim. You and I are seated across a table and we have a hundred stones on the table (we know the number of stones exactly). We play in turn and at each turn, you or I can ...
原创
发布博客 2019.05.18 ·
157 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏
加载更多