码迷,mamicode.com
首页 >  
搜索关键字:turn    ( 27138个结果
算法习题---5.12城市正视图<离散化应用>(Uva221)*****
一:题目 注意: (一)样例输入 (二)样例输出 二:代码实现 (一)思路分析 具体实现: (二)代码实现 ...
分类:编程语言   时间:2019-09-15 18:58:34    阅读次数:98
程序设计与算法(二)算法基础》《第五周 二分》分治
/* MergeSort 归并排序 复杂度: n*log(n) */ #include using namespace std; void MergeSort(int a[], int s, int e, int tmp[]); void Merge(int a[], int s, int m, i... ...
分类:编程语言   时间:2019-09-15 18:57:08    阅读次数:100
CF888E Maximum Subsequence
CF888E Maximum Subsequence 有一种叫做折半搜索的好东西 我们把数列劈成两半,分别搜索,再合并 合并可以排序+二分或者排序+单调性 代码极短 ...
分类:其他好文   时间:2019-09-15 16:48:18    阅读次数:85
删除单链表指定结点出现段错误?
起初我是这么写的: 结果提交时说段错误,改成下面这样就通过了,暂时还不知道为啥。。。 ...
分类:其他好文   时间:2019-09-15 16:47:17    阅读次数:133
Vue中的slot(占坑,预留位置)
Vue中的slot(占坑,预留位置) 文件名:Slots.vue //slot组件 <template> <div class="Slots"> <div class="myd"> 在子组件中不使用slot时SlotChildwithnoslots下的内容不会显示 <SlotChildwithnos ...
分类:其他好文   时间:2019-09-15 14:10:07    阅读次数:132
集合 Subset Sums
题目描述 对于从1到N (1 <= N <= 39) 的连续整数集合,能划分成两个子集合,且保证每个集合的数字和是相等的。举个例子,如果N=3,对于{1,2,3}能划分成两个子集合,每个子集合的所有数字和是相等的: {3} 和 {1,2} 这是唯一一种分法(交换集合位置被认为是同一种划分方案,因此不 ...
分类:其他好文   时间:2019-09-15 12:55:56    阅读次数:97
stringstream用法
1.头文件:#include<sstream> 2.stringstream是C++提供的串流(stream)物件,其中: clear()重置流的标志状态;str()清空流的内存缓冲,重复使用内存消耗不再增加! 在使用stringstream时遇到的问题: 运行结果: 预期b为90,但是出现-858 ...
分类:其他好文   时间:2019-09-15 11:20:36    阅读次数:98
Two sum III-data structure design
Design and implement a TwoSum class. It should support the following operations:add and find. add - Add the number to an internal data structure.find ...
分类:其他好文   时间:2019-09-15 11:15:05    阅读次数:93
湘潭大学oj循环1-5
#include <stdio.h>#include <stdlib.h>int main(){ int b,s,n; int a[101]; A:scanf("%d",&n); s=0; if(n!=0) { for(b=1;b<=n;b++) { scanf("%d",&a[b]); if(a[ ...
分类:其他好文   时间:2019-09-15 11:12:43    阅读次数:140
测试mysql主从配置:实现一主一从读写分离
一、主从介绍Mysql主从又叫Replication、AB复制。简单讲就是A与B两台机器做主从后,在A上写数据,另外一台B也会跟着写数据,实现数据实时同步。二、主从作用1、实时灾备,用于故障切换2、读写分离,提供查询服务3、备份,避免影响业务三、在两台服务器上都按装mysql1、环境准备关闭防火墙以SELINUX[root@yanyinglai~]#systemctlstopfirewalld[r
分类:数据库   时间:2019-09-15 10:44:56    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!