
ACM-数据结构
文章平均质量分 76
wb129945130
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU1276:士兵队列训练
Description 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。 Input 本题有多个测试数据组,第一行为组数N,接着原创 2015-07-25 16:21:02 · 498 阅读 · 0 评论 -
CodeForces 560A
Description A magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the system is not perfect and sometimes it happens that原创 2015-07-25 16:09:39 · 509 阅读 · 0 评论 -
Uva 673 Parentheses Balance 平衡的括号
You are given a string consisting of parentheses () and []. A string of this type is said to be correct: (a) if it is the empty string (b) if A and B are correct, AB is correct, (c) if A i原创 2015-07-22 17:14:12 · 487 阅读 · 0 评论 -
Codeforces546C:Soldier and Cards
DescriptionTwo bored soldiers are playing card war. Their card deck consists of exactly n cards, numbered from 1 to n, all values are different. They divide cards between them in some manner, it’s poss原创 2015-07-23 10:16:30 · 462 阅读 · 0 评论 -
归并排序
void Merge(int array[], int start, int mid, int end)//归并排序的合并算法{ int temp1[10], temp2[10]; int n1, n2; n1 = mid - start + 1; n2 = end - mid; for (int i = 0; i < n2; i++){原创 2015-08-04 10:14:25 · 294 阅读 · 0 评论 -
POJ2299 Ultra-QuickSort
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence i原创 2015-08-04 16:17:20 · 337 阅读 · 0 评论 -
UVa 714 Copying Books
Before the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so called scribers. The scriber had been given a book and after severa原创 2015-08-05 19:38:22 · 303 阅读 · 0 评论