
搜索
team39
喜欢写注释
展开
-
组合数
http://59.69.128.203/JudgeOnline/problem.php?pid=32组合数时间限制:3000 ms | 内存限制:65535 KB 难度:3描述 找出从自然数1、2、... 、n(0<n<10)中任取r(0<r<=n)个数的所有组合。输入 输入n、r。 输出 按特定顺序输出所有组合。原创 2018-02-06 11:18:55 · 197 阅读 · 0 评论 -
F - 野茫茫 HDU - 1010
F - 野茫茫HDU - 1010 The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie ...原创 2018-04-29 14:09:26 · 130 阅读 · 0 评论 -
Q - A Knight's Journey
Q - A Knight's JourneyBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it ...原创 2018-04-28 20:23:25 · 140 阅读 · 0 评论 -
B - 下沙小面的(2)
B - 下沙小面的(2)前文再续,书接上一题。话说当上小面的司机的Lele在施行他的那一套拉客法则以后,由于走的路线太长,油费又贵,不久便亏本了。(真可怜~)于是他又想了一个拉客的办法。对于每一次拉客活动,他一次性把乘客都拉上车(当然也不会超过7个,因为位置只有7个)。然后,Lele计算出一条路线(出于某些目的,Lele只把车上乘客的目的地作为这条路线上的站点),把所有乘客都送到目的地...原创 2018-04-13 21:20:48 · 120 阅读 · 0 评论 -
G - G hdu Find a way
G - G hdu Find a wayPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yife...原创 2018-04-18 17:18:05 · 163 阅读 · 0 评论 -
J - Dungeon Master
J - Dungeon Master You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move on...原创 2018-04-18 15:08:11 · 140 阅读 · 0 评论 -
G - Red and Black
G - Red and BlackThere 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 t...原创 2018-04-17 21:26:37 · 136 阅读 · 0 评论 -
F - Spotlights
Theater stage is a rectangular field of size n × m. The director gave you the stage's plan which actors will follow. For each cell it is stated in the plan if there would be an actor in this cell or n...原创 2018-04-17 19:20:52 · 179 阅读 · 0 评论 -
D - 水陆距离 HihoCoder - 1478
给定一个N x M的01矩阵,其中1表示陆地,0表示水域。对于每一个位置,求出它距离最近的水域的距离是多少。 矩阵中每个位置与它上下左右相邻的格子距离为1。 Input 第一行包含两个整数,N和M。 以下N行每行M个0或者1,代表地图。 数据保...原创 2018-04-11 20:55:35 · 242 阅读 · 0 评论 -
L - 棋盘问题
L - 棋盘问题在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input 输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n ...原创 2018-04-17 12:49:03 · 314 阅读 · 0 评论 -
A - Kill the monster
A - Kill the monster There is a mountain near yifenfei’s hometown. On the mountain lived a big monster. As a hero in hometown, yifenfei wants to kill it. Now we know yifenfei have n spells, and the m...原创 2018-04-10 17:17:38 · 224 阅读 · 0 评论 -
T - Catch That Cow Catch That Cow
Catch That CowFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K ...原创 2018-04-14 21:35:14 · 205 阅读 · 0 评论 -
汉诺塔
汉诺塔问题:若n==1,直接将n从A移到C;若n==2,现将第1块从A移到B,再将第二块移到C,再将1移到C;第n块,1:将第n-1从A借助C移到B, 2:将第n块移到C, 3:再将第n-1从B借助A移到C; 于是: 总的步数f(n) = 2*f(n-1)+1;#include <stdio.h> void move(int n,c...原创 2018-02-14 20:33:15 · 160 阅读 · 0 评论 -
部分和问题
部分和问题时间限制:1000 ms | 内存限制:65535 KB难度:2描述 给定整数a1、a2、.......an,判断是否可以从中选出若干数,使它们的和恰好为K。输入 首先,n和k,n表示数的个数,k表示数的和。接着一行n个数。(1输出 如果和恰好可以为k,输出“YES”,并按输入顺序依次输出是由哪几个数的和组成原创 2018-02-06 15:55:56 · 632 阅读 · 1 评论 -
Fire Net —— dfs搜索
Fire NetSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small...原创 2018-07-26 14:55:15 · 116 阅读 · 0 评论