自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 ZOJ-4110 Strings in the Pocket 2019浙江省省赛

题目链接 Strings in the Pocket Time Limit: 1 Second Memory Limit: 65536 KB BaoBao has just found two strings s=s1s2…sn and t=t1t2…tn in his left pocket, where si indicates the i-th character in ...

2019-04-28 19:42:05 249

原创 ZOJ-4108 Fibonacci in the Pocket 2019浙江省省赛

题目链接 Fibonacci in the Pocket Time Limit: 1 Second Memory Limit: 65536 KB DreamGrid has just found a Fibonacci sequence f1,f2,… and two integers a and b in his right pocket, where fk indicate...

2019-04-28 19:20:09 674

原创 ZOJ-4104 Sequence in the Pocket 2019浙江省省赛

题目链接 Sequence in the Pocket Time Limit: 2 Seconds Memory Limit: 65536 KB DreamGrid has just found an integer sequence a1,a2,…,an in his right pocket. As DreamGrid is bored, he decides to pl...

2019-04-28 18:55:55 998

原创 ZOJ-4107 Singing Everywhere 2019浙江省省赛

题目链接 Sample Input 3 6 1 1 4 5 1 4 7 1 9 1 9 8 1 0 10 2 1 4 7 4 8 3 6 4 7 Sample Output 1 0 2 题意,给定一个序列,让你消除某个数,所得序列最高峰最少是多少 例如样例 1 1 4 5 1 4 无论如何消除一个数,最后结果都是1, 但是样例 1 9 1 9 8 1 0 只要把第三个数 ...

2019-04-28 18:46:25 1033 4

原创 hdu1232-畅通工程

Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路...

2019-04-26 16:14:33 255

原创 字典树模板,类型3:HDU—1251

类型1:判断单词前缀有没有出现过 #include<bits/stdc++.h> using namespace std; const int maxn=2e6+5; int trie[maxn][27]; int top; void insert(char *s,int rt) { for(int i=0;i<strlen(s);i++) { int x=s[i...

2019-04-25 11:26:43 167

原创 P4779-单源最短路径 Dijkstra vector优化

题目链接:P4779 【模板】单源最短路径(标准版) Dijkstra vector优化,用优先队列每次出来一条最短的边,然后一次一次的遍历。 #include<bits/stdc++.h> using namespace std; const int INF=0x3f3f3f3f; int pre[200005]; struct node { int x,d; node(i...

2019-04-24 20:58:07 379

原创 牛客--美味佳肴

美味佳肴 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 众所周知,天才程序员菜哭武是一个伟大的厨师。这天,张老师和石头来到菜哭武家做客,想尝一尝菜哭武的手艺。 菜哭武手上有n种食材,每种食材个数无限多,编号为i的食材有一个美味度ai。一道菜中,每种编号的食材至多有一个, 而这...

2019-04-24 20:50:59 533 1

原创 hdu-6278 Just h-index湘大邀请赛C题

Just h-index Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 168Accepted Submission(s): 56 Problem Description The h-index of an aut...

2019-04-24 20:35:52 333

原创 CSU - 2170 千万别用树套树

Description Bobo 精通数据结构!他想维护一个线段的集合 S。初始时,S 为空。他会依次进行 q 次操作,操作有 2 种。 类型 1:给出 l, r,向集合 S 中插入线段 [l, r]. 类型 2:给出 l, r,询问满足 [x, y]∈S 且 x ≤ l ≤ r ≤ y 的线段 [x, y] 数量。 帮 Bobo 求出每次询问的答案。 1 ≤ n, q ≤ 105 ti...

2019-04-24 20:19:13 630 1

原创 归并排序求逆序对

归并排序求逆序对

2019-04-17 15:30:20 925 1

空空如也

空空如也

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

TA关注的人

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