摘要: 传送门 dijkstra 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int INF=0x3f3f3f3f; 4 const int maxn=1200; 5 6 int dist[maxn],g[maxn][maxn],N; 7 阅读全文
posted @ 2018-11-19 18:41 柠檬加糖 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 传送门 结点中的l和r表示层数,maxx表示这层最多还剩下多少宽度。根据公告的宽度取找到可以放的那一层 找到后返回层数,并修改maxx 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxn= 200000+5; 4 int 阅读全文
posted @ 2018-11-19 14:42 柠檬加糖 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 传送门 有更新单个学生成绩和查询某个区间内学生成绩最大值两种操作 线段树代码 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int maxn=200000+5; 4 using namespace std; 5 int a[maxn 阅读全文
posted @ 2018-11-19 00:05 柠檬加糖 阅读(156) 评论(0) 推荐(0) 编辑