![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
文章平均质量分 88
年轻过成了秃顶
这个作者很懒,什么都没留下…
展开
-
A - 棋盘问题
题目描述:在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k <...原创 2019-02-11 21:06:37 · 193 阅读 · 0 评论 -
F1. Spanning Tree with Maximum Degree
题目描述:You are given an undirected unweighted connected graph consisting of nn vertices and mm edges. It is guaranteed that there are no self-loops or multiple edges in the given graph.Your task is to...原创 2019-03-08 12:59:36 · 470 阅读 · 0 评论 -
7-3 大家一起来玩游戏 (20 分)
题目描述:24点是一种益智游戏,24点是把4个整数(一般是正整数)通过加减乘除以及括号运算,使最后的计算结果是24的一个数学游戏,24点可以考验人的智力和数学敏感性,它能在游戏中提高人们的心算能力。 24点通常是使用扑克牌来进行游戏的,一副牌中抽去大小王后还剩下52张(如果初练也可只用1~10这40张牌),任意抽取4张牌(称为牌组),用加、减、乘、除(可加括号)把牌面上的数算成24。每张牌必须只...原创 2019-03-15 17:35:04 · 1678 阅读 · 0 评论 -
7-12 拯救007 (25 分)
题目描述:在老电影“007之生死关头”(Live and Let Die)中有一个情节,007被毒贩抓到一个鳄鱼池中心的小岛上,他用了一种极为大胆的方法逃脱 —— 直接踩着池子里一系列鳄鱼的大脑袋跳上岸去!(据说当年替身演员被最后一条鳄鱼咬住了脚,幸好穿的是特别加厚的靴子才逃过一劫。)设鳄鱼池是长宽为100米的方形,中心坐标为 (0, 0),且东北角坐标为 (50, 50)。池心岛是以 (0,...原创 2019-03-15 11:56:57 · 2351 阅读 · 0 评论 -
I - Mine Sweeper
题目描述:The game Minesweeper is played on an n by n grid. In this grid are hidden m mines, each at a distinct grid location. The player repeatedly touches grid positions. If a position with a mine is to...原创 2019-02-11 21:39:45 · 214 阅读 · 0 评论 -
H - Oil Deposits
题目描述:The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divi...原创 2019-02-11 21:33:33 · 162 阅读 · 0 评论 -
G - Lake Counting
题目描述:Due to recent rains, water has pooled in various places in Farmer John’s field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square conta...原创 2019-02-11 21:30:54 · 196 阅读 · 0 评论 -
E - 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 tiles. But h...原创 2019-02-11 21:25:22 · 254 阅读 · 0 评论 -
C - Catch That Cow(抓住那只牛)
题目描述:Farmer 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 (0 ≤ K ≤...原创 2019-02-11 21:18:14 · 925 阅读 · 0 评论 -
F. Graph Without Long Directed Paths
题目描述:You are given a connected undirected graph consisting of n vertices and medges. There are no self-loops or multiple edges in the given graph.You have to direct its edges in such a way that the...原创 2019-04-01 20:16:35 · 480 阅读 · 0 评论