摘要: 堆排序#includeusing namespace std;const int MAXN=1005;int n,a[MAXN],f[MAXN],t,siz;inline void pus(int x){ f[++t]=x; int now=t;... 阅读全文
posted @ 2017-12-17 20:19 Monster_Qi 阅读(141) 评论(0) 推荐(0) 编辑
摘要: #include#include#includeusing namespace std;int cnt,st,ed,s,t,w,h[10005],dis[10005],stack[10005];int q[40005];struct Node{ int... 阅读全文
posted @ 2017-12-17 20:18 Monster_Qi 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题目描述有两个长度都是N的序列A和B,在A和B中各取一个数相加可以得到N^2个和,求这N^2个和中最小的N个。输入输出格式输入格式: 第一行一个正整数N;第二行N个整数Ai,满足Aiusing namespace std;const int MAXN=100... 阅读全文
posted @ 2017-12-17 18:50 Monster_Qi 阅读(120) 评论(0) 推荐(0) 编辑