Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
OP solved it, closing
You are both wrong.
A wants most gold, B wants most gold, both play optimally, A starts.
In first example, A can take 958. Why would he settle for 937?
Is there even anything like
java.regex
?well what I understood is you want A to have most of gold in every possible situation. In your case it would A takes 569, B takes 809, A takes 389 and finally B takes 128 which results in [958, 937] so A has more gold than B condition is filled. I might be wrong so everyone can correct me.
PS: Not in every case you have to take highest number from golds list by A programmer.