会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
IAT14
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
14
下一页
[置顶]
一本通提高篇
摘要: 1422 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 struct dat 5 { 6 int s,f; 7 } a[1100]; 8 int res,n,t; 9 bool cmp(dat x,dat y)
阅读全文
posted @ 2020-02-19 15:10 IAT14
阅读(519)
评论(0)
推荐(0)
[置顶]
一本通基础篇动态规划
摘要: 1274 #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <queue> using namespace std; const int inf
阅读全文
posted @ 2020-02-10 15:42 IAT14
阅读(259)
评论(0)
推荐(0)
[置顶]
一本通基础篇图论
摘要: 1341 一笔画问题 1 #include <cstdio> 2 #include <algorithm> 3 #include <stack> 4 using namespace std; 5 const int MAXN = 110000,MAXM = 510000; 6 stack <int>
阅读全文
posted @ 2020-01-18 20:49 IAT14
阅读(391)
评论(0)
推荐(0)
2022年11月29日
StyTr2代码注释
摘要: test
阅读全文
posted @ 2022-11-29 11:03 IAT14
阅读(110)
评论(0)
推荐(0)
2022年11月15日
DCGAN代码注释
摘要: 1 import argparse 2 import os 3 import numpy as np 4 import math 5 6 import torchvision.transforms as transforms 7 from torchvision.utils import save_
阅读全文
posted @ 2022-11-15 16:56 IAT14
阅读(79)
评论(0)
推荐(0)
2020年3月14日
luoguP6188 [NOI Online 入门组]文具订购 打表
摘要: 先成套买,剩下的的凑,凑不齐的退一套继续凑。 #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; int n,m,k; ll ans,a[210000],f[210000]; int gc
阅读全文
posted @ 2020-03-14 23:54 IAT14
阅读(303)
评论(0)
推荐(0)
luoguP6187 [NOI Online 提高组]最小环 贪心 记忆化
摘要: 题目让我们把序列ai重新排列,使得环上任意两个距离为ki的数字乘积之和最大。 乘法与加法不同,把四个数分为两组分别计算,再求和。 比如1 2 3 4四个数 (1 + 2)+(3 + 4) == (1 + 3) + (2 + 4) (1 * 2) + (3 * 4)>(1*3)+(2*4) 对于乘法而
阅读全文
posted @ 2020-03-14 23:48 IAT14
阅读(305)
评论(0)
推荐(0)
luogu P6185 [NOI Online 提高组]序列 并查集缩点 二分图
摘要: 首先现在操作2,一个+1,一个-1。就好比权值可以在两点之间流动。我们发现,把操作2当作边,则一个联同的子图,内部的权值是可以随便流动的。我们就这个把这个子图看多一个点。这个我们用并查集来实现。那么这个并查集内的s[i]也对应求和。 我们把操作2,都处理完了,我们再考虑操作2。对于操作1,我们连边,
阅读全文
posted @ 2020-03-14 23:45 IAT14
阅读(280)
评论(0)
推荐(0)
2020年3月9日
2019ICPC邀请赛南昌B Polynomial 拉格朗日插值
摘要: 让你求f(L)到f(R)的和。 我们考虑前缀和,F(x)必定是比f(x)次数高1的多项式,所以我们先插值插出f(n+1)。然后求出n+1个前缀和,插值出前缀和即可。 1 #include <cstdio> 2 using namespace std; 3 typedef long long ll;
阅读全文
posted @ 2020-03-09 16:22 IAT14
阅读(214)
评论(0)
推荐(0)
2020年3月8日
2019ICPC邀请赛南昌A Attack 斯坦纳树
摘要: 先对8个点整体做斯坦纳树,再求出每个状态的最小代价。再看每个状态是否属于独立的,即包含的点都是成对的,我们去更新这些独立的状态即可。 1 #include <cstdio> 2 #include <cstring> 3 #include <string> 4 #include <map> 5 #in
阅读全文
posted @ 2020-03-08 10:19 IAT14
阅读(213)
评论(0)
推荐(0)
2020年3月2日
luoguP3066 Running Away From the Barn G 滑动窗口 树上差分
摘要: 给出以1号点为根的一棵有根树,问每个点的子树中与它距离小于等于k的点有多少个。 所以我们边深搜边维护一个递归栈,然后不断在栈内滑动,保持窗口内边的权值和小于k。从而得出每个点会给多少个点的答案做贡献。然后使用树上差分维护。 1 #include <cstdio> 2 using namespace
阅读全文
posted @ 2020-03-02 10:51 IAT14
阅读(279)
评论(0)
推荐(0)
2020年2月23日
基数排序
摘要: pass 1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 int t1[110000],t2[110000],rk[110000],uni[10],c[10]; 5 int n; 6 int get(int *x
阅读全文
posted @ 2020-02-23 16:13 IAT14
阅读(148)
评论(0)
推荐(0)
bzoj4477 4477: [Jsoi2015]字符串树 可持久化字典树
摘要: pass 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <algorithm> 5 using namespace std; 6 const int MAXN = 1100000; 7 int cnt,n
阅读全文
posted @ 2020-02-23 14:36 IAT14
阅读(225)
评论(0)
推荐(0)
1
2
3
4
5
···
14
下一页
公告