水题
小伙子开的什么车啊
这个作者很懒,什么都没留下…
展开
-
DFS初步:递推,递归
A - 一只小蜜蜂... 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。 其中,蜂房的结构如下所示。 Input输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0 Output对于每个测试实例,请输出蜜蜂从蜂房a爬到蜂房b的可能路线数,每个实例的输出占一行。 Sample I原创 2017-01-13 19:07:40 · 776 阅读 · 0 评论 -
HDOJ 1508 Humble Numbers
Problem Description A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the fir原创 2017-07-10 20:04:07 · 234 阅读 · 0 评论 -
Escape from Stones -DFS
Squirrel Liss lived in a forest peacefully, but unexpected trouble happens. Stones fall from a mountain. Initially Squirrel Liss occupies an interval [0, 1]. Next, nstones will fall and Liss will es原创 2017-07-04 12:29:47 · 339 阅读 · 0 评论 -
Ants -暴力枚举
Ants An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it immediatelly falls off it. When two ants mee原创 2017-07-04 11:27:15 · 264 阅读 · 0 评论 -
bfs入门题5道
Red and Black 原题:There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent原创 2017-01-13 18:41:48 · 400 阅读 · 0 评论 -
Codeforces Round #461 (Div. 2) C. Cave Painting(暴力)
C. Cave Painting time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Imp is watching a documentary about cave painting. Some numbers, carved ...原创 2018-02-26 20:07:29 · 156 阅读 · 0 评论 -
Codeforces Round #461 (Div. 2) B. Magic Forest(DFS)
B. Magic Forest time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Imp is in a magic forest, where xorangles grow (wut?)A xorangle of order n原创 2018-02-26 19:57:38 · 137 阅读 · 0 评论 -
Codeforces Round #469 (Div. 2)B. Intercepted Message
B. Intercepted Message time limit per test1 second memory limit per test512 megabytes inputstandard input outputstandard output Hacker Zhorik wants to decipher two secret messages he intercepted y原创 2018-03-10 09:25:29 · 208 阅读 · 0 评论