ICPC-数据结构
文章平均质量分 85
有关数据结构的题解
海岛Blog
专注于程序设计及其竞赛,专注于集成电路EDA设计
展开
-
UVA394 LA5311 POJ1557 Mapmaker【数据结构+序列处理】
MapmakerTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 259 Accepted: 152DescriptionThe Cybersoft Computer Company (a leader in programming languages) has hired you to work on a new programming language named A–. Your task is to work on the原创 2021-04-27 18:59:04 · 185 阅读 · 0 评论 -
UVA13017 LA7274 Canvas Painting【哈夫曼编码】
After last year’s success, Samuel W. E. R. Craft’s fame continues to grow and now he has funds for all kinds of projects that cross his mind. His newest idea involves creating arrays of canvasses with color patterns having no repeated colors. &原创 2021-04-15 13:50:18 · 187 阅读 · 0 评论 -
POJ1521 LA2088 HDU1053 ZOJ1117 Entropy【哈夫曼编码】
EntropyTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14093 Accepted: 4857DescriptionAn entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with “wasted” or “extra” information removed. I原创 2021-04-12 04:26:20 · 427 阅读 · 0 评论 -
CodeForces - 612C Replace To Make Regular Bracket Sequence【堆栈】
C. Replace To Make Regular Bracket Sequencetime limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard outputYou are given string s consists of opening and closing brackets of four kinds <>, {}, [], (). The原创 2021-02-03 22:31:33 · 295 阅读 · 0 评论 -
HDU2527 Safe Or Unsafe【哈夫曼编码】
Safe Or UnsafeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5800 Accepted Submission(s): 2343Problem DescriptionJavac++ 一天在看计算机的书籍的时候,看到了一个有趣的东西!每一串字符都可以被编码成一些数字来储存信息,但是不同的编码方式得到的储存空间是不一样的!并且原创 2021-01-13 06:00:13 · 395 阅读 · 0 评论 -
HDU3791 二叉搜索树【二叉搜索树】
二叉搜索树Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9645 Accepted Submission(s): 4265Problem Description判断两序列是否为同一二叉搜索树序列Input开始一个数n,(1<=n<=20) 表示有n个需要判断,n= 0 的时候输入结束。接下去一行是一个序列,序列长度小原创 2020-08-17 17:06:07 · 376 阅读 · 0 评论 -
UVA10701 Pre, in and post【二叉树遍历】
A common problem in data structures is to determine the traversal of a binary tree. There are three classic ways to do it:• Pre-order: You must visit in sequence the root, left subtree and the right ...原创 2020-03-07 02:33:40 · 349 阅读 · 0 评论 -
CF1278D Segment Tree【并查集+排序】
CF1278D. Segment Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs the name of the task implies, you are asked to do some work with segm...原创 2020-02-20 18:47:53 · 408 阅读 · 0 评论 -
UVA10895 Matrix Transpose【数据结构】
A matrix is a rectangular array of elements, most commonly numbers. A matrix with m rows and n columns is said to be an m-by-n matrix. For example,is a 4-by-3 matrix of integers. &n...原创 2019-05-13 22:08:09 · 335 阅读 · 0 评论 -
UVA245 WF5184 POJ1885 Uncompress【文本】
UncompressTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 976 Accepted: 337DescriptionA simple scheme for creating a compressed version of a text file can be used for files which conta...原创 2019-04-13 20:52:40 · 461 阅读 · 0 评论 -
POJ2082 ZOJ2422 Terrible Sets【单调堆栈】
Terrible SetsDescriptionLet N be the set of all natural numbers {0 , 1 , 2 , . . . }, and R be the set of all real numbers. wi, hi for i = 1 . . . n are some elements in N, and w0 = 0.Define set B ...原创 2018-12-22 00:08:48 · 325 阅读 · 1 评论 -
POJ1250 ZOJ1405 UVALive2538 Tanning Salon【数据结构】
Tanning SalonTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8693 Accepted: 4650DescriptionTan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a custom...原创 2018-07-01 11:03:23 · 417 阅读 · 1 评论 -
HDU1276 士兵队列训练问题【模拟+array+vector+list】
士兵队列训练问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11849 Accepted Submission(s): 5194Problem Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行...原创 2018-06-30 20:44:24 · 1197 阅读 · 1 评论 -
POJ3250 Bad Hair Day【单调递减队列+堆栈】
Bad Hair DayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 20834 Accepted: 7120DescriptionSome of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-con...原创 2018-04-04 18:59:53 · 498 阅读 · 0 评论 -
POJ2255 ZOJ1944 UVA536 Tree Recovery【二叉树遍历】
Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 16156 Accepted: 9954DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing ran...原创 2018-03-29 08:51:29 · 487 阅读 · 0 评论 -
AOJ0028 Mode Value【出现次数最多+map+vector+水题】
Mode Value Aizu - 0028 Your task is to write a program which reads a sequence of integers and prints mode values of the sequence. The mode value is the element which occurs most frequently原创 2018-01-06 09:13:17 · 960 阅读 · 5 评论 -
UVA673 Parentheses Balance【堆栈+输入流】
You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a) if it is the empty string(b) if A and B are correct, AB is correct,(c) if A is correct, (A...原创 2017-07-26 21:30:21 · 989 阅读 · 0 评论 -
UVA10935 Throwing cards away I【模拟+queue+循环队列】
Given is an ordered deck of n cards numbered 1to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: Thr...原创 2018-01-20 02:46:00 · 1989 阅读 · 0 评论