码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
插入排序
1 #include <iostream> 2 #include <cstdlib> 3 4 #define ARR_SIZE 10 5 6 using namespace std; 7 8 /* 想象一下打牌时发完牌整理的时候,不同的是打牌我们一眼就能看出来这张牌应该插在哪个位置,而插入排序要逐一 ...
分类:编程语言   时间:2021-02-15 12:14:57    阅读次数:0
CF1479B Painting the Array(贪心+DP)
题目大意:给你一个序列,让你提取出一个子序列A,剩余的部分组成子序列B,现定义seg(x)表示把序列x中相邻的相同数合并成一个数后,序列x的长度,分别求seg(A)+seg(B)的最大值和最小值,n=1e5 考场上并没有想出最小值做法,只会最大值的贪心,下考才知道可以DP做?? 最大值的贪心: 维护 ...
分类:其他好文   时间:2021-02-15 12:14:12    阅读次数:0
单源最短路 : 多起点
https://www.acwing.com/problem/content/1139/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:52    阅读次数:0
单源最短路 : 拆点
https://www.acwing.com/problem/content/1133/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:38    阅读次数:0
单源最短路 : 计数
https://www.acwing.com/problem/content/1136/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:其他好文   时间:2021-02-15 11:53:26    阅读次数:0
1481F.AB Tree(树上信息统计+01背包+记录DP路径+Bitset优化时间复杂度)
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+100; const int inf=1e9; int n,m,x; int dep[maxn];//节点在第几层 int num[maxn];//每一层的节点个数 int ...
分类:其他好文   时间:2021-02-15 11:49:10    阅读次数:0
C++ 编译出现的错误
第一种 cannot pass objects of non-trivially-copyable type ‘std::string {aka class std::basic_string<char>} 1、能看到出现的问题在于 string; 2、然后发现是在日志打印位置。 基本可以确定是由于 ...
分类:编程语言   时间:2021-02-10 13:04:35    阅读次数:0
Qt Halcon pro文件的编写
具体如下,注意把 D:\Program Files\MVTec\HALCON-18.11-Progress\bin\x64-win64添加到系统path环境变量中,这样就不用每次把halcon的dll文件复制到exe处了。 #引用的Qt模块 QT += core gui #最低版本 greaterT ...
分类:其他好文   时间:2021-02-10 12:50:45    阅读次数:0
《 Codeforces Round #699 (Div. 2)》
A:把多余的步数删掉即可。 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; const int N = 1e4 + 5; const int M = 1e4 + ...
分类:其他好文   时间:2021-02-09 12:16:59    阅读次数:0
Codeforces Round #700 (Div. 2) C(三分)
二分或三分。 三分:若 \([L,R]\) 有局部最小,取 m1=L+(R-L)/3 、 m2=R-(R-L)/3? 。若 \(a_{m_1}<a_{m_2}\) 则 \([L,m_2-1]\) 必有局部最小,否则 \([m_1+1, R]\) 必有局部最小。 总查询次数至多 \(2\lceil \ ...
分类:其他好文   时间:2021-02-09 12:13:38    阅读次数:0
41627条   上一页 1 ... 34 35 36 37 38 ... 4163 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!