- 博客(133)
- 收藏
- 关注
原创 腾讯2021校园招聘-技术研究类和数据分析-第一次笔试20200823
过题情况第一题:100%第二题:100%第三题:100%第四题:100%第五题:100%第一题经典区间dp问题,dp[i][j]代表着从字符串i位置到j位置需要的最小括号匹配数,如果第i个位置和第j个位置的两个括号是匹配的,那么dp[i][j] = dp[i+1][j-1],相当于两边分别往里缩了一个;当i<j时,dp[i][j] = dp[i][k]+dp[k+1][j] ;#include<bits/stdc++.h>using namespace std;
2020-08-23 21:59:24
11675
32
原创 滴滴算法工程师笔试 20200821
过题情况第一题:100%第二题:100%说实话这场笔试题目比较简单,19:50交卷第一题:给定一个整数n,要求给出一个n*n矩阵,这个矩阵满足斐波那契数列,要求矩阵开始位置是最大值预处理出n*n的斐波那契数列数组,然后dfs模拟即可,注意判断边界条件以及已经赋值的数,要用long long。#include<bits/stdc++.h>using namespace std;long long a[100];long long ans[10][10];int n;v
2020-08-21 20:38:28
1797
1
原创 阿里算法工程师笔试——2020.08.03
过题情况第一题:100%第二题:100%说实话这场笔试题目比较简单,25minAK第一题:n个朋友,每个人有金币x,有m个房子,每个房子有舒适度和价格,当前仅当这个人金币数大于房子价格时才能购买,每个人至多买一个房子,每个房子最多被一个人买,求最大舒适度按舒适度从大到小排序,然后二分选择金币刚好>=价格的人进行购买,这里用multiset进行删除操作。#include<bits/stdc++.h>using namespace std;const int maxn=
2020-08-03 20:00:15
5123
10
原创 拼多多算法岗第一场笔试 2020.08.02
过题情况第一题 100%第二题 100%第三题 100%第四题 20%第一题:小模拟#include<bits/stdc++.h>using namespace std;const int maxn=200;int a[maxn];int main(){ int k,n; scanf("%d%d",&k,&n); int flag=0, step=0, ret=0; for(int i=0;i<n;i++){ .
2020-08-02 20:59:15
3469
5
原创 猿辅导笔试第一场2020.08.01
笔试题第一题:给定上课的开始时间和结束时间,求需要几个人可以把这些课完整的都上完。把开始时间和结束时间点拆开 结束时间是-1 开始时间是1 然后sort排序 按节点大小排序 然后节点一样的 把-1的放前面 然后就变成前缀和最大值问题了#include<bits/stdc++.h>using namespace std;const int maxn=4e5+200;struct node{ int x,y;}a[maxn];bool cmp(node a, node b
2020-08-01 21:10:34
2338
4
原创 leetcode 919. Complete Binary Tree Inserter(如何构建一个完全二叉树/C++)
问题描述:A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.Write a data structure CBTInserter that i...
2018-10-10 11:32:34
583
原创 hdu 5790 Prefix(字典树+主席树)
Problem DescriptionAlice gets N strings. Now she has Q questions to ask you. For each question, she wanna know how many different prefix strings between Lth and Rth strings. It's so easy right? So
2016-08-03 16:52:13
1019
1
原创 hdu 4288 Coder(线段树)
CoderTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4993 Accepted Submission(s): 1920Problem Description In mathematics a
2016-06-10 19:25:08
760
原创 hdu 1394 Minimum Inversion Number(线段树)
Minimum Inversion NumberTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16802 Accepted Submission(s): 10219Problem Description
2016-06-10 19:16:38
771
原创 hdu 5317 RGCDQ(dp)
RGCDQTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2618 Accepted Submission(s): 1040Problem DescriptionMr. Hdu is intereste
2016-06-10 19:12:23
496
原创 5710 Digit-Sum(找规律)
Digit-SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 53 Accepted Submission(s): 22Problem DescriptionLet S(N) be digit-
2016-06-10 19:06:09
1754
原创 hdu 5706 GirlCat(dfs)
GirlCatTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 88 Accepted Submission(s): 71Problem DescriptionAs a cute girl, Kotori
2016-06-10 19:02:57
621
原创 hdu 5714 &&2016 百度之星复赛 1003 拍照(排序+思考)
拍照Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 255 Accepted Submission(s): 87Problem Description小明在旅游的路上看到了一条美丽的河,河上有许多船只,
2016-05-30 12:13:26
993
原创 hdu 5448 Marisa’s Cake(计算几何加推公式)
Marisa’s CakeTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 210 Accepted Submission(s): 123Problem DescriptionToday is Mar
2016-05-28 14:59:44
672
原创 hdu 5455 Fang Fang(暴力)
Fang FangTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1294 Accepted Submission(s): 541Problem DescriptionFang Fang says sh
2016-05-28 14:55:17
541
原创 hdu 5461 Largest Point(暴搞)
Largest PointTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1450 Accepted Submission(s): 579Problem DescriptionGiven the seq
2016-05-28 14:52:35
500
原创 hdu 5459 Jesus Is Here(推公式)
Jesus Is HereTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 65535/102400 K (Java/Others)Total Submission(s): 510 Accepted Submission(s): 366Problem DescriptionI've sent Fan
2016-05-28 14:49:43
503
原创 hdu 5690 All X(快速幂)
All XTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1077 Accepted Submission(s): 511Problem DescriptionF(x,m) 代表一个全是由数字x组成的m
2016-05-28 14:47:29
642
原创 hdu 5384 Danganronpa(AC自动机)
DanganronpaTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1154 Accepted Submission(s): 594Problem DescriptionDanganronpa i
2016-05-28 14:43:38
452
原创 hdu 4823 Energy Conversion(水题)
Energy ConversionTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1387 Accepted Submission(s): 539Problem Description 魔法师百小度也
2016-05-28 14:40:29
605
原创 hdu 2590 Building roads(环+贪心)
Building roadsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 121 Accepted Submission(s): 13Problem DescriptionThere is a cir
2016-05-28 14:37:39
451
原创 hdu 5381 The sum of gcd(线段树)
The sum of gcdTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1056 Accepted Submission(s): 465Problem DescriptionYou have an
2016-05-28 14:33:09
480
原创 hdu 5386 Cover(暴搞+队列)
CoverTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1721 Accepted Submission(s): 602Special JudgeProblem DescriptionYou have
2016-05-28 14:28:12
400
原创 poj 2559 Largest Rectangle in a Histogram(单调栈)
Largest Rectangle in a HistogramTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18691 Accepted: 6005DescriptionA histogram is a polygon composed of a se
2016-05-28 14:21:09
505
原创 poj 2771 Guardian of Decency(最大独立集)
Guardian of DecencyTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5397 Accepted: 2268DescriptionFrank N. Stein is a very conservative high-school teach
2016-05-28 14:16:54
505
原创 poj 2541 Binary Witch(状态压缩)
Binary WitchTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1521 Accepted: 558DescriptionOnce upon a time in the silent depths of digital forests there
2016-05-28 14:14:01
556
原创 hdu 5444 Elven Postman(二叉搜索树)
Elven PostmanTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1223 Accepted Submission(s): 694Problem DescriptionElves are v
2016-05-03 22:24:55
3404
原创 hdu 5446 Unknown Treasure(lucas+中国剩余定理)
Unknown TreasureTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1992 Accepted Submission(s): 732Problem DescriptionOn the w
2016-05-03 22:21:08
3614
原创 第100篇:ACM感想
不知不觉入ACM已经两年了,到目前为止还没有打过区域赛,北京各校的校赛和新生赛倒是参加了不少,排名也是差强人意,今年夏天就要为区域赛做准备了,这段时间也是疯狂的刷前几年的网络赛和区域赛的题目。回首这两年,做的题数大概突破了1000+,但是这也的确说明不了什么,或许,就是你以为自己尽了最大的努力弄ACM,实际上却还远远没有,还有很多发挥的空间没有去挖掘,无论结果如何,我都欣然接受,毕竟我心里深深
2016-05-02 23:53:20
1065
1
原创 hdu 5443 The Water Problem(求区间最值+ST表)
The Water ProblemTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1196 Accepted Submission(s): 942Problem DescriptionIn Land
2016-05-02 20:34:42
1130
原创 hdu 5438 Ponds(拓扑排序+dfs)
PondsTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2918 Accepted Submission(s): 917Problem DescriptionBetty owns a lot of
2016-05-02 20:33:05
1698
原创 hdu 5441 Travel(带权并查集)
Problem DescriptionJack likes to travel around the world, but he doesn’t like to wait. Now, he is traveling in the Undirected Kingdom. There are n cities and m bidirectional roads connecting t
2016-05-02 20:23:04
2775
1
原创 hdu 5311 Hidden String(dfs)
Hidden StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1801 Accepted Submission(s): 642Problem DescriptionToday is th
2016-05-02 17:35:02
4040
原创 hdu 5339 Untitled (dfs)
UntitledTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1294 Accepted Submission(s): 759Problem DescriptionThere is an intege
2016-05-02 17:33:31
1804
原创 hdu 5437 Alisha’s Party(优先队列)
Alisha’s PartyTime Limit: 3000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 4167 Accepted Submission(s): 1069Problem DescriptionPrincess
2016-05-02 17:31:05
8105
原创 hdu 5410 CRB and His Birthday(01+多重背包 dp)
CRB and His BirthdayTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1188 Accepted Submission(s): 591Problem DescriptionToday
2016-05-02 14:41:07
2832
原创 hdu 5414 CRB and String(字符串模拟)
CRB and StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1658 Accepted Submission(s): 539Problem DescriptionCRB has two
2016-05-02 14:32:34
6906
原创 ZOJ 2112 Dynamic Rankings(动态求区间第k大+整体二分)
Dynamic RankingsTime Limit: 10 Seconds Memory Limit: 32768 KBThe Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply fi
2016-05-01 20:37:31
4640
原创 poj 2739 Sum of Consecutive Prime Numbers(尺取+筛素数)
Sum of Consecutive Prime NumbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 22582 Accepted: 12350DescriptionSome positive integers can be represente
2016-05-01 20:33:22
3323
原创 poj 3320 Jessica's Reading Problem(尺取)
Jessica's Reading ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9760 Accepted: 3210DescriptionJessica's a very lovely girl wooed by lots of boy
2016-05-01 20:31:21
826
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人