自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(48)
  • 收藏
  • 关注

原创 JAVA记录问题

1.找不到或无法加载主类,这次遇到这个问题是因为我的jdk版本是1.8,1.5以后的版本若是配置了classpath环境变量反而会出错

2022-03-04 18:54:42 301

原创 3D. 过山车

#include<bits/stdc++.h>using namespace std;int Map[1005][1005]; int K,M,N,a,b,sum;int match[1005],book[1005];bool find(int x){ for(int i=1;i<=N;i++) { if(!book[i]&&Map[x][i]) { book[i]=1; ...

2022-02-27 18:50:51 199

原创 3C Oil Deposits

#include<bits/stdc++.h>using namespace std;int n,m;char Map[105][105];int check(int p,int q){ if(p<0 || p>=n || q<0 || q>=m) return 0; if(Map[p][q]=='@') return 1; return 0;}void dfs(int x,int y)...

2022-02-27 17:23:33 98

原创 3B. 手机的诱惑

#include<bits/stdc++.h>using namespace std;char Map[10][10];int N,M,T,di,dj,si,sj,wall;bool es;int dir[4][2]={{0,-1},{0,1},{1,0},{-1,0}};void dfs(int si,int sj,int cnt){ int i,temp; if(si>N||sj>M||si<=0||sj<=0) return; ...

2022-02-27 15:36:20 96

原创 3A. 求全排列(1)

#include<bits/stdc++.h>using namespace std;int num[10];int vis[10];int n;void dfs(int step){ if(step==n+1) { for(int i=1;i<=n;i++) printf("%d",num[i]); printf("\n");return; } for(int i=1;i<=n;i++)...

2022-02-27 14:21:13 83

原创 2R. 胜利大逃亡

#include<bits/stdc++.h>using namespace std;struct people{ int x,y,z,time; }pp,qq;int K,A,B,C,T,ans;int square[55][55][55];int Vis[55][55][55];int dir[6][3]={{-1,0,0},{1,0,0},{0,-1,0},{0,1,0},{0,0,-1},{0,0,1}};int bfs(int x,int y,int z...

2022-02-27 12:00:52 123

原创 2Q. Rescue

错误案例#include<bits/stdc++.h>using namespace std;int Vis[205][205];char MAP[205][205];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}struct glass{ int x,y,steps; }gg;int main(){ ...

2022-02-27 07:32:42 107

原创 2P. Knight Moves

#include<bits/stdc++.h>using namespace std;int Vis[205][205];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}struct glass{ int x,y,steps; }gg;int main(){ int x1,x2,y1,y2,t,x,y;...

2022-02-27 04:48:31 98

原创 2O. 非常可乐

#include<bits/stdc++.h>using namespace std;int Vis[205][205];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}struct glass{ int s,n,m,steps; }gg;int main(){ int S,N,M,s,n,m; q...

2022-02-27 03:22:12 132

原创 2N. A strange lift(BFS未更新)(最短路径)

最短路径写法#include<bits/stdc++.h>using namespace std;int dp[205],V[205];int MAP[205][205];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}int main(){ int i,N,A,B,ki,min; while(scanf("%d...

2022-02-24 22:23:39 46

原创 2M. Choose the best route

#include<bits/stdc++.h>using namespace std;int dp[1005],V[1005];int MAP[1005][1005];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}int main(){ int i,n,m,s,min,a,b,w[1005]; while(scan...

2022-02-24 02:20:45 456

原创 2L. 一个人的旅行

#include<bits/stdc++.h>using namespace std;int dp[1005],V[1005];int MAP[1005][1005];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}int main(){ int i,D,S,T,min,minn,a,b,s[1005],d[1005];...

2022-02-23 23:23:27 60

原创 2K. 畅通工程续

#include<bits/stdc++.h>using namespace std;int dp[1005],V[200];int MAP[205][205];const int inf=0x3f3f3f3f;int minhh(int x,int y){ if(x<=y)return x; else return y;}int main(){ int i,N,M,S,T,min; while(scanf("%d %d",&am...

2022-02-23 18:59:17 59

原创 2J. 湫湫系列故事——减肥记I

#include<bits/stdc++.h>using namespace std;int dp[100005];int maxhh(int x,int y){ if(x>=y)return x; else return y;}int main(){ int n,m,i,j,a[105],b[105];//录入商品数据 while(scanf("%d",&n)!=EOF) { memset(dp,0...

2022-02-05 18:49:09 406

原创 2I寒冰王座

#include<bits/stdc++.h>using namespace std;int dp[10005];int maxhh(int x,int y){ if(x>=y)return x; else return y;}int main(){ int N,C,i,j,p[4]={0,150,200,350};//录入商品数据 scanf("%d",&C); while(C--) { m...

2022-02-05 17:55:51 602

原创 2H悼念512汶川大地震遇难同胞

#include<bits/stdc++.h>using namespace std;int dp[10005];int data77[505][3];int data88[5050][2];int maxhh(int x,int y){ if(x>=y)return x; else return y;}int main(){ int n,m,C,i,j,t,cnt; scanf("%d",&C); while(C...

2022-02-05 16:21:08 561

原创 2G Piggy Bank

#include<bits/stdc++.h>using namespace std;int dp[10005];int data77[505][2];int minhh(int x,int y){ if(x<=y)return x; else return y;}int main(){ int n,E,F,N,i,j; scanf("%d",&n); while(n--) { memset(...

2022-02-04 18:52:59 172

原创 2FBone Collector(DP可优化为滚动数组存储,待更新)

