代码: #include <iostream>#include <stack># include <string>#include <stdexcept> using namespace std; class My_Queue{public: My_Queue(){}; ~My_Queue(){}; ...
分类:
编程语言 时间:
2020-07-25 23:40:07
阅读次数:
72
此博客链接: 题目链接:https://leetcode-cn.com/problems/min-stack/submissions/ 设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 push(x) —— 将元素 x 推入栈中。pop() —— 删除栈顶的元素 ...
分类:
其他好文 时间:
2020-07-25 09:45:52
阅读次数:
70
代码: #include <iostream> #include <stack> # include <string> #include <stdexcept> using namespace std; class my_stack { public: my_stack(){}; ~my_stack ...
分类:
编程语言 时间:
2020-07-25 09:28:16
阅读次数:
67
#include <algorithm> #include <string> #include <cstring> #include <vector> #include <map> #include <stack> #include <set> #include <queue> #include < ...
分类:
其他好文 时间:
2020-07-24 23:42:50
阅读次数:
81
美术基础知识中的最后一个模块:色彩关系。三原色:是色彩中不能再分解的基本颜色,能合成出其他的任何颜色。印刷三原色:红(Magenta)黄(Yellow)蓝(Cyan)。红+黄=橙,黄+蓝=绿,红+蓝=紫,是减色模式,相加混合为深灰色,并不能得到黑色,所以在印刷的时候再加上黑色油墨,印刷出来的黑色才是纯黑。光的三原色:红(Red)绿(Green)蓝(Blue),是加色模式,相加混合为白色。色彩的三大
分类:
其他好文 时间:
2020-07-24 21:33:30
阅读次数:
85
#include<stdio.h> #include<stdlib.h> #define STACK_SIZE 500000 class Stack { public: Stack() :m_index(0) { //m_data[STACK_SIZE] = { 0 }; //m_minData[S ...
分类:
其他好文 时间:
2020-07-24 16:53:20
阅读次数:
63
title: NEU_Train_Camp_2020_基础数据结构 date: 2020-07-13 21:13:03 tags: c++ categories: New cover: 基础数据结构 A - Web Navigation POJ-1028 #include <string> #inc ...
分类:
其他好文 时间:
2020-07-24 09:31:06
阅读次数:
74
try (PrintWriter writer = new PrintWriter("student.txt")) { writer.println("姓名\t语文\t数学\t英语\t总分\t"); for (Student s : set) { writer.println(s.getName() ...
分类:
编程语言 时间:
2020-07-24 09:21:17
阅读次数:
128
jQuery 操作CSS用法 1,jQuery addClass() 方法 下面的例子展示如何向不同的元素添加 class 属性。当然,在添加类时,您也可以选取多个元素: 实例$("button").click(function(){ $("h1,h2,p").addClass("blue"); $ ...
分类:
Web程序 时间:
2020-07-23 22:32:13
阅读次数:
78
设计一个支持 push ,pop ,top 操作,并能在常数时间内检索到最小元素的栈。 push(x) —— 将元素 x 推入栈中。pop() —— 删除栈顶的元素。top() —— 获取栈顶元素。getMin() —— 检索栈中的最小元素。 思路:用一个辅助栈的栈顶记录原始栈的最小值,并且两个栈的 ...
分类:
其他好文 时间:
2020-07-22 20:49:40
阅读次数:
77