码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
数据结构-模板-并查集(路径压缩+按秩合并)
所谓并查集就是将编号为1~n的n个对象划分为不相交集合,在每个集合中,选择其中的某个元素代表所在集合在这个集合中,并查集的操作有初始化,合并,查找。 #include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_std ...
分类:其他好文   时间:2021-04-20 15:31:02    阅读次数:0
算法-初次尝试-模拟退火
我对模拟退火的初步理解,还没深入了解过。这里只是用模拟退火求函数极值。 题目:https://vjudge.net/problem/HDU-2899 #include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_std ...
分类:编程语言   时间:2021-04-20 15:29:36    阅读次数:0
2017省赛A第4题
参考文章 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int X[] = {0, -1, 1, 0, 0}; 5 int Y[] = {0, 0, 0, -1, 1}; 6 7 bool vis[10][10]; 8 int res = ...
分类:其他好文   时间:2021-04-20 14:10:10    阅读次数:0
Solution -「YunoOI 2017」由乃的 OJ
Description Link. 起床困难综合症 上树。 Solution 线段树维护,树剖上树。 具体题解有空再写,我要去睡觉了。 #include<bits/stdc++.h> typedef unsigned long long ULL; struct node { ULL one,zero ...
分类:其他好文   时间:2021-04-19 15:09:51    阅读次数:0
CSAPP
只能用指定字符,实现函数功能 /* * CS:APP Data Lab * * <Please put your name and userid here> * * bits.c - Source file with your solutions to the Lab. * This is the ...
分类:移动开发   时间:2021-04-15 12:42:58    阅读次数:0
sw抄来的主席树
//本模板是离散后对权值建树 #include<bits/stdc++.h> #define mid (l+r>>1) using namespace std; const int N=2e5+10; struct TR { int sum,lo,ro; }tr[N<<5]; int tr_cnt; ...
分类:其他好文   时间:2021-04-15 12:28:09    阅读次数:0
Codeforces Round #713 (Div. 3) 题解
本场链接:Codeforces Round #713 (Div. 3) A. Spy Detected! #include <bits/stdc++.h> using namespace std; typedef long long ll; #define forn(i,x,n) for(int i ...
分类:其他好文   时间:2021-04-12 12:42:16    阅读次数:0
LCA — 欧拉序 + ST表
LCA — 欧拉序+ST表 \(O(n\log n)\) 预处理,\(O(1)\) 询问?。 \(lca(x,y)=\) 欧拉序中最早出现的 \(x\) 和 \(y\) 中间深度最浅的点。 Luogu P3379 #include <bits/stdc++.h> using namespace st ...
分类:其他好文   时间:2021-04-12 12:13:56    阅读次数:0
[USACO06FEB] Treats for the Cows G/S
很显然的区间dp 当我们卖掉一个物品时,可以看为给延后卖的商品都加价 $ dp [ i ] [ j ] $ 表示卖掉i~j的最大收益 #include<bits/stdc++.h> using namespace std; int n; int v[2021]; int dp[2021][2021] ...
分类:其他好文   时间:2021-04-12 12:03:32    阅读次数:0
天梯赛 L3-016 二叉搜索树的结构
#include <bits/stdc++.h> using namespace std; template<class ElemType> struct BiNode { ElemType data; BiNode<ElemType> *lchild, *rchild; int disToLeft ...
分类:其他好文   时间:2021-04-10 13:18:26    阅读次数:0
3873条   上一页 1 ... 5 6 7 8 9 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!