
stl
墨墨墨小白
慵懒的小白君٩(๑`н´๑)۶
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
vector 的输入输出和结构体自定义排序模板(蒟蒻版)
#include<bits/stdc++.h> using namespace std; struct node { int id; }b[10]; vector<node>a; bool cmp(const node a,const node b) { return a.id>b.id; } int main() { for(int i=0;i<5;i+...原创 2018-11-27 21:30:29 · 316 阅读 · 2 评论 -
合并果子(队列和优先队列)
有两种方法 一种是队列 一种是优先队列(priority_queue) 这两种方法的区别是队列定义时没有自动排序 所以只能在输入的时候按顺序才能输出正解(所以队列的方法不被认为是正解) 下面是代码 比较简便: #include<bits/stdc++.h> using namespace std; queue<int>q; int main() { int n,x;...原创 2018-12-07 01:06:07 · 523 阅读 · 0 评论