- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 HDU 4528 小明系列故事——捉迷藏 bfs
小明的妈妈生了三个孩子,老大叫大明, 老二叫二明, 老三..., 老三自然就叫小明了。 一天,小明的妈妈带小明兄弟三人去公园玩耍,公园里面树木很多,有很多地方可以藏身, 于是他们决定玩捉迷藏。经过几轮的猜拳后,第一轮是小明来找其他两个人,游戏规则很简单: 只要小明可以在规定的时间内找到他们就算小明获胜,并且被发现的两个人猜拳决定谁在下一轮负责找人;如果在规定的时间内只找到一个人,那么没有被...
2018-02-23 12:22:26 428
原创 HDU 1016 && Uva 524 Prime Ring Problem(素数环)
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. Note: the number of f...
2018-02-14 01:15:28 251
原创 Uva 725 Division (暴力搜索求解,入门题)
Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0 through 9 once each, such that the first number divided by the second is equal to an integer N, ...
2018-02-12 22:23:20 257
原创 Uva 514 Rails (STL 栈+队列 模拟)
There is a famous railway station in PopPush City. Country there is incredibly hilly. The stationwas built in last century. Unfortunately, funds were extremely limited that time. It was possible toest...
2018-02-08 12:59:03 247
原创 ACM/ICPC World Finals 1990 && UVA 201 Squares(数正方形)
A children’s board game consists of a square array of dots that contains lines connecting some of the pairs of adjacent dots. One part of the game requires that the players count the number of square
2018-02-05 05:54:39 500
原创 ACM/ICPC Fuzhou 2011 && HDU 4121 下象棋 (超详细思路 全局判断)
Xiangqi is one of the most popular two-player board games in China. The game represents a battle between two armies with the goal of capturing the enemy’s “general” piece. In this problem, you are giv
2018-02-05 03:21:32 459 1
原创 HDU - 1232、1863 畅通工程 (初识并查集)
某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路数目M;随后的M行对应M条道路...
2018-02-03 01:37:05 137
原创 CodeForces - 576A Vasya and Petya's Game 质数筛选
Vasya and Petya are playing a simple game. Vasya thought of number x between 1 and n, and Petya tries to guess the number. Petya can ask questions like: "Is the unknown number divisible by number y?"
2018-02-01 05:44:57 321
多种群遗传算法函数优化
2018-03-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人