
STL
文章平均质量分 82
旺旺_碎_冰冰
这个作者很懒,什么都没留下…
展开
-
PAT 1043 Is It a Binary Search Tree(二叉查找树)
1043. Is It a Binary Search Tree (25)A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with k原创 2018-02-03 22:31:01 · 274 阅读 · 0 评论 -
单词数 HDU - 2072(字典树模板题&stl)
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。 Input 有多组数据,每组一行,每组就是一篇小文章。每篇小文章都是由小写字母和空格组成,没有标点符号,遇到#时表示输入结束。 Output 每组只输出一个整...原创 2018-05-15 08:10:49 · 742 阅读 · 0 评论 -
统计难题 HDU - 1251 (字典树模板题&stl&二分)
Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一...原创 2018-05-14 21:40:43 · 251 阅读 · 0 评论 -
最小化价格(STL&二分)
链接:https://www.nowcoder.com/acm/contest/112/A来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld题目描述现有n组人,m个地点,给出每组人的人数,每个地点可容纳的最大人数和选择的价格 要求一种方式,使得每组人都到一个各不相同的地点,最小化选择的价格 ...原创 2018-05-14 20:22:31 · 310 阅读 · 0 评论 -
Web Navigation POJ - 1028(简单的栈应用)
Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be re原创 2018-05-08 21:04:04 · 421 阅读 · 1 评论 -
无题(暴力模拟+技巧)
简单题Description给出一个长度为n的数列,求最少删除几个数可以让剩下的数中 最大值-最小值Input第一行输入两个数n,m(1≤n≤100,0≤m≤100)第二行有n个数(0≤xi≤100)ps:本题为多组输入Output输出所求答案Sample Input 1 3 12 1 4Sample Output 1原创 2018-03-11 15:54:55 · 350 阅读 · 0 评论 -
pat 1053 Path of Equal Weight(树的遍历,dfs)
1053. Path of Equal Weight (30)时间限制 100 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueGiven a non-empty tree with root R, and with weight W原创 2018-02-02 22:48:23 · 226 阅读 · 0 评论 -
PAT 1090 1079 (树的遍历)
1090. Highest Price in Supply Chain (25)A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.Sta原创 2018-02-05 23:40:55 · 231 阅读 · 0 评论 -
PAT 1020(由二叉树的中序和后序,求层序遍历) 1086(由二叉树的中序和先序求后序遍历)
1020. Tree Traversals (25)时间限制 400 ms内存限制 65536 kB代码长度限制 16000 B判题程序 Standard 作者 CHEN, YueSuppose that all the keys in a binary tree are distinct po原创 2018-02-04 22:40:03 · 285 阅读 · 0 评论 -
坦克大战 nyoj 284(优先队列+广搜)
坦克大战 时间限制:1000 ms | 内存限制:65535 KB 难度:3 描述 Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on com...原创 2018-05-30 11:07:54 · 341 阅读 · 0 评论