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
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
问题描述:
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabeti...
分类:
其他好文 时间:
2014-06-10 06:13:21
阅读次数:
299
问题描述:
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