- 博客(5)
- 收藏
- 关注
原创 最大子矩阵(多维dp)
#include<bits/stdc++.h>using namespace std;int a[110][110];int dp[110][110][20];int s[110][3];int main(){ int n,m,t; cin>>n>>m>>t; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++){ cin>>.
2021-02-10 00:17:17 134
原创 噩梦(双向bfs)
#include <bits/stdc++.h>#define ll long longconst int maxn = 1010;using namespace std;int dx[8]={0,0,1,-1,1,1,-1,-1};int dy[8]={1,-1,0,0,1,-1,1,-1};bool visited[2][maxn][maxn];char maps[maxn][maxn];int n,m;int res,zz;struct point{ int .
2021-02-09 04:01:46 488
原创 小A与小B(双向bfs)
#include <bits/stdc++.h>#define ll long longconst int maxn = 1010;using namespace std;int dx[8]={0,0,1,-1,1,1,-1,-1};int dy[8]={1,-1,0,0,1,-1,1,-1};bool visited[2][maxn][maxn];char maps[maxn][maxn];int n,m;struct point{ int x,y; po.
2021-02-09 03:24:00 175
原创 计算系数(组合数)
#include <iostream>#include <algorithm>using namespace std;const int mod = 10007;int qmi(int a,int k){ a%=mod; int res=1; while(k){ if(k&1) res=res*a%mod; a=a*a%mod; k>>=1; } return re.
2021-02-09 03:04:07 965
原创 反素数(dfs)
#include<bits/stdc++.h>#define ll long longusing namespace std;ll n;ll ans1=0,ans2=1e18;ll primes[10]={2,3,5,7,11,13,17,19,23,29};void dfs(int u,int pre,ll sum,ll num){ if((num>ans1)||(num==ans1&&sum<ans2)){ ans1=num; ans2=s.
2021-02-09 03:03:01 218
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人