随笔分类 - 数据结构 STL
摘要:Hints of sd0061 Problem Description sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no
阅读全文
摘要:1821 最优集合 1821 最优集合 1821 最优集合 一个集合S的优美值定义为:最大的x,满足对于任意i∈[1,x],都存在一个S的子集S',使得S'中元素之和为i。 给定n个集合,对于每一次询问,指定一个集合S1和一个集合S2,以及一个数k,要求选择一个S2的子集S3(|S3|<=k),使得
阅读全文
摘要:F. PolandBall and Gifts It's Christmas time! PolandBall and his friends will be giving themselves gifts. There are n Balls overall. Each Ball has some
阅读全文
摘要:1001: 传递要求 a->b->c && a->c 我的做法就是利用bitset预处理出x点可达点集,与可达到x点的点集 那么如何检验这个图是否传递;枚举完b和,枚举可达b点集中的点x,那么点x可达点集要包含c点集,这个利用bieset可以快速判断 整个做法就是(n^2) #include<cst
阅读全文
摘要:C. Dancing Lessons There are n people taking dancing lessons. Every person is characterized by his/her dancing skill ai. At the beginning of the lesso
阅读全文
摘要:E. George and Cards George is a cat, so he loves playing very much. Vitaly put n cards in a row in front of George. Each card has one integer written
阅读全文
摘要:Sparse Graph Problem Description In graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H a
阅读全文
摘要:C. Reberland Linguistics First-rate specialists graduate from Berland State Institute of Peace and Friendship. You are one of the most talented studen
阅读全文
摘要: 题意: 给出一棵树,每个边都有一个权值,现在有一个空的集合,两种操作, 1 x吧x节点放到集合中(如果还没放入) 2 x把x节点从集合中拿出来(已放入)。 每次操作后输出最小的边权和,保证这些边可以将这些点连起来。 题解:
阅读全文
摘要:C. Pearls in a RowThere arenpearls in a row. Let's enumerate them with integers from1tonfrom the left to the right. The pearl numberihas the typeai.Le...
阅读全文
摘要:3224: Tyvj 1728 普通平衡树Description您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:1. 插入x数2. 删除x数(若有多个相同的数,因只删除一个)3. 查询x数的排名(若有多个相同的数,因输出最小的排名)4. 查询排名为x的数5. 求x的前驱(...
阅读全文
摘要:昊昊爱运动 II昊昊喜欢运动他N天内会参加M种运动(每种运动用一个[1,m]的整数表示)现在有Q个操作,操作描述如下昊昊把第l天到第r天的运动全部换成了x(x∈[1,m])问昊昊第l天到第r天参加了多少种不同的运动Input输入两个数N,M(1≤N≤105,1≤M≤100);输入N个数ai(ai∈[...
阅读全文
摘要:Difference of ClusteringProblem DescriptionGiven two clustering algorithms, the old and the new, you want to find the difference between their results...
阅读全文
摘要:GT and setAccepts: 35Submissions: 194Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述有NN个集合,每个集合中有A_iAi个数。你要将这NN...
阅读全文
摘要:C. Marina and VasyaMarina loves strings of the same length and Vasya loves when there is a third string, different from the...
阅读全文
摘要:An easy problemTime Limit: 8000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionOne day, a useless calculator was bei...
阅读全文
摘要:B. Finding Team Member time limit per test ...
阅读全文
摘要:1055: [HAOI2008]玩具取名Time Limit: 10 SecMemory Limit: 162 MBSubmit: 1144Solved: 668[Submit][Status][Discuss]Description某人有一套玩具,并想法给玩具命名。首先他选择WING四个字母中的任...
阅读全文
摘要:A. Bear and Elections time limit per test1...
阅读全文
摘要:K-集合Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 2Accepted Submission(s) : 1Font:Times New Roman...
阅读全文

浙公网安备 33010602011771号