Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inputs(Name,n,k):
- [('a',30,40),('b',40,50),('c',30,15)]
- [('a',30,30),('b',20,20)]
- [('a',30,100),('b',30,2),('c',40,0)]
- [('a',344,333),('b',344,200),('c',2,2)]
- [('a',450,400),('b',300,300),('c',35,55)]
- outputs(P1,P2,Amount)-P1 owes Amount to P2:
- [('c','a',10),('c','b',5),('owner','b',5)] or [('c','b',10),('c','a',5),('owner','a',5)]
- []
- [('owner','a',2),('b','a',28),('c','a',40)] PS: [('owner','a',2),('b','a',68),('c','b',40)] is not a valid answer even though number of transactions is same as it is not the most simplified version.
- [('a','owner',11),('b','owner',144)]
- [('a','owner',30),('a','c',20)]
Add Comment
Please, Sign In to add comment