上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: 本来是一个很简单的线段树结果再update函数里忘更新tr[p]了害我卡了好久,太久没写线段树的过 #include<iostream> #define int long long using namespace std; const int N=2*1e5+5; struct tree{ int 阅读全文
posted @ 2025-02-17 18:45 郭轩均 阅读(12) 评论(0) 推荐(0)
摘要: 没看到这道题是多组测试数据输入 阅读全文
posted @ 2025-02-17 17:13 郭轩均 阅读(7) 评论(0) 推荐(0)
摘要: #include<iostream> #define int long long using namespace std; int ans=0; int num[1<<11]; int f[110][1<<10][1<<10]; int s[1<<12]; int g[1<<12]; signed 阅读全文
posted @ 2025-02-17 15:52 郭轩均 阅读(10) 评论(0) 推荐(0)
摘要: 要注意sum+a[i]的位置,我放错了,不知道为什么会re #include<iostream> #include<cstring> #define int long long using namespace std; int n,m,ans,a[30],vis[2020]; int f[2020] 阅读全文
posted @ 2025-02-16 16:54 郭轩均 阅读(12) 评论(0) 推荐(0)
摘要: 这道题对取最大值的地方有要求,要先取最大值再入队 阅读全文
posted @ 2025-02-16 13:20 郭轩均 阅读(7) 评论(0) 推荐(0)
摘要: 这题最开始数据比较水,后来加强了,我没过hack数据,我的代码最主要的问题是有一些点会从前面无法经过的点更新,所以就需要初始化f为最小值 #include<iostream> #include<cstring> using namespace std; #define int long long c 阅读全文
posted @ 2025-02-15 20:44 郭轩均 阅读(37) 评论(0) 推荐(0)
摘要: 崩溃了,debug半天发现是变量名重复了 #include<iostream> #include<cstring> #define int long long using namespace std; const int N=1e5; int q[N]; int f[N]; int w[N]; in 阅读全文
posted @ 2025-02-15 18:12 郭轩均 阅读(9) 评论(0) 推荐(0)
摘要: ![](https://img2024.cnblogs.com/blog/3599636/202502/3599636-20250215165220271-949058549.png) ![](https://img2024.cnblogs.com/blog/3599636/202502/3599636-20250215165224696-1477296427.png) 阅读全文
posted @ 2025-02-15 16:52 郭轩均 阅读(5) 评论(0) 推荐(0)
摘要: 位运算符好麻烦,没打括号被卡了半天 #include<iostream> #define int long long using namespace std; int f[12][100][1<<11]; int s[1<<11]; int num[1<<11]; signed main(){ in 阅读全文
posted @ 2025-02-15 15:36 郭轩均 阅读(7) 评论(0) 推荐(0)
摘要: 由于我的cnt是从一开始的,我还debug了一会 由于数据是一行一行的输入,我们不能像蒙德里安的梦想那样,按列判断 if((s[a]&g[i])s[a]&&(!(s[a]&s[b])))f[i][a]=(f[i][a]+f[i-1][b])%p; 如果(s[a]&g[i])s[a]说明s[a]在g[ 阅读全文
posted @ 2025-02-15 14:40 郭轩均 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页