When I check my solution to unfair
district - I get a differnt answer
than when I run it on my PC with
the same input.
I get the following when I check:
Your result:[]
Right result:[15,[[[1,0],[0,5],[0,1],
[5,0],[1,0]],[[0,2],[0,3],[0,2],
[0,4],[2,0]],[[3,0],[4,0],[1,0],
[0,5],[0,4]],[[0,5],[0,3],[2,0],
[5,0],[0,3]],[[0,4],[0,1],[0,2],
[0,3],[0,4]]]]
Fail:unfair_districts(15,[[[1,0],
[0,5],[0,1],[5,0],[1,0]],[[0,2],
[0,3],[0,2],[0,4],[2,0]],[[3,0],
[4,0],[1,0],[0,5],[0,4]],[[0,5],
[0,3],[2,0],[5,0],[0,3]],[[0,4],
[0,1],[0,2],[0,3],[0,4]]])
When I run this on my own PC with the same problem
and my debug frame I get:
The part between ====> and <==== is specifically
what I return
[[1, 0], [0, 5], [0, 1], [5, 0], [1, 0]]
[[0, 2], [0, 3], [0, 2], [0, 4], [2, 0]]
[[3, 0], [4, 0], [1, 0], [0, 5], [0, 4]]
[[0, 5], [0, 3], [2, 0], [5, 0], [0, 3]]
[[0, 4], [0, 1], [0, 2], [0, 3], [0, 4]]
====> ['AABCC', 'ABBBC', 'AADBC', 'EEDDC', 'EEEDD'] <====
[[1, 0], [0, 5], [0, 1], [5, 0], [1, 0]] AABCC
[[0, 2], [0, 3], [0, 2], [0, 4], [2, 0]] ABBBC
[[3, 0], [4, 0], [1, 0], [0, 5], [0, 4]] AADBC
[[0, 5], [0, 3], [2, 0], [5, 0], [0, 3]] EEDDC
[[0, 4], [0, 1], [0, 2], [0, 3], [0, 4]] EEEDD
District[ A ] currently has 15 people
District[ B ] currently has 15 people
District[ C ] currently has 15 people
District[ D ] currently has 15 people
District[ E ] currently has 15 people
nPeople= 15 Total= 75
Votes: 3 2
Took 0.8194867107491284 seconds
Enter to Continue:
I will place attach Source:
Created at: 2017/12/29 20:30; Updated at: 2017/12/30 04:46