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

建筑公司排名前100seo专业培训

建筑公司排名前100,seo专业培训,做二手车那个网站会员性价比高,整站优化代理【蓝桥杯冲冲冲】Invasion of the Milkweed G 蓝桥杯备赛 | 洛谷做题打卡day30 文章目录 蓝桥杯备赛 | 洛谷做题打卡day30[USACO09OCT] Invasion of the Milkweed G题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 题解代码我的一些话 [USACO09OCT] Invasion of the Mi…【蓝桥杯冲冲冲】Invasion of the Milkweed G 蓝桥杯备赛 | 洛谷做题打卡day30 文章目录 蓝桥杯备赛 | 洛谷做题打卡day30[USACO09OCT] Invasion of the Milkweed G题目描述输入格式输出格式样例 #1样例输入 #1样例输出 #1 题解代码我的一些话 [USACO09OCT] Invasion of the Milkweed G 题目描述 Farmer John has always done his best to keep the pastures full of luscious, delicious healthy grass for the cows. He has lost the battle, though, as the evil milkweed has attained a foothold in the northwest part of his farm. The pasture, as usual, is partitioned into a rectilinear grid of height Y (1 Y 100) and width X (1 X 100) with (1,1) being in the lower left corner (i.e., arranged as a normal X,Y coordinate grid). The milkweed has initially begun growing at square (Mx,My). Each week the milkweed propagates to all non-rocky squares that surround any square it already occupies, as many as eight more squares (both the rectilinear squares and the diagonals). After only one week in those squares, it is ready to move on to more squares. Bessie wants to enjoy all the grass she can before the pastures are taken over by milkweed. She wonders how long it can last. If the milkweed is in square (Mx,My) at time zero, at what time does it complete its invasion of the pasture (which, for the given input data, will always happen)? The pasture is described by a picture with .s for grass and *s for boulders, like this example with X4 and Y3: .... ..*. .**.If the milkweed started in the lower left corner (row1, column1), then the map would progress like this: .... .... MMM. MMMM MMMM..*. MM*. MM*. MM*M MM*MM**. M**. M**. M**. M**M week 0 1 2 3 4The milkweed has taken over the entire field after 4 weeks. POINTS: 125 Farmer John一直努力让他的草地充满鲜美多汁的而又健康的牧草。可惜天不从人愿他在植物大战人类中败下阵来。邪恶的乳草已经在他的农场的西北部份占领了一片立足之地。 草地像往常一样被分割成一个高度为Y(1 Y 100), 宽度为X(1 X 100)的直角网格。(1,1)是左下角的格也就是说坐标排布跟一般的X,Y坐标相同。乳草一开始占领了格(Mx,My)。每个星期乳草传播到已被乳草占领的格子四面八方的每一个没有很多石头的格包括垂直与水平相邻的和对角在线相邻的格。1周之后这些新占领的格又可以把乳草传播到更多的格里面了。 Bessie想要在草地被乳草完全占领之前尽可能的享用所有的牧草。她很好奇到底乳草要多久才能占领整个草地。如果乳草在0时刻处于格(Mx,My)那么会在哪个时刻它们可以完全占领入侵整片草地呢对给定的数据总是会发生。 输入格式 * Line 1: Four space-separated integers: X, Y, Mx, and My * Lines 2…Y1: Line y1 describes row (Y2-y) of the field with X characters (‘.’ for grass and ‘*’ for a boulder) 输出格式 * Line 1: A single integer that is the week number when the milkweed takes over the last remaining non-boulder square of the pasture. 样例 #1 样例输入 #1 4 3 1 1 .... ..*. .**.样例输出 #1 4题解代码 学会利用新知自己多试试并尝试积攒一些固定解答方案debug以下是题解代码 ~ #includebits/stdc.h using namespace std; int f[105][105],tot1,n,m,sx,sy,Time1,sum; char Map[105][105]; int l[8][2]{{1,0},{0,1},{-1,0},{0,-1},{-1,-1},{1,-1},{-1,1},{1,1}}; int main() {memset(f,-1,sizeof(f));cinmnsysx;for(int in;i0;i--)for(int j1;jm;j){cinMap[i][j];if(Map[i][j].) sum;}f[sx][sy]0; while(tot!sum){for(int i1;in;i)for(int j1;jm;j){bool flag0;if(f[i][j]0) continue;if(Map[i][j]*) continue;for(int q0;q8;q){int txil[q][0];int tyjl[q][1];if(tx1||txn||ty1||tym) continue;if(Map[tx][ty]*) continue;if(f[tx][ty]!Time-1) continue;f[i][j]Time; flag1;}if(flag) tot;}Time;}coutTimeendl;return 0; }我的一些话 今天学习动态规划dp属于比较难的部分这题利用记忆化搜索即可快速解决需要多动脑多思考思路还是很好掌握的虽然一次性AC有一定难度需要通盘的考虑和理解以及扎实的数据结构基础才能独立写出AC代码。但无论难易大家都要持续做题保持题感喔一起坚持(o´ωo) 如果有非计算机专业的uu自学的话关于数据结构的网课推荐看b站上青岛大学王卓老师的课讲的很细致有不懂都可以私信我喔 总结来说思路很重要多想想多在草稿纸上画画用测试数据多调试debug后成功编译并运行出正确结果真的会感到很幸福 关于之前蓝桥杯备赛的路线和基本方法、要掌握的知识之前的博文我都有写欢迎大家关注我翻阅自取哦~ 不管什么都要坚持吧三天打鱼两天晒网无法形成肌肉记忆和做题思维该思考的时候一定不要懈怠今天就说这么多啦欢迎评论留言一起成长
文章转载自:
http://www.morning.bgbnc.cn.gov.cn.bgbnc.cn
http://www.morning.wmhqd.cn.gov.cn.wmhqd.cn
http://www.morning.kjyfq.cn.gov.cn.kjyfq.cn
http://www.morning.bhwz.cn.gov.cn.bhwz.cn
http://www.morning.qrpx.cn.gov.cn.qrpx.cn
http://www.morning.rpjr.cn.gov.cn.rpjr.cn
http://www.morning.dbhnx.cn.gov.cn.dbhnx.cn
http://www.morning.krgjc.cn.gov.cn.krgjc.cn
http://www.morning.yrfxb.cn.gov.cn.yrfxb.cn
http://www.morning.ktnmg.cn.gov.cn.ktnmg.cn
http://www.morning.hphqy.cn.gov.cn.hphqy.cn
http://www.morning.njpny.cn.gov.cn.njpny.cn
http://www.morning.kyhnl.cn.gov.cn.kyhnl.cn
http://www.morning.gcfrt.cn.gov.cn.gcfrt.cn
http://www.morning.mzwfw.cn.gov.cn.mzwfw.cn
http://www.morning.zrbpx.cn.gov.cn.zrbpx.cn
http://www.morning.baguiwei.com.gov.cn.baguiwei.com
http://www.morning.zsyqg.cn.gov.cn.zsyqg.cn
http://www.morning.qmbtn.cn.gov.cn.qmbtn.cn
http://www.morning.rhkmn.cn.gov.cn.rhkmn.cn
http://www.morning.rmyt.cn.gov.cn.rmyt.cn
http://www.morning.lxngn.cn.gov.cn.lxngn.cn
http://www.morning.xykst.cn.gov.cn.xykst.cn
http://www.morning.sfgzx.cn.gov.cn.sfgzx.cn
http://www.morning.wpkr.cn.gov.cn.wpkr.cn
http://www.morning.fkffr.cn.gov.cn.fkffr.cn
http://www.morning.rqrh.cn.gov.cn.rqrh.cn
http://www.morning.gbcxb.cn.gov.cn.gbcxb.cn
http://www.morning.xfwnk.cn.gov.cn.xfwnk.cn
http://www.morning.lmhh.cn.gov.cn.lmhh.cn
http://www.morning.jwbfj.cn.gov.cn.jwbfj.cn
http://www.morning.hbywj.cn.gov.cn.hbywj.cn
http://www.morning.zlgth.cn.gov.cn.zlgth.cn
http://www.morning.chehb.com.gov.cn.chehb.com
http://www.morning.wmmtl.cn.gov.cn.wmmtl.cn
http://www.morning.cnxpm.cn.gov.cn.cnxpm.cn
http://www.morning.nwfxp.cn.gov.cn.nwfxp.cn
http://www.morning.lrybz.cn.gov.cn.lrybz.cn
http://www.morning.rhqn.cn.gov.cn.rhqn.cn
http://www.morning.llcgz.cn.gov.cn.llcgz.cn
http://www.morning.jrbyz.cn.gov.cn.jrbyz.cn
http://www.morning.zqfz.cn.gov.cn.zqfz.cn
http://www.morning.jqkjr.cn.gov.cn.jqkjr.cn
http://www.morning.ncrk.cn.gov.cn.ncrk.cn
http://www.morning.dxpqd.cn.gov.cn.dxpqd.cn
http://www.morning.qzqjz.cn.gov.cn.qzqjz.cn
http://www.morning.krnzm.cn.gov.cn.krnzm.cn
http://www.morning.dpzcc.cn.gov.cn.dpzcc.cn
http://www.morning.xnltz.cn.gov.cn.xnltz.cn
http://www.morning.dgpxp.cn.gov.cn.dgpxp.cn
http://www.morning.rnwt.cn.gov.cn.rnwt.cn
http://www.morning.mftzm.cn.gov.cn.mftzm.cn
http://www.morning.mnclk.cn.gov.cn.mnclk.cn
http://www.morning.lgphx.cn.gov.cn.lgphx.cn
http://www.morning.qsmdd.cn.gov.cn.qsmdd.cn
http://www.morning.ycmpk.cn.gov.cn.ycmpk.cn
http://www.morning.psdsk.cn.gov.cn.psdsk.cn
http://www.morning.lqjlg.cn.gov.cn.lqjlg.cn
http://www.morning.lxlfr.cn.gov.cn.lxlfr.cn
http://www.morning.tpwrm.cn.gov.cn.tpwrm.cn
http://www.morning.dyxlm.cn.gov.cn.dyxlm.cn
http://www.morning.qmwzz.cn.gov.cn.qmwzz.cn
http://www.morning.xjtnp.cn.gov.cn.xjtnp.cn
http://www.morning.tfzjl.cn.gov.cn.tfzjl.cn
http://www.morning.jfjpn.cn.gov.cn.jfjpn.cn
http://www.morning.fnssm.cn.gov.cn.fnssm.cn
http://www.morning.tcxk.cn.gov.cn.tcxk.cn
http://www.morning.ccpnz.cn.gov.cn.ccpnz.cn
http://www.morning.lgqdl.cn.gov.cn.lgqdl.cn
http://www.morning.rlhh.cn.gov.cn.rlhh.cn
http://www.morning.ryxyz.cn.gov.cn.ryxyz.cn
http://www.morning.lxctl.cn.gov.cn.lxctl.cn
http://www.morning.fcrw.cn.gov.cn.fcrw.cn
http://www.morning.sqfnx.cn.gov.cn.sqfnx.cn
http://www.morning.dfckx.cn.gov.cn.dfckx.cn
http://www.morning.zcwzl.cn.gov.cn.zcwzl.cn
http://www.morning.rhdqz.cn.gov.cn.rhdqz.cn
http://www.morning.nlkhr.cn.gov.cn.nlkhr.cn
http://www.morning.jjhrj.cn.gov.cn.jjhrj.cn
http://www.morning.mxgpp.cn.gov.cn.mxgpp.cn
http://www.tj-hxxt.cn/news/219302.html

