上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 97 下一页
摘要: Problem Description A subsequence of length |x| of string s = s1s2... s|s| (where |s| is the length of string s) is a string x ... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(38) 评论(0) 推荐(0)
摘要: 题目描述 在大学期间,经常需要租借教室。大到院系举办活动,小到学习小组自习讨论,都需要向学校申请借教室。教室的大小功能不同,借教室人的身份不同,借教室的手续也不一样。 面对海量租借教室的信息,我们自然希望编程解决这个问题。 我们需要处理接下来n天的借... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(49) 评论(0) 推荐(0)
摘要: 【概述】 前缀和是一种及其优秀的线性结构,也是一种重要的思想,能极大的降低区间查询的时间复杂度。 前缀和又分为一维前缀和、二维前缀和,其与差分数组密切相关,关于差分数组:点击这里 【一维前缀和】 假设有一串长度为 n 的序列,再给出 m 次询问,每次询问给出 ... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(66) 评论(0) 推荐(0)
摘要: 【实现类】 const int maxSize=100;template class seqStack{public: seqStack(); ~seqStack(); void push(T x);//入栈 T pop();//出栈... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(56) 评论(0) 推荐(0)
摘要: 【实现类】 template struct Node{ T data; Node *next;};template class linkStack{public: linkStack(); ~linkStack(); void p... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(25) 评论(0) 推荐(0)
摘要: 【实现类】 const int maxSize=100;template class seqStack{public: seqStack(); ~seqStack(); void push(T x);//入栈 T pop();//出栈... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(41) 评论(0) 推荐(0)
摘要: 【概述】 栈(Stack)是一种特殊的线性表,只能在某一端插入和删除的特殊线性表。它按照后进先出的原则存储数据,先进入的数据被压入栈底,最后的数据在栈顶。 由于栈满足先进后出,后进先出的性质,因此也被称为先进后出表(FILO)或后进先出表(LIFO) 当栈中元... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(270) 评论(0) 推荐(0)
摘要: Problem Description A rook is a piece used in the game of chess which is played on a board of square grids. A rook can only mov... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(88) 评论(0) 推荐(0)
摘要: Problem Description As I am fond of making easier problems, I discovered a problem. Actually, the problem is 'how can you make ... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(33) 评论(0) 推荐(0)
摘要: 【概念】 1.组合 从 n 个元素的集合 S 中,无序的选出 r 个元素,叫做 S 的一个 r 组合。 如果两个组合中,至少有一个元素不同,它们就被认为是不同的组合。 2.不可重组合数 所有不同组合的个数,叫做组合数,记作: 或 由于每一种组合都可以扩展到 ... 阅读全文
posted @ 2022-09-20 22:57 老程序员111 阅读(1178) 评论(0) 推荐(0)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 97 下一页