码迷,mamicode.com
首页 >  
搜索关键字:no space    ( 18273个结果
Redis:两种持久化方式RDB和Aof对比(3)
一、RDB快照 1、概念 默认的持久化方案。 在指定时间间隔内,执行指定次数的写操作,则会将内存中的数据写入到磁盘中。 在指定目录下生成一个dump.rdb文件。 重启会通过加载dump.rdp文件恢复数据。 2、对应配置参数 save <seconds> <changes> eg: save 90 ...
分类:数据库   时间:2020-02-17 15:48:03    阅读次数:105
C++ delete报错解析
C++ delete报错 今天写了如下代码 编译没有报错,但是运行的时候报错了。原因是delete语句。 出错现象: 执行delete语句时,程序卡死。将delete注释掉,程序运行正常,但是发生了内存泄漏。 原因: p作为指向堆内存的指针,指向的是数组的首地址。而我更改了p的地址,如代码中的p++ ...
分类:编程语言   时间:2020-02-17 14:12:17    阅读次数:65
Maze
Pavel loves grid mazes. A grid maze is an n?×?m rectangle maze where each cell is either empty, or is a wall. You can go from one cell to another only ...
分类:其他好文   时间:2020-02-17 12:32:11    阅读次数:113
The Preliminary Contest for ICPC Asia Nanchang 2019
[toc] "Link" Solutions B. Fire Fighting Hero 题意: 思路: dijkstra最短路 先以 hero 为起点 跑一遍 dijkstra 建立 起点 $p$ 并与各 fire fighting point 建立权为 $0$ 的边,跑一遍 dijkstra 第 ...
分类:其他好文   时间:2020-02-17 12:26:51    阅读次数:50
2019CCPC秦皇岛赛区
[toc] "Link" Solutions F. Forest Program 题意: 思路: dfs+栈 判环 设图中环的大小分别为 $c_1$ $c_2$, ..., $c_k$,不属于任何一个环的边数为 $b$,则答案为: $2^b \prod _{i=1}^{k}{(2^{c_i} 1)} ...
分类:其他好文   时间:2020-02-17 12:19:39    阅读次数:187
The Preliminary Contest for ICPC Asia Shanghai 2019
[toc] "Link" Solutions B. Light bulbs 题意: 思路: 差分数组 区间内操作次数为奇数次则灯为打开状态 代码: [View Code] include define ll long long using namespace std; const int mod=1 ...
分类:其他好文   时间:2020-02-17 12:03:40    阅读次数:68
最小生成树
#include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int maxn = 1e5+10;int fa[maxn];struct Edge{ int from; int to; int w;}edg ...
分类:其他好文   时间:2020-02-16 20:35:08    阅读次数:75
1054 The Dominant Color
大致题意就是给出N行M列的元素,找出出现次数最多的元素并输出。 #include<iostream> #include<unordered_map> using namespace std; int main() { unordered_map<int,int> mp; int m,n; cin>> ...
分类:其他好文   时间:2020-02-16 20:17:05    阅读次数:51
3、条件语句
3.1、if语句:1、if "lc" == "lc": n2 = input('>>>') if n2 == "确认": print('hello') else: print('world')else: print('error')2、注意:n1 = "lc" 赋值n1 == 'lc' 比较3、if... ...
分类:其他好文   时间:2020-02-16 15:03:30    阅读次数:75
ASCII🐎排序
#include <iostream>using namespace std;int main(void){ char a, b, c,d; cin >> a >> b >> c; if (a > b) { d = a; a = b; b = d; } if (a> c) { d = a; a = ...
分类:编程语言   时间:2020-02-16 14:43:09    阅读次数:67
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!