相关文章:

  • 毕设做网站什么主题比较好咸阳网站建设方案
  • 爱站工具有加超人下拉系统教育培训机构报名
  • 自己做网站能挣钱吗wordpress占内存
  • 济南网站建设开发与制作广州微网站建设机构
  • 中英语双语网站咋做杭州互联网企业有哪些
  • 网站流量提升方法二级域名做很多网站
  • 网站建站主题北京企业网站建设飞沐
  • 敬老院网站建设方案网页排版设计软件
  • 微网站平台微网站建设方案模板网站开发承包合同
  • 网站系统平台的安全策略是什么建站平台 在线提交表格功能
  • 网站的功能和作用途牛企业网站建设
  • 企业网站建设原则是( )网络营销业务流程
  • 苍南网站制作手机怎么制作图文广告
  • 九江市住房和城乡建设局官方网站雅安移动网站建设
  • 南宁自助模板建站动易网站 价格
  • 网站程序语言那个好用vps刷网站流量要怎么做
  • 解释自己做的网站多平台网页制作
  • 高端网站开发公司wordpress raw
  • 使用腾讯云建设网站教程天猫店怎么申请
  • 长春建设网站制作电子商务网站建设讨论
  • 有关大学生做兼职的网站软件工程项目开发的步骤
  • 济南建设网站 概况一个完整网站制作的实例
  • 免费网站模板建站网站一年得多少钱
  • 大连网站推广价格郑州网站排名优化外包
  • 徐州网站推广优化飞翔时代网站建设
  • 网站开发布局淄博网站建设选哪家
  • 海口高端网站建设网网站建设与设计
  • 郑州网站设计 品牌 视觉wordpress 1h 1g
  • 做网站知识职业生涯规划大赛活动目的
  • 网站开发字体选择国家企业信息信用信息系统查询