![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
栈和队列
文章平均质量分 56
为啥不能重名
这个作者很懒,什么都没留下…
展开
-
Problem B
题目描述You are given a list of integers x1, x2, . . . , xn and a number k. It is guaranteed that each i from 1 to k appears in thelist at least once.Find the lexicographically smallest subsequence of x that contains each integer from 1 to k exactly once.输原创 2021-01-25 11:13:16 · 108 阅读 · 0 评论 -
数据结构实训课题--(停车场模拟)
#include <iostream>#include <bits/stdc++.h>#include <string.h>#include <set>#include <list>#include <map>#include <algorithm>#include <stdio.h>#include <math.h>#include <bitset>#include原创 2021-01-19 16:36:22 · 534 阅读 · 0 评论 -
E - Hello XTCPC
You have a string of lowercase letters.You need to find as many sequence “xtCpc” as possible.But letters in the same position can only be used once。InputThe input file contains two lines.The first line is an integer n show the length of string.(1≤n≤2×10原创 2020-07-28 08:26:02 · 227 阅读 · 0 评论 -
数据结构实验之栈与队列二:一般算术表达式转换成后缀式
Description对于一个基于二元运算符的算术表达式,转换为对应的后缀式,并输出之。Input输入一个算术表达式,以‘#’字符作为结束标志。Output输出该表达式转换所得到的后缀式。SampleInputa*b+(c-d/e)*f#Outputabcde/-f+Hint中缀表达式转后缀表达式的方法:1.遇到操作数:直接输出(添加到后缀表达式中)2.栈为空时,遇到运算符,直接入栈3.遇到左括号:将其入栈4.遇到右括号:执行出栈操作,并将出栈的元素输出,直到弹出栈的是左括号原创 2020-07-27 09:21:19 · 178 阅读 · 0 评论