当前位置: 首页 > news >正文

做网站买空间用共享ip湖南企业竞价优化公司

做网站买空间用共享ip,湖南企业竞价优化公司,30个让人兴奋的视差滚动网站,广州市企业网站制作复习1001. 马走日问题: 1.P1002 [NOIP2002 普及组] 过河卒 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) //日常碎碎念:谁懂啊,dev突然不能用了,也不知道是哪里出了问题下了五六次都不能用,,,找远程安…

复习1001.

马走日问题:

1.P1002 [NOIP2002 普及组] 过河卒 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)

//日常碎碎念:谁懂啊,dev突然不能用了,也不知道是哪里出了问题下了五六次都不能用,,,找远程安装才弄好,,我的天,,,#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+6;
const int inf=0x3f3f3f3f;
const double pi=acos(-1.0);
int dir[8][2]={{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}};
int a[110][110],dp[110][110];
void solve()
{int bx,by,mx,my;cin>>bx>>by>>mx>>my;bx+=2,by+=2,mx+=2,my+=2;for(int i=0;i<8;i++){a[mx+dir[i][0]][my+dir[i][1]]=1;}a[mx][my]=1;dp[1][2]=1;for(int i=2;i<=bx;i++){for(int j=2;j<=by;j++){if(a[i][j])continue;dp[i][j]=dp[i-1][j]+dp[i][j-1];}}cout<<dp[bx][by];
}
signed main()
{ios_base::sync_with_stdio(false);//cin.tie(nullptr),cout.tie(nullptr);int t=1;//cin>>t;while(t--){solve();}return 0;
}

2.C-马走日_牛客练习赛122 (nowcoder.com)

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+6;
const int inf=0x3f3f3f3f;
const double pi=acos(-1.0);
void solve()
{int n,m;cin>>n>>m;if(n>m)swap(n,m);if(n==1||m==1)cout<<1<<endl;else if(n==2)cout<<(m+1)/2<<endl;else if(n==3&&m==3)cout<<8<<endl;else cout<<n*m<<endl;
}
signed main()
{ios_base::sync_with_stdio(false);//cin.tie(nullptr),cout.tie(nullptr);int t=1;cin>>t;while(t--){solve();}return 0;
}

1.D-小红的排列构造_牛客周赛 Round 35 (nowcoder.com)

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+6;
const int inf=0x3f3f3f3f;
const double pi=acos(-1.0);
int a[N],b[N];
void solve()
{memset(a,0,sizeof a);int n,x,cn=0;cin>>n;for(int i=1;i<=n;i++){cin>>x;if(x<=n&&a[x]==0)a[x]=1;//不能写成if(a[x]==0&&x<=n),,,搜了说没问题,但在牛客上会段错误...else{b[++cn]=i;}}cout<<cn<<endl;for(int i=1;i<=n;i++){if(a[i]==0){cout<<b[cn]<<' '<<i<<endl;cn--;}}
}
signed main()
{ios_base::sync_with_stdio(false);//cin.tie(nullptr),cout.tie(nullptr);int t=1;//cin>>t;while(t--){solve();}return 0;
}

2.2.串门 - 蓝桥云课 (lanqiao.cn)

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N=2e5+6;
const int inf=0x3f3f3f3f;
typedef pair<int,int> pii;
vector<pii>ve[N];
int dis[N];
void dfs(int x,int fa)
{for(auto [u,w]:ve[x]){if(u==fa)continue;dis[u]=dis[x]+w;dfs(u,x);}
}
void solve()
{int n,cn=0;cin>>n;for(int i=1;i<n;i++){int u,v,w;cin>>u>>v>>w;ve[u].push_back({v,w});ve[v].push_back({u,w});cn+=2*w;}dfs(1,0);int max1=-inf,flag;for(int i=1;i<n;i++){if(max1<dis[i]){max1=dis[i];flag=i;}}memset(dis,0,sizeof dis);dfs(flag,0);max1=-inf;for(int i=1;i<=n;i++){max1=max(max1,dis[i]);}cout<<cn-max1;
}
signed main()
{ios_base::sync_with_stdio(false);cin.tie(nullptr),cout.tie(nullptr);int t;//cin>>t;t=1;while(t--){solve();}return 0;
}

http://www.yidumall.com/news/80311.html

相关文章:

  • 南京市网站seo整站优化宁波seo整站优化软件
  • 建品牌网站公司拉新推广平台
  • 展厅建筑设计厂家seo优化方案策划书
  • 网站评估怎么做兔子bt樱桃搜索磁力天堂
  • 免费影视网站建设企业网站的网络营销功能
  • 郑州网站开发网站开发深圳网站建设推广优化公司
  • 网站无后台添加后台高端seo服务
  • 红玫瑰直播免费版视频seo优化工作内容
  • 广州企业建站 网络服务免费的推广网站
  • 笔记本做系统哪个网站好怎么做一个网页
  • 网站快速过备案seo推广多少钱
  • 郑州网站建设小程序2345网址导航中国最好
  • 怎么在网上做网站营销型网站定制
  • 怎么把做的网页放网站交换链接营销
  • 什么公司时候做网站做网络推广
  • 什么类型的网站容易被百度抓取河南网站优化公司哪家好
  • 襄阳哪里有做网站的爱站网seo综合查询
  • 电商网站开发教程信阳seo公司
  • 网站隐私条款模板seo投放
  • 自己做的网站如何上首页台州百度推广优化
  • 完美网站建设引流推广接单
  • 深圳ui设计师招聘网络关键词优化软件
  • 制作ppt软件免费衡阳seo快速排名
  • 前端做网站是什么流程近期国际新闻
  • 中小企业网站建设框架微商引流的最快方法是什么
  • 网站建设公司效果免费推广平台排行榜
  • 网站建设 源码百度搜索引擎入口官网
  • 做网站大概要多少钱seo推广公司排名
  • 印度做网站需要备案吗西安高端网站建设
  • web网站托管方案免费站推广网站2022