Princess CJB has lived almost her entire life in the isolated town of Ertona, where CJB uses her unique ability to recognize where crystals of materia ...
分类:
其他好文 时间:
2020-07-28 22:14:42
阅读次数:
73
HDU - 1114 题目翻译: 在acm能够做任何事情之前, 必须编制预算并获得必要的财政支持。这一行动的主要收入来自IBM。这个想法其实很简单,每当一些会员有一点小钱时,他就会把所有的硬币都扔到小猪存钱罐里。这个过程是不可逆转的, 除非打破猪,否则硬币不能拿出来。过了足够长的时间, 存钱罐里应该 ...
分类:
其他好文 时间:
2020-07-28 22:08:26
阅读次数:
76
HDU - 4734 题目大致意思:我们定义十进制数x的权值为f(x) = a(n)*2^(n-1)+a(n-1)*2(n-2)+...a(2)*2+a(1)*1,a(i)表示十进制数x中第i位的数字。 题目给出a,b,求出0~b有多少个不大于f(a)的数。 这个f(x)计算就和数位计算是一样的,就 ...
分类:
其他好文 时间:
2020-07-28 22:05:32
阅读次数:
69
prim 先将一个点加入集合中,维护一个dis数组,表示该点距集合中的点的最小距离,每次选取dis的最小值,并把那个点加入集合,更新dis。 可以用优先队列优化 kruskal 把所有的边按边权从小到大排序,利用并查集维护集合关系,对于每条边,若两点不在同一集合,则把两点连接。 Boruvka 假设 ...
分类:
其他好文 时间:
2020-07-27 16:08:42
阅读次数:
75
Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number ...
分类:
其他好文 时间:
2020-07-27 09:42:59
阅读次数:
80
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 题意 给出一个 $n$ 点 $m$ 边的带权无向图,找出结点 $1$ 到结点 $n$ 的路径最小权。($n \le 100, m \le 10000$) 题解 $n$ 的范围较小,可以用 $O_{ ...
分类:
其他好文 时间:
2020-07-27 09:38:16
阅读次数:
51
When you go shopping, you can search in repository for avalible merchandises by the computers and internet. First you give the search system a name ab ...
分类:
其他好文 时间:
2020-07-27 09:29:30
阅读次数:
82
##题面 Problem Description There are n cities and m bidirectional roads in Byteland. These cities are labeled by 1,2,…,n, the brightness of the i-th cit ...
分类:
其他好文 时间:
2020-07-27 09:21:33
阅读次数:
88
//判断输入的数字是否可以构成一棵树 //前一个数是后一个的父亲节点,树的定义:有且仅有一个总根节点,根节点到其他任意节点路径唯一,每个节点只能被其根指向,入度只能为1 #include <stdio.h> #include <string.h> #define maxn 10002 int in[ ...
分类:
其他好文 时间:
2020-07-27 09:18:05
阅读次数:
68
题意:一个人有两个字符串A和B,两个字符串具有相同的长度n$(|A| = |B| = n)$,包含前20个小写字符('a'到't')。每一次操作,这个人可以选择A字符串中字符相同的字母,然后从中选择一些位置,并把这些位置的字母变大。求字符串A变到字符串B的最少操作次数。 分析:我们可以贪心地进行操作 ...
分类:
其他好文 时间:
2020-07-26 23:12:06
阅读次数:
78