摘要:
单调栈 视频连接 #include<iostream> using namespace std; const int N = 100010; int stk[N], tt; int main() { int n; cin >> n; while (n--) { int x; scanf("%d", 阅读全文
posted @ 2024-07-25 19:21
某朝
阅读(20)
评论(0)
推荐(0)
摘要:
题目大意 实现一个单链表,链表初始为空,支持三种操作: (1) 向链表头插入一个数; (2) 删除第k个插入的数后面的数; (3) 在第k个插入的数后插入一个数 现在要对该链表进行M次操作,进行完所有操作后,从头到尾输出整个链表。 注意 : 题目中第k个插入的数并不是指当前链表的第k个数。例如操作过 阅读全文
posted @ 2024-07-25 16:36
某朝
阅读(29)
评论(0)
推荐(0)
摘要:
acwing803 我的代码 #include <iostream> #include <vector> #include <algorithm> using namespace std; typedef pair<int, int> PII; void merge(vector<PII>& seg 阅读全文
posted @ 2024-07-25 12:31
某朝
阅读(11)
评论(0)
推荐(0)