----------------------- |1 |2 |3 | | | | | | | | | |-------|-------|-------| |4 |5 |6 | | | | | | | | | |-------|-------|-------| |7 |8 |9 | | | | | | | | | -----------------------
------- ------- ------- | 3 | | 3 | | 5 | |2 3| |3 4| |5 4| | 2 | | 3 | | 3 | ------- ------- ------- ------- ------- ------- | 1 | | 3 | | 2 | |0 3| |4 1| |0 3| | 2 | | 4 | | 3 | ------- ------- ------- ------- ------- ------- | 3 | | 4 | | 1 | |3 5| |3 3| |3 0| | 3 | | 3 | | 5 | ------- ------- -------
----------------------- | 1 | 4 | 1 | |0 3|3 3|3 0| | 2 | 3 | 5 | |-------|-------|-------| | 2 | 3 | 5 | |0 3|3 5|5 4| | 3 | 3 | 3 | |-------|-------|-------| | 3 | 3 | 3 | |2 3|3 4|4 1| | 2 | 3 | 4 | -----------------------
n the size of the board V1 N1 E1 S1 numbers written on each piece V2 N2 E2 S2 read in the order: ........... West, North, East, South Vi Ni Ei Si Remark: the index i = n*n
3 2 3 3 2 3 3 4 3 5 5 4 3 0 1 3 2 4 3 1 4 0 2 3 3 3 3 5 3 3 4 3 3 3 1 0 5
7 8 6 1 9 4 5 2 3Remarks:
Explanation:
4 0 0 0 3 0 0 2 3 1 2 -1 5 6 2 0 5 0 0 0 2 0 3 2 0Example no.2:
5 0 0 0 3 0 0 0 2 0 3 2 0 5 0 0 6 2 0 2 -1 1 2 3 -1 4 0 0 4 3 1Output:
For the example no.1:
6 2 0 5 0 0 2 3 1 2 -1 5 0 0 0 3 0 0 0 2 0 3 2 0
For the example no.2:
4 0 0 4 3 1 5 0 0 6 2 0On the screen, for each set of dates write 'Yes' in case that all the sticks can be picked up, or 'No' contrary.
For the example no.1:
Yes
For the example no.2:
No
Time for test: 30"/test (586 at 133MHz).