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

关于企业网站建设网页布局怎么设计

关于企业网站建设,网页布局怎么设计,外国公司做网站,专业旅游网站建设题目#xff1a; 样例#xff1a; 输入 3 3 2 1 输出 3 2 1 0 -1 4 3 2 1 思路#xff1a; 单纯的BFS走一遍即可#xff0c;只是方向坐标的移动变化#xff0c;需要变化一下。 代码详解如下#xff1a; #include iostream #include vector #include…题目 样例 输入 3 3 2 1 输出 3 2 1 0 -1 4 3 2 1 思路 单纯的BFS走一遍即可只是方向坐标的移动变化需要变化一下。 代码详解如下 #include iostream #include vector #include queue #include cstring #include algorithm #include unordered_map #define endl \n #define x first #define y second #define mk make_pair #define YES puts(YES) #define NO puts(NO) #define umap unordered_map #define All(x) x.begin(),x.end() #pragma GCC optimize(3,Ofast,inline) #define IOS std::ios::sync_with_stdio(false),cin.tie(0), cout.tie(0) using namespace std; const int N 500; using PII pairint,int; // 象棋走动的方向 int dx[8] {2,2,-2,-2,1,-1,1,-1}; int dy[8] {1,-1,1,-1,2,2,-2,-2};int g[N][N],n,m; // 象棋棋盘以及大小 bool st[N][N]; // 标记是否走过当前坐标 PII now; // 当前象棋坐标inline bool isRun(int x,int y) {return (x 0 x n y 0 y m !st[x][y]); }inline void BFS() {// 初始化坐标所对应的最少步数memset(g,-1,sizeof g);g[now.x][now.y] 0; // 初始化起点步数为 0int step 0;queuePIIq;q.emplace(now);while(q.size()){int sz q.size();while(sz--){PII tem q.front();q.pop(); // 取出当前坐标st[tem.x][tem.y] true; // 标记当前坐标g[tem.x][tem.y] step; // 存储当前坐标所对应的最少步数// 尝试往各个方向坐标走动for(int i 0;i 8;i){int bx tem.x dx[i];int by tem.y dy[i];if(isRun(bx,by)){// 如果符合走动条件// 存储下一个走动的坐标并标记q.emplace(mk(bx,by));st[bx][by] true;}}}step;} }// 打印棋盘各个坐标所对应的最少步数 inline void PrintG() {for(int i 1;i n;i){for(int j 1;j m;j){if(j 1) cout ; // 控制输入格式cout g[i][j];}cout endl;} }inline void solve() {cin n m now.x now.y; // 输入所对应的信息BFS(); // BFS 搜索各个坐标所对应的最少步数PrintG(); // 输出答案 }int main() { // freopen(a.txt, r, stdin);IOS;int _t 1; // cin _t;while (_t--){solve();}return 0; } 最后提交
http://www.w-s-a.com/news/469735/

相关文章:

  • 惠州市网站设计公司裴东莞嘘网站汉建设
  • 长葛网站建站电子商务网站是什么
  • 泉做网站的公司太原网站建设开发公司
  • wordpress菜单栏的函数调用迅速上排名网站优化
  • 网站深圳广西模板厂哪家价格低
  • 搜索网站显示网页无法访问最好的网站推广
  • 巴彦淖尔市百家姓网站建设搬瓦工暗转wordpress
  • 温州鹿城区企业网站搭建云虚拟机
  • 网站的开发方法php网站商城源码
  • 旅游找什么网站好维护公司网站建设
  • 长春市长春网站制作站优化杭州企业推广网站
  • 网站建设开发设计营销公司山东网信办抓好网站建设
  • 斗图在线制作网站搜索关键词优化
  • 大连 网站建设 有限公司十大erp系统
  • 网站后台建设软件网络营销公司招聘
  • 做网站销售电销好做吗网站开发毕业设计代做
  • 成都学网站建设费用帝国cms与wordpress
  • 如何刷网站排名品牌设计的英文
  • 富阳有没有做网站的房产局官网查询系统
  • 建设网站列表aliyun oss wordpress
  • 做PPT的辅助网站wordpress拖拽式主题
  • 商城网站源码seo兼职58
  • 汽车租赁网站的设计与实现全网营销推广哪家正规
  • 做网站时怎么取消鼠标悬停如何设计软件界面
  • 建德网站设计公司中国十大热门网站排名
  • 网站与新媒体建设测评方案163企业邮箱官网入口
  • 怎样做下载网站页面设计参评
  • 哈尔滨住建局网站首页设计制作过程
  • php投资理财企业网站模板网站呼叫中心 建设工期
  • 查数据的权威网站silverlight 做的网站