自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(309)
  • 资源 (1)
  • 收藏
  • 关注

转载 mingw windows 安装

http://c.biancheng.net/view/8077.html

2021-12-09 15:16:04 596

原创 jupyter notebook 配置

基础配置:https://blog.csdn.net/u014636245/article/details/83652126screen:https://zhuanlan.zhihu.com/p/138880808无法登录,使用ssh连接:https://zhuanlan.zhihu.com/p/69869583

2021-04-06 02:21:58 296

原创 pytorch reproducibility

torch.manual_seed()random.seed(args.seed)np.random.seed(args.seed)torch.set_deterministic(True)cudnn.benchmark = True当cudnn.benchmark和set_deterministic同时为True,也会搜索最快的卷积算法。pytorch 官方文档:https://pytorch.org/docs/stable/notes/randomness.html知乎:ht

2021-02-20 15:29:28 215

转载 tensorboardx

https://www.cnblogs.com/picassooo/p/14097394.html

2021-02-04 17:13:37 84

原创 pytorch DataLoader

torch.utils.data.Dataloader---dataset---batch_size=1---shuffle=False---sampler=None---batch_sampler=None---num_workers=0---collate_fn=None---pin_memory=False---drop_last=False---timeout=0---worker_init_fn=None---prefetch_factor=2-

2021-01-31 15:35:08 838 1

原创 深拷贝与浅拷贝

1.深拷贝与浅拷贝https://www.cnblogs.com/eva-j/p/5534037.html

2021-01-30 14:14:26 249

转载 pycharm

live template:https://cloud.tencent.com/developer/article/1715253

2020-12-28 22:29:59 66

转载 git

初次使用git配置:https://www.cnblogs.com/superGG1990/p/6844952.html

2020-12-17 23:03:20 82

原创 RUN AWAY FROM YOUR TEACHER: A NEW SELF SUPERVISED APPROACH SOLVING THE PUZZLE OF BYOL

motivationrepresentation collapseWang & Isola (2020) has empirically demonstrated that the balance of the alignment lossand the uniformity loss is necessary when learning representations through contrastive method.experiment1.We examine ...

2020-11-10 20:45:40 237

原创 Bootstrap Your Own Latent A New Approach to Self-Supervised Learning

