摘要: (水) 题目大意 给出两个非递减的数列,找出总数列的中位数。如果合并后数组长度为偶数则输出中间两个数中左边的那个。 思路 双指针。 注意为了防止数组越界,手动在a和b数组最后一个元素后加上一个很大的数INF。 样例测试数据: 2 1 2 7 3 4 5 6 7 8 9 AC代码 阅读全文
posted @ 2020-05-13 16:12 \0.0/ 阅读(91) 评论(0) 推荐(0) 编辑
摘要: (水) tips 1 cmp比较函数,若是字符串比较,一定要写成`return strcmp(char , char ) (/ include include include include using namespace std; struct student { char id[8]; char 阅读全文
posted @ 2020-05-13 10:35 \0.0/ 阅读(113) 评论(0) 推荐(0) 编辑