挑战程序设计竞赛
弱鸡一刷挑战程序设计竞赛,好题汇总
Tech_hysteria
We are all in the gutter,but some of us are looking at the stars.
展开
-
初级篇——穷竭搜索——广度优先搜索 aoj 0121 seven puzzle
7 puzzles The 7-puzzle consists of eight square cards and a frame that fits these cards snugly. Each card is numbered 0, 1, 2, …, 7 to distinguish them from each other. You can stack two cards vertica...原创 2020-04-21 20:30:39 · 171 阅读 · 0 评论 -
初级篇——穷竭搜索——深度优先搜索 poj3009Curling 2.0
Description On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square ...原创 2020-04-21 14:13:28 · 155 阅读 · 0 评论 -
spoj#GCJ1C09C - Bribe the Prisoners
Problem In a kingdom there are prison cells (numbered 1 to P) built to form a straight line segment. Cells number i and i+1 are adjacent, and prisoners in adjacent cells are called “neighbours.” A wal...原创 2020-03-15 20:54:20 · 125 阅读 · 0 评论 -
poj#3723Conscription
Description Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his soldiers. To collect a soldier without an...原创 2020-03-13 18:46:43 · 134 阅读 · 0 评论 -
poj#3255Roadblocks
Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly, because she likes the scenery along ...原创 2020-03-13 15:10:17 · 109 阅读 · 0 评论 -
百练#1182食物链
描述: 略 #include<iostream> using namespace std; const int MAX = 50010 * 3; int par[MAX],Rank[MAX]; int find(int x){ if(x == par[x]) return x; return par[x] = find(par[x]); } void unite(int x,i...原创 2020-03-12 15:58:22 · 89 阅读 · 0 评论 -
百练#2431:Expedition
描述: 略。 #include<iostream> #include<queue> #include<algorithm> using namespace std; struct stop{ int pos,fuel; bool operator < (const stop& rhs)const{ return this -> pos...原创 2020-03-11 20:47:54 · 77 阅读 · 0 评论 -
poj#3253Fence Repair
Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length...原创 2020-02-24 15:45:42 · 54 阅读 · 0 评论 -
百练#3752走迷宫
描述 一个迷宫由R行C列格子组成,有的格子里有障碍物,不能走;有的格子是空地,可以走。 给定一个迷宫,求从左上角走到右下角最少需要走多少步(数据保证一定能走到)。只能在水平方向或垂直方向走,不能斜着走。 输入 第一行是两个整数,R和C,代表迷宫的长和宽。( 1<= R,C <= 40) 接下来是R行,每行C个字符,代表整个迷宫。 空地格子用’.‘表示,有障碍物的格子用’#‘表示。 迷宫...原创 2020-02-18 14:55:04 · 166 阅读 · 0 评论 -
百练#1852Ants
描述 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 meet they ...原创 2020-02-18 11:18:29 · 82 阅读 · 0 评论