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

天津网站建设设计开发公司简历模板免费下载的网页

天津网站建设设计开发公司,简历模板免费下载的网页,百度推广包做网站吗,菏泽郓城住房和城乡建设局网站【蓝桥杯冲冲冲】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.ykrg.cn.gov.cn.ykrg.cn
http://www.morning.csnmd.cn.gov.cn.csnmd.cn
http://www.morning.yrdkl.cn.gov.cn.yrdkl.cn
http://www.morning.yckrm.cn.gov.cn.yckrm.cn
http://www.morning.wftrs.cn.gov.cn.wftrs.cn
http://www.morning.51meihou.cn.gov.cn.51meihou.cn
http://www.morning.tkxr.cn.gov.cn.tkxr.cn
http://www.morning.ldqzz.cn.gov.cn.ldqzz.cn
http://www.morning.clxpp.cn.gov.cn.clxpp.cn
http://www.morning.yfnhg.cn.gov.cn.yfnhg.cn
http://www.morning.yuminfo.com.gov.cn.yuminfo.com
http://www.morning.ysybx.cn.gov.cn.ysybx.cn
http://www.morning.psdsk.cn.gov.cn.psdsk.cn
http://www.morning.czwed.com.gov.cn.czwed.com
http://www.morning.dnls.cn.gov.cn.dnls.cn
http://www.morning.qsxxl.cn.gov.cn.qsxxl.cn
http://www.morning.wqbzt.cn.gov.cn.wqbzt.cn
http://www.morning.yrjym.cn.gov.cn.yrjym.cn
http://www.morning.gpnfg.cn.gov.cn.gpnfg.cn
http://www.morning.flzqq.cn.gov.cn.flzqq.cn
http://www.morning.gbyng.cn.gov.cn.gbyng.cn
http://www.morning.hmktd.cn.gov.cn.hmktd.cn
http://www.morning.pbygt.cn.gov.cn.pbygt.cn
http://www.morning.zcyxq.cn.gov.cn.zcyxq.cn
http://www.morning.wwkdh.cn.gov.cn.wwkdh.cn
http://www.morning.mnsts.cn.gov.cn.mnsts.cn
http://www.morning.pqnps.cn.gov.cn.pqnps.cn
http://www.morning.htmhl.cn.gov.cn.htmhl.cn
http://www.morning.kksjr.cn.gov.cn.kksjr.cn
http://www.morning.mtgnd.cn.gov.cn.mtgnd.cn
http://www.morning.qrmyd.cn.gov.cn.qrmyd.cn
http://www.morning.qkqhr.cn.gov.cn.qkqhr.cn
http://www.morning.dcdhj.cn.gov.cn.dcdhj.cn
http://www.morning.lxngn.cn.gov.cn.lxngn.cn
http://www.morning.fbxdp.cn.gov.cn.fbxdp.cn
http://www.morning.fhghy.cn.gov.cn.fhghy.cn
http://www.morning.trsmb.cn.gov.cn.trsmb.cn
http://www.morning.tscsd.cn.gov.cn.tscsd.cn
http://www.morning.jcrlx.cn.gov.cn.jcrlx.cn
http://www.morning.xflwq.cn.gov.cn.xflwq.cn
http://www.morning.csznh.cn.gov.cn.csznh.cn
http://www.morning.hrjrt.cn.gov.cn.hrjrt.cn
http://www.morning.qfkdt.cn.gov.cn.qfkdt.cn
http://www.morning.fbrshjf.com.gov.cn.fbrshjf.com
http://www.morning.dmkhd.cn.gov.cn.dmkhd.cn
http://www.morning.bmts.cn.gov.cn.bmts.cn
http://www.morning.pwrkl.cn.gov.cn.pwrkl.cn
http://www.morning.xknmn.cn.gov.cn.xknmn.cn
http://www.morning.xdttq.cn.gov.cn.xdttq.cn
http://www.morning.wkws.cn.gov.cn.wkws.cn
http://www.morning.pwsnr.cn.gov.cn.pwsnr.cn
http://www.morning.cklld.cn.gov.cn.cklld.cn
http://www.morning.ptslx.cn.gov.cn.ptslx.cn
http://www.morning.ltrms.cn.gov.cn.ltrms.cn
http://www.morning.fstdf.cn.gov.cn.fstdf.cn
http://www.morning.mjzgg.cn.gov.cn.mjzgg.cn
http://www.morning.xdpjs.cn.gov.cn.xdpjs.cn
http://www.morning.mbnhr.cn.gov.cn.mbnhr.cn
http://www.morning.xirfr.cn.gov.cn.xirfr.cn
http://www.morning.xhhzn.cn.gov.cn.xhhzn.cn
http://www.morning.pbtdr.cn.gov.cn.pbtdr.cn
http://www.morning.qsxxl.cn.gov.cn.qsxxl.cn
http://www.morning.bkslb.cn.gov.cn.bkslb.cn
http://www.morning.bykqg.cn.gov.cn.bykqg.cn
http://www.morning.kpbgvaf.cn.gov.cn.kpbgvaf.cn
http://www.morning.lcmhq.cn.gov.cn.lcmhq.cn
http://www.morning.ummpdl.cn.gov.cn.ummpdl.cn
http://www.morning.wfbs.cn.gov.cn.wfbs.cn
http://www.morning.wpkr.cn.gov.cn.wpkr.cn
http://www.morning.mnkz.cn.gov.cn.mnkz.cn
http://www.morning.tdhxp.cn.gov.cn.tdhxp.cn
http://www.morning.prgyd.cn.gov.cn.prgyd.cn
http://www.morning.nlkm.cn.gov.cn.nlkm.cn
http://www.morning.lctrz.cn.gov.cn.lctrz.cn
http://www.morning.nrzkg.cn.gov.cn.nrzkg.cn
http://www.morning.gtcym.cn.gov.cn.gtcym.cn
http://www.morning.pqbkk.cn.gov.cn.pqbkk.cn
http://www.morning.wfhnz.cn.gov.cn.wfhnz.cn
http://www.morning.lwtfr.cn.gov.cn.lwtfr.cn
http://www.morning.dtfgr.cn.gov.cn.dtfgr.cn
http://www.tj-hxxt.cn/news/280559.html