#include<bits/stdc++.h>using namespace std;int dp[1005][1005];int data77[1005][2];int maxhh(int x,int y){ if(x>=y)return x; else return y;}int main(){ int n,N,V,i,j; scanf("%d",&n); while(n--) { //m...

2022-01-30 01:04:56 492

原创 2E丑数(DP)

#include<bits/stdc++.h>using namespace std;long long int minhh(long long int a,long long int b,long long int c,long long int d){ if(a<=b&&a<=c&&a<=d)return a; if(b<=a&&b<=c&&b<=d)return b;...

2022-01-29 23:00:33 354

原创 2D免费馅饼

#include<bits/stdc++.h>using namespace std;int data1[20][100500];//动态规划注意数据的储存方式,题目所有可能要用到的位置都要申请,不要省(大概)//全局变量和数组自动初始化为0int maxx(int x,int y,int z){ if(x>=y&&x>=z)return x; else if(y>=x&&y>=z)return y; el...

2022-01-27 17:34:04 410

原创 2C搬寝室

#include<stdio.h>#include<math.h>#include<stdlib.h>#include<iostream>#include<algorithm>using namespace std;int dp[2001][1001];//定义二维数组要注意当大于a[1024][1024]时,要malloc动态分配内存或者使用全局变量int main(){ int n,k,i,j,g[2001];...

2022-01-27 00:15:25 377

原创 2B最少拦截系统(贪心)(DP待更新)

贪心#include<stdio.h>#include<math.h>#include<stdlib.h>#include<iostream>#include <algorithm>using namespace std;int main(){ int M,r,i,temp,g[10001]; while(scanf("%d",&M)!=EOF) { r=0;//初始化拦...

2022-01-26 16:59:49 261

原创 2A数塔(DP)

#include<stdio.h>#include<math.h>#include<stdlib.h>#include<iostream>#include <algorithm>using namespace std;int main(){ int M,N,i,j,data[101][101]; scanf("%d",&M); while(M--) { scanf("%...

2022-01-26 14:25:59 217

原创 1Y不容易系列之(3)—— LELE的RPG难题

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fun(long long int f1,long long int f2,int n){ int i; if(n==1)return f1; else if(n=...

2022-01-25 05:23:47 536

原创 1X和1Z阿牛的EOF牛肉串

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fun(long long int f1,long long int f2,int n){ int i; if(n==1)return f1; else if(n=...

2022-01-25 03:21:39 104

原创 1W Tiling_easy version

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fun(long long int f1,long long int f2,int n){ int i; if(n==1)return f1; else if(n=...

2022-01-25 03:09:01 48

原创 1V悼念512汶川大地震遇难同胞——重建希望小学

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fun(long long int f1,long long int f2,int n){ int i; long long int r=2; if(n==1)re...

2022-01-25 03:02:10 136

原创 1U折线分割平面

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fun(int n){ int i; long long int r=2; if(n==1)return 2; else { for(i=1;i&l...

2022-01-25 02:23:25 131

原创 1T骨牌铺方格

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fibnacci(long long int f1,long long int f2,int n){ int i; if(n==0)return 0; else i...

2022-01-25 01:30:06 51

原创 1S一只小蜜蜂

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;long long int fibnacci(long long int f1,long long int f2,int n){ int i; if(n==0)return 0; else i...

2022-01-25 01:20:28 123

原创 1R超级楼梯

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;int fibnacci(int f1,int f2,int n){ int i; if(n==0)return 0; else if(n==1)return f1; else if(...

2022-01-25 00:33:59 187

原创 1Q小希的迷宫

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>#include<stdlib.h>using namespace std;const int N=100001;struct point{ int root;}c[N];int main(){ int i,s,e,temp; for(i=0;i<N;i...

2022-01-24 20:58:30 35

原创 1P继续畅通工程

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct point{ int root;}c[1001];struct road{ int s,e,w,t;}r[5001];bool cmp(road x,road y){ return x.w<y.w;}int...

2022-01-24 15:13:05 49

原创 1O畅通工程

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct point{ int root;}c[1001];struct road{ int s,e,w;}r[5001];bool cmp(road x,road y){ return x.w<y.w;}int m...

2022-01-24 14:31:31 108

原创 1N还是畅通工程(有待优化啊)

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct point{ int root;}c[1001];struct road{ int s,e,w;}r[5001];bool cmp(road x,road y){ return x.w<y.w;}int m...

2022-01-24 00:15:20 41

原创 1M畅通工程

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct point{ int root;}c[1001];int main(){ int N,M,i,s,e,r; while(scanf("%d",&N)!=EOF,N)//如果出现某个变量值不对,可能是scanf中%打...

2022-01-23 23:13:33 136

原创 1K奋勇争先续

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct student{ int n,t; char name[10];}w[2000];bool cmp(student x,student y){ if(x.n==y.n)return x.t<y.t; else...

2022-01-22 19:20:52 160

原创 1J今年暑假不AC

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;struct program{ int T_s,T_e;}w[200];bool cmp(program x,program y){ return x.T_e<y.T_e;}int main(){ int T,i,j,r;...

2022-01-22 18:20:27 147

原创 1I搬桌子

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;bool cmp(int x,int y){ return x>y;}int main(){ int T,N,i,j,w[2001],A,B; scanf("%d",&T); while(T--) {...

2022-01-22 05:59:30 56

原创 1H田忌赛马

#include <iostream>#include <algorithm>#include<stdio.h>#include<math.h>using namespace std;bool cmp(int x,int y){ return x>y;}int main(){ int n,i,j,r; int t[1000],k[1000]; while(scanf("%d",&n)!=EOF)...

2022-01-22 04:36:33 268

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除