题目链接: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
//判断输入的数字是否可以构成一棵树 //前一个数是后一个的父亲节点,树的定义:有且仅有一个总根节点,根节点到其他任意节点路径唯一,每个节点只能被其根指向,入度只能为1 #include <stdio.h> #include <string.h> #define maxn 10002 int in[ ...
分类:
其他好文 时间:
2020-07-27 09:18:05
阅读次数:
68
滑动窗口 Problem:https://ac.nowcoder.com/acm/problem/50528 题解: 单调队列裸题。 单调队列维护区间最值,对于单调队列有两种操作: 插入,新元素从队尾插入后会破坏队列中单调性则删除队尾元素,知道找到插入后不会破坏单调性的位置为止,再将其插入队列。 获 ...
分类:
其他好文 时间:
2020-07-26 19:38:38
阅读次数:
70
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6756 CSDN食用链接:https://blog.csdn.net/qq_43906000/article/details/107590312 Problem Description Given an ...
分类:
其他好文 时间:
2020-07-26 15:58:23
阅读次数:
139
A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between ...
分类:
其他好文 时间:
2020-07-26 02:05:42
阅读次数:
102
题目链接:https://ac.nowcoder.com/acm/contest/5670/D 分析: 将整个数组放在一个圆上去看,可以发现,\(Invert\) 操作只相当于把圆旋转了一个单位,而数字之间的相对位置并没有发生变化,并不会有影响排序的进行。因此要想排序,只有依靠 \(Drop-2\) ...
分类:
其他好文 时间:
2020-07-26 02:00:01
阅读次数:
69
P3489:https://www.luogu.com.cn/problem/P3489 bzoj1139:https://darkbzoj.tk/problem/1139 dij 分层图最短路+状态压缩,把状态大小上限 $2p-1$ 写成了 $2-1$,然后debug了将近一晚上。。。 由于 \( ...
分类:
其他好文 时间:
2020-07-26 01:58:57
阅读次数:
90
A. Poker (Hdu ????) 题目大意 给定n个币,每次投至少m个,当投$x$个时,给回$\lfloor x \times (1 - p %) \rfloor$。问你最多能投多少次。 解题思路 很显然每次投$m$元是最优的,因为但凡投$m+1$元,给回的钱数不可能会增加二,要不不变要不减少 ...
分类:
其他好文 时间:
2020-07-26 01:12:43
阅读次数:
213
http://acm.hdu.edu.cn/showproblem.php?pid=6754 题意: 字符串由小写字母构成 求 长度为N的 回文子串数量最少的 字符串的个数 思路: 长度为1的串 回文子串最少1个 形式:a 长度为2的串 回文子串最少2个 形式:aa / ab 长度为3的串 回文子串 ...
分类:
其他好文 时间:
2020-07-26 00:24:53
阅读次数:
55