会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
towboat
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
6
7
8
9
10
11
12
13
14
···
54
下一页
2023年8月21日
树上 Kth father
摘要: 来源于 https://vjudge.net/problem/CodeForces-291E void init(int x,int fa){ val[x]=val[fa]*S+(ul)c[x]; f[x][0]= fa; for (int i=1;i<20;++i) f[x][i]=f[f[x][
阅读全文
posted @ 2023-08-21 14:34 towboat
阅读(19)
评论(0)
推荐(0)
2023年7月22日
【codevs2950】突击考试
摘要: 。每个人都有一个考试等级,教室里面一共有N个课桌,按照顺序排成一列,每个课桌可以坐两个人,记他们的能力等级为(A[i],B[i])。 现在决定对能力等级为K的人进行测验。从这N排中选择连续的L排进行测验,要求这L排中的每一排至少有一个人考试等级为K。 现在想知道L的最大值以及对应的等级K。 #inc
阅读全文
posted @ 2023-07-22 12:52 towboat
阅读(20)
评论(0)
推荐(0)
【codevs3012】线段覆盖4
摘要: #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; struct hp{ int ai,bi,ci; }a[1005]; bool cmp(hp a,hp b){
阅读全文
posted @ 2023-07-22 11:29 towboat
阅读(24)
评论(0)
推荐(0)
2023年7月4日
uoj 279: [UTR #2]题目交流通道
摘要: 一个无向图,现在对于每个点对 i, j 连接一条边z( 整数) , 满足 z= d [i ][j ] ,d[i][j] 为已知 问有多少种方案 mod (m
阅读全文
posted @ 2023-07-04 15:05 towboat
阅读(19)
评论(0)
推荐(0)
2023年7月2日
POJ 2417
摘要: 求解 a^x≡b (mod c) ( x<c ) siz = sqrt( c ) a^( i*siz + j) ≡b (mod c) a^j ≡ a^( - i* siz) *b (mod c) 枚举 j , 将 (j, a^j %c ) 存入map ; 枚举 i, 查询map的值 ( a^(-i
阅读全文
posted @ 2023-07-02 16:46 towboat
阅读(14)
评论(0)
推荐(0)
2023年7月1日
裴蜀定理 记录
摘要: def. 对任意(a,b) , 存在x,y, 满足 ax+by= gcd(a,b) > ax+by 一定是gcd(a,b) 的倍数
阅读全文
posted @ 2023-07-01 20:35 towboat
阅读(14)
评论(0)
推荐(0)
2023年6月30日
1~n 线段覆盖
摘要: void solve(){ int r=a[1].r; int i=2, mx=0, ans=1; while(r<len){ mx=r; while(a[i].l<=r&&i<=len){ mx=max(mx,a[i].r); i++; } ans++ ; r=mx; } cout<<ans-1<
阅读全文
posted @ 2023-06-30 23:53 towboat
阅读(14)
评论(0)
推荐(0)
manacher 记录
摘要: 首先注意 2* n 的长度 mx: 当前匹配到的最大长度 即 [1,mx] id: mx 对应的中心点 pi : s[i] 为中心的回文串的最大长度, pi /2 -1 是半径() #include <iostream> #include <cstring> #include <algorithm>
阅读全文
posted @ 2023-06-30 21:46 towboat
阅读(17)
评论(0)
推荐(0)
2023年6月27日
线段树区间赋值
摘要: https://www.luogu.com.cn/problem/P1253 区间赋,区间加,查询区间最大值
阅读全文
posted @ 2023-06-27 23:01 towboat
阅读(63)
评论(0)
推荐(0)
LIS (数据结构优化dp
摘要: 首先是代码量小的bit 值域上建立bit, 需要注意合并类型应该有单调性 https://www.luogu.com.cn/problem/AT_dp_q https://www.luogu.com.cn/record/133869096 线段树 值域上建立线段树,区间查询,单点改 #include
阅读全文
posted @ 2023-06-27 00:22 towboat
阅读(179)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
11
12
13
14
···
54
下一页
公告