dfs
文章平均质量分 73
lalalallalalalala
时光静好,与君语;细水流年,与君同;繁华落尽,与君老
展开
-
Seeding
Problem Description It is spring time and farmers have to plant seeds in the field. Tom has a nice field, which is a rectangle with n * m squares. There are big stones in some of the squares. Tom has原创 2015-08-09 16:03:14 · 356 阅读 · 0 评论 -
Avoid The Lakes
Problem Description Farmer John’s farm was flooded in the most recent storm, a fact only aggravated by the information that his cows are deathly afraid of water. His insurance agency will only repay h原创 2015-08-09 16:04:47 · 367 阅读 · 0 评论 -
CZY的组合数烦恼
时间限制: 3 Sec 内存限制: 128 MB 提交: 55 解决: 25 [提交][状态][讨论版] 题目描述 czy最近对组合数产生了浓厚的兴趣,一天他心血来潮,想排n个数字,但是很快他发现种类太多了,于是他决定从中随机找出m个数排,但还是太多了,所以他想请聪明的你写个程序帮助他找到所有种类的排列输入 输入包括多组测试数据,每组包括一行整数n(1<=n<10),m(1<=m<=n原创 2015-08-11 11:28:27 · 424 阅读 · 0 评论 -
变形课
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Problem Description 呃……变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那原创 2015-08-10 09:24:37 · 4026 阅读 · 0 评论 -
海域, 冰山, 战舰
时间限制: 1 Sec 内存限制: 128 MB 提交: 33 解决: 11 [提交][状态][讨论版]题目描述 给出一个n * n的海洋,#代表海域,.代表冰山,要在海域中放置k个战舰,战舰会攻击同一行同一列的其他战舰,所以同一行同一列不能放置其他战舰,问摆放战舰的方案数目C有多少种(数据保证C<2^31)。输入 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,(n原创 2015-08-20 11:49:13 · 657 阅读 · 0 评论