http://poj.org/problem?id=1026
大致题意:给出数字n和一个1~n的序列num[]。然后给出若干个字符串,让字符串的下标i和num[i]交换,问交换K次后得到的字符串是什么。输入的字符串长度小于等于n,若小于n就用空格来补。
例如样例1
4 5 3 7 2 8 1 6 10 9
H e L L o B o b ' ' ' '
...
分类:
其他好文 时间:
2014-06-10 14:50:20
阅读次数:
213
Problem A: C++习题 抽象基类
Description
编写一个程序,声明抽象基类Shape,由它派生出3个派生类: Circle(圆形)、Rectangle(矩形)、Triangle(三角形),用一个函数printArea分别输出以上三者的面积(结果保留两位小数),3个图形的数据在定义对象时给定。
Input
圆的半径
矩形的边长
三角...
分类:
其他好文 时间:
2014-06-10 14:32:52
阅读次数:
170
Online Judge
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4977 Accepted Submission(s): 1889
Problem Description
Ignatius is b...
分类:
其他好文 时间:
2014-06-10 08:15:02
阅读次数:
214
A1 = ?
Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4682 Accepted Submission(s): 2990
Problem Description
有如下方程:Ai = (Ai-1 + Ai...
分类:
其他好文 时间:
2014-06-10 08:07:18
阅读次数:
145
Description
Problem A
The Most Distant State
Input: standard input
Output: standard output
The 8-puzzle is a square tray in which eight square tiles are placed. The remaining ninth square ...
分类:
其他好文 时间:
2014-06-10 07:59:06
阅读次数:
335
Graph coloring is the problem of assigning a color to each vertex of an undirected graph such that no two adjacent vertices have the same color. We implement the greedy algorithm from Scalable parallel graph coloring algorithms. The algorithm iteratively f...
分类:
其他好文 时间:
2014-06-10 07:10:19
阅读次数:
260
How many ways
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2594 Accepted Submission(s): 1528
Problem Description
这是一个简单的生存游戏,你控...
分类:
其他好文 时间:
2014-06-10 07:05:49
阅读次数:
188
Picnic Cows
Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1563 Accepted Submission(s): 478
Problem Description
It’s summer voc...
分类:
其他好文 时间:
2014-06-10 07:00:32
阅读次数:
262
问题描述:
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn1 + Fn2,
where F1 = 1 and F2 = 1.
Hence the first 12 terms will be:
F1 = 1
F2 = 1
F3 = 2
F4 = 3
F5 = 5
F6 = 8
...
分类:
其他好文 时间:
2014-06-10 06:10:06
阅读次数:
307
MAX Average Problem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5825 Accepted Submission(s): 1446
Problem Description
Consid...
分类:
其他好文 时间:
2014-06-10 06:09:25
阅读次数:
293