随笔分类 -  《算法竞赛进阶指南》打卡活动

新学期逆袭之路
摘要:题解:递归,加数组 点击查看代码 #include<iostream> #include<algorithm> #include<cstring> using namespace std; const int N=1e5+7; int n; int a[N]; void dfs(int x,int 阅读全文
posted @ 2023-02-16 17:07 xxj112 阅读(20) 评论(0) 推荐(0)
摘要:算法:动态规划位操作压缩 题解:e[i][j] i表示路线 ,j表示终点 ,初始化e[1][0]=0,表示从0点出发。 例如:i=7,n=4,二进制为 0111 表示经过 点 0 1 2 。 点击查看代码 #include<iostream> #include<algorithm> #include 阅读全文
posted @ 2023-02-16 16:56 xxj112 阅读(13) 评论(0) 推荐(0)
摘要:点击查看代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; ll a,b,p; ll solve() { ll ans=0; while(b) { if(b&1) 阅读全文
posted @ 2023-02-13 19:39 xxj112 阅读(22) 评论(0) 推荐(0)
摘要:点击查看代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e6 + 10; ll a,b,p; ll solve() { ll ans=1; while(b) { if(b&1) 阅读全文
posted @ 2023-02-13 19:26 xxj112 阅读(15) 评论(0) 推荐(0)