摘要: "题目描述" 思路 思路 阅读全文
posted @ 2019-09-21 16:53 cabbage-leaf 阅读(143) 评论(0) 推荐(0) 编辑
摘要: more +num 从第 num 行开始显示 空格键 翻滚下一屏 enter 翻滚一行 ctrl+b 翻滚上一屏 = 显示行号 q 退出 阅读全文
posted @ 2019-09-21 15:47 cabbage-leaf 阅读(112) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 代码 c++ include include include long long n, avg, tot, arr[1000005], ans; inline long long int read() { long long s = 0, f = 1; char ch = get 阅读全文
posted @ 2019-09-21 14:58 cabbage-leaf 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 1. 排一次序后就可以得到答案 2. 排一次序只能得到这次的最优选择,需要多次排序,得到全部的最优答案 阅读全文
posted @ 2019-09-21 13:05 cabbage-leaf 阅读(89) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 代码 c++ include int n, ans, pre; bool rec[1000006]; struct Node { int a, b; } arr[1000006], tmp; void qsort(int L, int R) { int l = L, r = R; 阅读全文
posted @ 2019-09-21 12:56 cabbage-leaf 阅读(151) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 代码 c++ include int n, ans, pre; struct Node { int a, b; } arr[1000006], tmp; inline int read() { int s = 0, f = 1; char ch = getchar(); whil 阅读全文
posted @ 2019-09-21 11:00 cabbage-leaf 阅读(130) 评论(0) 推荐(0) 编辑
摘要: "题目描述" 思路 代码 c++ include include include using namespace std; int n, arr[50005], save[50005]; int tmp[50005]; long long maxx, minn; const int inf = 0x 阅读全文
posted @ 2019-09-21 10:10 cabbage-leaf 阅读(247) 评论(0) 推荐(0) 编辑