问题
I want to solve Project Euler's problem #68 in C#, but I've so far not understood the question clearly. What does external node mean in this problem statement?
Consider the following "magic" 3-gon ring, filled with the numbers 1 to 6, and each line adding to nine.
4 \ 3 / \ 1 - 2 - 6 / 5
Working clockwise, and starting from the group of three with the numerically lowest external node (4,3,2 in this example), each solution can be described uniquely. For example, the above solution can be described by the set: 4,3,2; 6,2,1; 5,1,3.
回答1:
'External node' is a node not included in the inner triangle (pentagon). On the first picture, 4, 5 and 6 are external nodes.
Regarding 'helping to understand the question', what other parts confuse you?
edit
In the first sentence it says 'each line adding to nine', 9 here is the total. You can calculate the 'total' of each solution by summing up numbers in any of 3 lines.
回答2:
@Kristo Aun: Think of the '4,3,2; 6,2,1; 5,1,3' > '4,2,3; 5,3,1; 6,1,2' as numbers, which means 432621513 > 423531612. The numbers come from a single line in any order, though you need to start clockwise.
回答3:
In the task, they say "By concatenating each group it is possible to form 9-digit strings; the maximum string for a 3-gon ring is 432621513."
What is meant by 'maximum'? How come '4,3,2; 6,2,1; 5,1,3' > '4,2,3; 5,3,1; 6,1,2'? It certainly doesn't make sense in terms of set theory...
来源:https://stackoverflow.com/questions/6394577/what-is-an-external-node-of-a-magic-3-gon-ring