|
|
вернуться в форумUseful Test Sample I had a small bug in my code. I found it using my test sample. I would like to share it with you. I have used some extra white space in the boolean expression. I am not sure if it is necessary, you can remove them. Input: (NOT ( (NOT NOT TRUE ) AND A) OR (B AND C AND D)) OR E 3 10 14 -3 -3 -3 -1 -3 3 -1 1 0 -2 2 -1 2 3 3 -3 3 0 3 2 -3 -2 A -2 -3 A -2 -1 A -1 -3 D -1 -1 Z 0 -3 C 0 -1 C 1 -3 E 1 0 A 2 -3 B 2 0 A 2 1 E 3 -1 E 3 3 B 0 0 1 0 2 0 3 0 3 1 3 2 2 2 1 2 0 2 -1 2 -2 2 -3 2 Output: 0 0 1 0 2 0 3 0 3 -1 3 -2 3 -3 2 -3 1 -3 0 -3 -1 -3 -2 -3 -3 -3 -3 -2 -3 -1 -2 -1 -1 -1 0 -1 1 -1 2 -1 2 0 2 1 2 2 2 3 3 3 This is how the table looks like: (1 means there is a Fork and * means empty cell) 1 A 1 * * * 1 A * A * * * * D * Z * 1 * * C 1 C * * * * E * * A * * * B * 1 A E * 1 1 * E 1 * 1 B |
|
|