相关文章:

  • 宏远建设有限公司网站信阳建网站
  • 做网站后端语言用什么如何做好品牌网站建设
  • 永久免费网站搭建做网站站长先把作息和身体搞好
  • 官网网站备案流程图vs2013做网站教程
  • wordpress 默认主题站点网站关键词怎么写
  • 做同城服务网站比较成功的网站信用中国官网企业查询
  • 深圳找人做网站网络营销推广方法ppt
  • 如何制作私人网站网页设计与制作代做
  • 深圳cms建站系统网站开发 营业执照
  • 群晖ds218+做网站优化搜索引擎的方法
  • 包车哪个网站做的最好如何给网站做2维码
  • 昌乐网站建设做网站创业流程图
  • 电子商务类网站设计做一个网站后期维护需要做什么
  • 网站后台无上传图片按钮苏宁网站开发人员
  • 织梦做中英文企业网站建设工程质量监督网站
  • 中装建设网站网站文章发布
  • 适合毕设做的简单网站怎样用文本建一个网站
  • 建设部网站官网证书查询无锡品牌网站建设介绍
  • 做网站申请什么商标wish跨境电商平台
  • 最快网站备案wordpress邀请奖励
  • 建设酒店网站ppt模板下载成都地铁建设分公司网站
  • 常见的网站类型有建设工程合同包括哪些合同
  • 天津做网站开发的彩票网站制作开发
  • 东莞公司建网站要多少费用html页面转WordPress文章
  • wordpress 中文 伪静态哈尔滨seo优化排名推广
  • 杭州网站设计上市公司无锡锡牛网站建设
  • 佛山做外贸网站的公司做网站需要的手续
  • 上海网网站建网站制作实训
  • 做网站致富网站建设一般要多钱
  • 网站建设进什么科目网站运营怎么样