码迷,mamicode.com
首页 >  
搜索关键字:quickfix cpp    ( 13195个结果
带边数的无向连通图计数
就是求 \(n\) 个点 \(m\) 条边的带标号无向连通图个数。 首先可以用最暴力的 \(O(n^6)\) 做法,直接按城市规划一题的容斥 DP 做法, 记 \(f_{n,m}\) 表示答案,可以枚举 $1$ 号点所在块的情况容斥计算。 \(O(n^4)\) 做法是一个有意思的斯特林反演。 考虑一 ...
分类:其他好文   时间:2020-06-05 22:44:04    阅读次数:137
Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!
题目链接:http://codeforces.com/contest/1362 简单讲解:https://www.bilibili.com/video/BV15C4y1a7e5 A - Johnny and Ancient Computer // // main.cpp // CF // // Cr ...
分类:其他好文   时间:2020-06-05 12:59:47    阅读次数:52
用Qt在窗口中创建按钮
//mywidget.cpp#include "mywidget.h" #include <QPushButton> MyWidget::MyWidget(QWidget *parent) : QWidget(parent) { #if 1 //创建第一个按钮 QPushButton *btn = ...
分类:其他好文   时间:2020-06-05 00:57:50    阅读次数:144
[Error] 'strlen' was not declared in this scope
在写编译原理实验的时候,遇到了这个错误: [Error] 'strlen' was not declared in this scope 查阅之后得知,<string.h>里没有strlen,<cstring>才有。 #include<cstring> 头头儿加上这行就好了。 ...
分类:其他好文   时间:2020-06-04 19:55:43    阅读次数:74
OpenCV学习2-----使用inpaint函数进行图像修复
安装opencv时,在opencv的安装路径下, sources\samples\cpp\ 路径里面提供了好多经典的例子,很值得学习。 这次的例子是利用inpaint函数进行图像修复。 CV_EXPORTS_W void inpaint( InputArray src, InputArray inp ...
分类:其他好文   时间:2020-06-04 19:42:04    阅读次数:56
实验代码一:用来链表实现单向图
#include <iostream> #include <algorithm> #include "MnistFile.cpp" #include <cmath> using namespace std; const int synapseNums = 800; class Node { publ ...
分类:其他好文   时间:2020-06-03 20:29:31    阅读次数:53
C++ 构造函数
例一(类初始化错误用法): struct thing { char * pn; int m; }; thing amabob = {"wodget", -23}; // valid initialization Stock hot = {"Sukie's Autos, Inc.", 200, 50. ...
分类:编程语言   时间:2020-06-03 13:57:40    阅读次数:83
【Luogu】 P6303 [eJOI2018]AB 串 题解
首先,我们可以发现一个性质: 每一次交换的前缀,必然是该串由相同字母构成的最长前缀,或者空串。 什么意思呢?比如,对于串 \(aaabb\) ,显然选 \(aa\) 没有 \(aaa\) 划算。 接下来,我们要分两种情况讨论: 1. 两串首字母不同 如: \(aaaaabb\) 与 \(bbbbba ...
分类:其他好文   时间:2020-06-03 13:27:30    阅读次数:55
【剑指Offer】面试题41. 数据流中的中位数
题目 如何得到一个数据流中的中位数?如果从数据流中读出奇数个数值,那么中位数就是所有数值排序之后位于中间的数值。如果从数据流中读出偶数个数值,那么中位数就是所有数值排序之后中间两个数的平均值。 例如, [2,3,4] 的中位数是 3 [2,3] 的中位数是 (2 + 3) / 2 = 2.5 设计一 ...
分类:其他好文   时间:2020-06-03 10:50:10    阅读次数:59
mysql导入导出、阿里云内网传输
1、sql文件过大会报异常: (42000): Variable 'sql_mode' can't be set to the value of 'NULL' ................ mysql配置修改:my.cnf: [mysqld] max_allowed_packet = 5000M ...
分类:数据库   时间:2020-06-02 11:04:04    阅读次数:80
13195条   上一页 1 ... 36 37 38 39 40 ... 1320 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!