3

How can I setup the judge for tree problems on codeforces/polygon?

 1 year ago
source link: http://codeforces.com/blog/entry/107214
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

I am using polygon and code forces to set up problems for students in my university, however, I am struggling with finding the right way to set up the judge for some cases. For example, let's take the problem where they have a tree and an integer kk and they have to find the number of nodes at level kk. If they need to take the node values from the user, how can I know the tree shape they go for?

Let's say there are 3 nodes and their values are 14 15 16, since it is not necessarily a BST, it can be a tree entirely skewed to the left or right or have any of these nodes as roots with others as it is children. Maybe it would be safe to assume that the first value is for the root node but what to do after? I am new to this and lost when it comes to the sample input/output to include along with the judge configuration.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK