摘要:
【题目描述】 在一个 4×4 的方框内摆放了若干个相同的玩具,某人想将这些玩具重新摆放成为他心中理想的状态,规定移动时只能将玩具向上下左右四个方向移动,并且移动的位置不能有玩具,请你用最少的移动次数将初始的玩具状态移动到目标状态。 【输入】 前四行表... 阅读全文
posted @ 2022-09-20 22:51
老程序员111
阅读(103)
评论(0)
推荐(0)
摘要:
【题目描述】 给定一个 r 行 c 列的在电视上的“虚拟键盘”,通过「上,下,左,右,选择」共 555 个控制键,你可以移动电视屏幕上的光标来打印文本。一开始,光标在键盘的左上角,每次按方向键,光标总是跳到下一个在该方向上与当前位置不同的字符,若不存在则... 阅读全文
posted @ 2022-09-20 22:51
老程序员111
阅读(235)
评论(0)
推荐(0)
摘要:
信息学奥赛全套资料 OJ网站:点击这里 最近在学习人工智能,发现了一个不错的网站,有兴趣的话可以看一下:点击这里 【语言及算法基础篇】 第一部分:C++语言 第一章:C++语言入门 Hello,World!(信息学奥赛一本通-T1001):点击这里 输出第二个整数(信息学奥赛一本通-T1002):点 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(6000)
评论(1)
推荐(0)
摘要:
Problem Description Years later, Jerry fell in love with a girl, and he often walks for a long time to pay visits to her. But, ... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(52)
评论(0)
推荐(0)
摘要:
Problem Description You’ve finally got mad at “the world’s most stupid” employees of yours and decided to do some firings. You’... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(63)
评论(0)
推荐(0)
摘要:
【概述】 给出一个有向图,每一个点都有一个权值,现在要选择一个权值和最大的子图,使得每个点的后继都在子图中,这个子图就称为最大权闭合子图。 如上图,能选的子图有:Ø、{1,2,3,4,5,6}、{3,6}、{2,4,5,6}、{4,6}、{5,6}、{6}、... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(74)
评论(0)
推荐(0)
摘要:
Problem Description Master QWsin is dating with Sindar. And now they are in a restaurant, the restaurant has n dishes in order.... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(30)
评论(0)
推荐(0)
摘要:
【概述】 在求解费用流时,大多数情况都是使用基于 SPFA 的 MCMF 算法,但有时某些毒瘤题会卡 SPFA,此时就要利用基于 Dijkstra 的费用流来求解。 【算法原理】 基于 Dijkstra 的费用流实质上就是在 MCMF 中代替 SPFA 来找增... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(323)
评论(0)
推荐(1)
摘要:
Problem Description Again Alice and Bob is playing a game with stones. There are N piles of stones labelled from 1 to N, the i ... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(197)
评论(0)
推荐(0)
摘要:
Problem Description Farmer John keeps a website called ‘FansBlog’ .Everyday , there are many people visited this blog.One day, ... 阅读全文
posted @ 2022-09-20 22:50
老程序员111
阅读(32)
评论(0)
推荐(0)

浙公网安备 33010602011771号