|
|
|
|
|
|
x********n 发帖数: 170 | 1 这道题自己实在是完全没有头绪
Write a program to synchronize data sets between data centers using as few
copies as possible.
Example 1: ---------- Input: 4 1 3 4 1 2 3 1 3 1 4 2 One Possible Correct
Output: 2 2 1 4 1 2 2 2 3 4 4 3 3 1 4 done
nput:
line1: number of data sets
line2,3,4... = the actual data sets
Output:
optimal copy strategy:
each line must contain one copy instruction
Eg: 4 1 2 means move number 4 from data set 1 to data set 2 | c********p 发帖数: 1969 | | q****o 发帖数: 57 | | r*****e 发帖数: 792 | 4 这题是他家online testing的二题之一啊,
一直没换过啊。
【在 x********n 的大作中提到】 : 这道题自己实在是完全没有头绪 : Write a program to synchronize data sets between data centers using as few : copies as possible. : Example 1: ---------- Input: 4 1 3 4 1 2 3 1 3 1 4 2 One Possible Correct : Output: 2 2 1 4 1 2 2 2 3 4 4 3 3 1 4 done : nput: : line1: number of data sets : line2,3,4... = the actual data sets : Output: : optimal copy strategy:
|
|
|
|
|
|
|