Please note: the language of this site will now be ENGLISH. Please do not use another language since visitors from different countries will participate in training.

Week 2 - Tasks Backtracking

The tasks for week 2 are as follows:

Week problem: CV -> 10503 The dominoes solitaire
Weekend problem: CIII -> 10309 Turn the Lights Off
Suggested bonus: CXI -> 11195 Another n-Queen Problem

You must submit your solutions on http://uva.onlinejudge.org/

You can browse to these problems from the online judge website by clicking on Browse Problems, Contest Volumes, and then selecting the contest volume as indicated above.

asked Jun 12, 2012 in Tasks by eljakim

Please post below which of the questions you have been able to finish.

For each task, please let us know how much time you have spent on understanding / coding / debugging.

For each task let us know what the hardest part was. (This can be anything, ranging from not having read the problem to forgetting about a border case, to a semicolon in the wrong spot that screwed up an if-statement...)

1 Answer

0 votes

In the sample input of the week problem, I have a question regarding the second case:
2
4
0 1
3 4
1 4
4 4
3 2
5 6

Which means the start is 0 1 and the end 3 4 and there are 2 spaces. Then why isn't the sequence 0 1 : 1 4 : 4 4 : 4 3 valid? The sample output clearly says NO.

answered Jun 24, 2012 by niomaster
edited Jun 25, 2012 by niomaster

It appears that the key phrase is

in the next line the piece to be placed on the left, with the two values in the piece
separated by a space and in the same way that the numbers appear in the row,
in the following lines the piece to be placed on the right, with the two values in
the piece separated by a space and in the same way that the numbers appear
in the row

I think they are trying to say that you cannot turn around the start and end piece.

This also matches nicely with the example; your 'solutions' turns the 3-4 piece around.

Kim

Thanks. I'm never any good at reading the assignment properly. :P

NL: NIO UK: BIO Int: IOI
...