STL
cherish__lin
I want to be better!
展开
-
D. Colored Boots(STL)
There arennleft boots andnnright boots. Each boot has a color which is denoted as a lowercase Latin letter or a question mark ('?'). Thus, you are given two stringsllandrr, both of lengthnn. T...原创 2019-03-22 09:31:02 · 181 阅读 · 0 评论 -
7-12 单身狗 (25 分)(set用法)
“单身狗”是中文对于单身人士的一种爱称。本题请你从上万人的大型派对中找出落单的客人,以便给予特殊关爱。输入格式:输入第一行给出一个正整数 N(≤50000),是已知夫妻/伴侣的对数;随后 N 行,每行给出一对夫妻/伴侣——为方便起见,每人对应一个 ID 号,为 5 位数字(从 00000 到 99999),ID 间以空格分隔;之后给出一个正整数 M(≤10000),为参加派对的总人数;随后...原创 2019-03-29 16:58:15 · 2067 阅读 · 1 评论 -
C. Playlist(最小堆)
You have a playlist consisting of原创 2019-03-29 19:21:49 · 224 阅读 · 0 评论 -
E. Minimum Array(multiset暴力)
You are given two arraysaaandbb, both of lengthnn. All elements of both arrays are from00ton−1n−1.You can reorder elements of the arraybb(if you want, you may leave the order of elements as...原创 2019-04-29 22:26:31 · 429 阅读 · 2 评论 -
E - Equal Numbers Gym - 101612E
题目链接:http://codeforces.com/gym/101612/attachments题解:给出来n个数,进行i次操作使得进行i次操作后剩得的不同数字个数最少,注意这n次操作是最优值,这n次操作可能不连续!!!那么我们就想可以在原数组内变,如果一个数是另一个数的倍数,那么将另一个数变为该数,不同值就减少1,注意贪心从个数最少的数开始变。还有就是统一变成这n个数的最小公倍数(默认...原创 2019-05-08 22:05:18 · 208 阅读 · 0 评论