![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
STL
zadarmo_
这个作者很懒,什么都没留下…
展开
-
1032 Sharing (25分)——甲级(链表、map映射)
Description: To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix....原创 2019-12-16 20:54:11 · 93 阅读 · 0 评论 -
HDU1206 Ignatius and the Princess I(BFS+优先队列)
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166’s castle. The castle is a large labyrinth. ...原创 2019-10-13 15:16:01 · 223 阅读 · 0 评论 -
1118 Birds in Forest (25 分)——甲级(并查集+set)
Some scientists took pictures of thousands of birds in a forest. Assume that all the birds appear in the same picture belong to the same tree. You are supposed to help the scientists to count the maxi...原创 2019-08-19 15:55:53 · 145 阅读 · 0 评论 -
1154 Vertex Coloring (25 分)——甲级(set)
A proper vertex coloring is a labeling of the graph’s vertices with colors such that no two vertices sharing the same edge have the same color. A coloring using at most k colors is called a (proper) k...原创 2019-08-11 17:39:12 · 151 阅读 · 0 评论 -
11-散列3 QQ帐户的申请与登陆 (25 分)(哈希/map)
实现QQ新帐户申请和老帐户登陆的简化版功能。最大挑战是:据说现在的QQ号码已经有10位数了。 输入格式: 输入首先给出一个正整数N(≤10 5 ),随后给出N行指令。每行指令的格式为:“命令符(空格)QQ号码(空格)密码”。其中命令符为“N”(代表New)时表示要新申请一个QQ号,后面是新帐户的号码和密码;命令符为“L”(代表Login)时表示是老帐户登陆,后面是登陆信息。QQ号码为一个不...原创 2019-08-21 15:26:56 · 1167 阅读 · 3 评论 -
11-散列4 Hashing - Hard Version (30 分)(哈希+拓扑排序+优先队列)
Given a hash table of size N, we can define a hash function H(x)=x%N. Suppose that the linear probing is used to solve collisions, we can easily obtain the status of the hash table with a given sequen...原创 2019-08-22 20:59:11 · 331 阅读 · 0 评论 -
1034 Head of a Gang (30 分)——甲级(连通分量+map)
One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a relation is defined to be t...原创 2019-08-27 12:40:01 · 109 阅读 · 0 评论 -
1087 All Roads Lead to Rome (30 分)——甲级(Dijkstra复杂变形+记录路径+map)
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness. Input Specification: Each in...原创 2019-09-01 16:27:13 · 238 阅读 · 0 评论 -
1111 Online Map (30 分)——甲级(2次Dijkstra+记录路径+vector)
Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is g...原创 2019-09-02 19:37:03 · 123 阅读 · 0 评论