1. framwork1)two distribution of augmentation2)3)4)5) q uses the same architecture as g6)with k the current training step and K the maximum number of training steps.(, the exponential moving average parameter τ starts from τbase = 0.996 an...

2020-11-10 17:26:31 984

原创 A Simple Framework for Contrastive Learning of Visual Representations

1.frameworkT:family of augmentations. sequentially apply three simple augmentation:random cropping followed by resize back to the original size, random color distortions, and random Gaussian blurcombination of random crop and color distortion is cruc

2020-11-09 17:26:54 311 1

原创 docker 常用语句

创建容器:nvidia-docker run -it -p 主机端口:docker容器端口 PEPOSITORY:TAG /bin/bash停止容器:docker stop退出但不停止:Ctrl + p + q重命名容器:docker rename 原容器名 新容器名将主机容器移到docker里:docker copy 主机文件路径 容器名:/路径...

2020-10-28 20:28:34 225

原创 image

2020-02-29 12:25:31 239

原创 470. A simple math problem

链接:http://acm.whu.edu.cn/weblearn/problem/470线性递推首先考虑 矩阵快速幂long long 的范围为 9*10^18。#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace...

2019-11-07 23:52:09 138

原创 458 - Lost in WHU

题目链接:http://acm.whu.edu.cn/weblearn/problem/458思路:本题考查对floyd的理解。本质上是求 从1到n经过不超过t条途径的方案总数。 floyd 的本质 x--->k--->y 的方案数 = x--->k的方案数 *k-->y的方案数。#include <bits/stdc++.h&gt...

2019-11-07 21:26:22 125

原创 codeforces 1214D (DAG必经点与必经边)

#include <bits/stdc++.h>using namespace std;typedef long long LL;const LL mod1 = 998244353;const LL mod2 = 1004535809;const LL mod3 = 1000000009;const int N = 1000005;const int maxn = 10...

2019-11-07 18:54:41 273

原创 ACWing 380 舞动的夜晚( 二分图的可行边与必经边 )

二分图最大匹配的可行边与必经边。#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;const lint maxn = 50005;const lint maxm = 5000000 + 5;int n,m,tot;int he[maxn],ne[maxm...

2019-11-07 16:21:15 604

原创 牛客多校第五场 F (最大点独立集)

二分图最大点独立集 (补集为最小点覆盖)网络流做法,执行完最大流后,与S连通的左部点和不与S连通的右部点为最大点独立集。#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;const lint maxn = 5000 + 100;const lint ma...

2019-11-07 15:15:57 112

原创 bzoj 4015: [FJOI2014]树的重心 dp

主子树dp#include <bits/stdc++.h>using namespace std;typedef long long LL;const int maxn = 205;const int maxm = 505;const LL mod = 10007;int tot,he[maxn],ne[maxm],ver[maxm];void add( in...

2019-11-06 23:50:15 132

原创 bzoj 1997 判断是否为平面图

#include <bits/stdc++.h>using namespace std;namespace SAT{ const int maxn = 20005; const int maxm = 5000005; int n; int he[maxn],ver[maxm],ne[maxm],tot; int dfn[maxn],low[...

2019-11-06 20:10:52 1191

原创 hdu 5988 费用流( vector浮点版 )

#include <bits/stdc++.h>using namespace std;typedef int lint;typedef long long LL;struct EDGE { int from, to, next, cap; // 如果需要修改 cost为LL double cost;};namespace MFMC { sta...

2019-11-06 17:40:31 122

原创 hdu 5988 费用流模板(浮点数)

思路:取log化乘积为加和。#include <bits/stdc++.h>using namespace std;typedef int lint;typedef long long LL;struct EDGE { int from, to, next, cap; // 如果需要修改 cost为LL double cost;};namespac...

2019-11-06 17:30:15 134

原创 2018 icpc nanjing magic potion

#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;const int inf=0x3f3f3f3f;struct dinic{ static const int N = 1000005; static const int M = 20000005...

2019-11-05 22:18:38 91

原创 hdu 6611 (vector 版本费用流模板 )

#include <bits/stdc++.h>using namespace std;typedef int lint;typedef long long LL;const lint maxn = 5011;const lint maxm = 4e7;namespace MFMC { struct EDGE { int from, to, in...

2019-11-05 21:52:29 153

原创 2019 上海邀请赛 I Matrix Game(ZKW模板)

zkw费用流,可以在残余网络上跑。注意这里的 maxflow 和 mincost 没有在 MFMC 中初始化还有这里 反向边的存储 通过 op 记录,不可以通过 ^ 操作实现。#include <bits/stdc++.h>using namespace std;typedef int lint;const int maxn = 25;const int in...

2019-11-05 15:03:36 173

原创 UOJ #2893. 征服王

题意:起点和终点有限制的最小可重复路径覆盖。思路1:上下界网络流,拆点,使得每个点的流量下界限制为1.(注意有源汇上下界网络流只能跑DAG)#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;const lint inf = 0x3f3f3f3f;cons...

2019-11-02 22:53:14 195

原创 poj 1065 Wooden Sticks(diworth定理)

题意:有n条木棒,给出它们每条的l和w,用一台机器对它们进行加工,如果机器正加工的木条,与在它之前加工的木块有关系:l <= l'和w <= w',则机器不用准备时间,否则需准备1分钟。问加工完全部木棒,机器最少需要准备多久。思路:每次以某一点为起点,向后贪心地走。(虽然是求小链覆盖,但是不用上网络流) 或者利用diworth定理,最长反链 = 最小链覆盖(本...

2019-11-02 15:17:42 218

原创 UOJ 2718 毕业旅行(diworth定理)

题意:思路:Dilworth定理:对于一个偏序集,最少链划分等于最长反链长度。 Dilworth定理的对偶定理:对于一个偏序集,其最少反链划分数等于其最长链的长度。 最长反链=最小路径覆盖 floyd传递闭包后,用n-二分图最大匹配数即为答案(因为是点可重最小路径覆盖,所以要先用floyd求传递闭包)#include ...

2019-11-02 14:38:27 240

原创 bzoj 2400(最小割)

题意:定义无向图中的一条边的值为:这条边连接的两个点的值的异或值。定义一个无向图的值为:这个无向图所有边的值的和。给你一个有n个结点m条边的无向图。其中的一些点的值是给定的,而其余的点的值由你决定(但要求均为非负数),使得这个无向图的值最小。在无向图的值最小的前提下,使得无向图中所有点的值的和最小。思路:最小割按位做枚举每一位一个点与S联通表示这个点选0,与T联通表示这个...

2019-11-02 14:04:05 140

原创 hdu 3718 Similarity

#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;const int maxn = 10005;const lint inf = 0x3f3f3f3f;namespace KM { const int N = 505; int n,m; ...

2019-11-01 16:52:53 132

原创 hdu 2853 Assignment

思路:我们把所有边权扩大100倍,然后将原来有的边边权+1,用来处理相等的情况。#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;namespace KM { const int N = 505; const lint inf = 0x3f3f...

2019-11-01 16:12:57 111

原创 hdu 2426 Interesting Housing Problem(KM模板)

判断不可行 + 左右点数不同的模板#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;namespace KM { const int N = 505; const lint inf = 0x3f3f3f3f; int n,m; ...

2019-11-01 15:52:52 101

原创 hdu 1853 Cyclic Tour (KM模板)

思路:有向图中每个点存在且仅存在于一个环中:每个点出度为1,入度为1.#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef LL lint;const int maxn = 205;const lint inf = 0x3f3f3f3f3f3f3f3f;namespace KM...

2019-10-30 23:38:58 86

原创 hdu 6346 整数规划 (KM算法模板)O(n^3)

题意:度度熊有一个可能是整数规划的问题:给定 n×n 个整数 ai,j(1≤i,j≤n),要找出 2n 个整数 x1,x2,…,xn,y1,y2,…,yn 在满足 xi+yj≤ai,j(1≤i,j≤n) 的约束下最大化目标函数 ∑ni=1xi+∑ni=1yi,你需要帮他解决这个整数规划问题,并给出目标函数的最大值。思路:这是一类可以用KM算法解决的特殊线性规划的问题。...

2019-10-30 20:57:30 308

原创 UOJ 1497 最大获利(最大密度子图变形)

胡泊涛论文题注意要连双向边。#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef int lint;//const double eps = 1e-8;const int maxn = 5005;const int maxm = 500005;namespace MF{...

2019-10-30 19:42:50 146

原创 bzoj 1283 序列

题意:给出一个长度为n的正整数序列Ci,求一个子序列,使得原序列中任意长度为m的子串中被选出的元素不超过K(K,M<=100) 个,并且选出的元素之和最大。思路: 线性规划 费用流建图 步骤:1.列出 所有的不等式,并将其转化为等式。 2.每一项和它的后一项做差分,注意 最开始需要添加 0 = 0 的项 ...

2019-10-30 15:06:54 402

原创 UOJ #4213. 贪吃蛇(上下界可行费用流)

思路:限制每个点的度数为2 ,边界点的度数可以花费1的代价减少1个度数坑点:我TM以后再也不用 ++ r 的优先级了,这个玩意在 C++ 和 C++11中不一样,而且TM错都不知道咋错的,我TM调了一个晚上就TM这么没了。。。。#include <bits/stdc++.h>using namespace std;typedef int lint;typedef lo...

2019-10-29 23:08:50 175

原创 bzoj 3876 支线剧情(上下界最小费用可行流)

题意:给定个一个DAG,每条边至少被覆盖一次,且有一个代价,问从起点开始的路径覆盖所有边至少一次的最小代价。思路:上下界最小费用可行流。#include <bits/stdc++.h>using namespace std;typedef int lint;typedef long long LL;const int inf = 0x3f3f3f3f;const i...

2019-10-29 19:14:47 183

原创 codeforces 1239D

思路:一个点选,相关的点也必须选就是直白的2-sat模型。#include <bits/stdc++.h>using namespace std;const int maxn = 1000005;const int maxm = 1000005;int he[maxn],ver[maxm],ne[maxm],tot;void add( int x,int y ){ ...

2019-10-27 19:58:04 160

原创 UOJ #1100. [POI2007]对称轴osi

链接:https://darkbzoj.tk/problem/1100题意:找多边形的对称轴个数。思路:hash之后找一个环形回文串。等价于一个序列可以由两个回文串拼接而成。#include <iostream>#include <cassert>#include <limits>using namespace std;#define ...

2019-10-25 18:16:40 143

OOD_data.zip

OOD_data.zip

2021-04-05

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除