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.
I think something wrong with tests.
For n=311 m=10131 the test says
Expected
: 71692423655005205742475058887780204076478173193756056534361211129546043664445431944499667343853437837654574420941236308628252496657306440547150042542033422966836724604589618585313406081996653652790266390363056344043348948460554622622321171105487547727180837279888801878208802638642014343289117270679561876255479945479493366274871820692161157345919355451766369038588713612753294660349103505913526811646787927664100720765220490895831907659845589011856751027720648370221163404996407536536129106286633176735546895953041399202973489205488615661260572453354171008663345444479871804393330314581222773072596927
to equal
: 3
Yes I think something wrong with tests.
For n=311 m=10131 the test say
Expected
: 71692423655005205742475058887780204076478173193756056534361211129546043664445431944499667343853437837654574420941236308628252496657306440547150042542033422966836724604589618585313406081996653652790266390363056344043348948460554622622321171105487547727180837279888801878208802638642014343289117270679561876255479945479493366274871820692161157345919355451766369038588713612753294660349103505913526811646787927664100720765220490895831907659845589011856751027720648370221163404996407536536129106286633176735546895953041399202973489205488615661260572453354171008663345444479871804393330314581222773072596927
to equal
: 3
Tests are not correct, there may exist more than one solution for a specific input!. Both solutions shown below are valid.
Input: [0,2,3,0,2,0,0,5,0,4,5,0,4,0,0,4,2,0,0,0,6,5,2,2,2,2,4,1]
Expected: [ [ 7, 6, 2, 1, 5, 4, 3 ], [ 1, 3, 5, 4, 2, 7, 6 ], [ 6, 5, 4, 7, 3, 2, 1 ], [ 5, 1, 7, 6, 4, 3, 2 ], [ 4, 2, 1, 3, 7, 6, 5 ], [ 3, 7, 6, 2, 1, 5, 4 ], [ 2, 4, 3, 5, 6, 1, 7 ] ]
Actual: [ [ 7, 6, 5, 4, 2, 1, 3 ], [ 3, 4, 2, 5, 1, 7, 6 ], [ 6, 5, 4, 7, 3, 2, 1 ], [ 5, 7, 6, 1, 4, 3, 2 ], [ 4, 3, 1, 2, 7, 6, 5 ], [ 2, 1, 7, 3, 6, 5, 4 ], [ 1, 2, 3, 6, 5, 4, 7 ] ]
for input {2,2,1,3,2,2,3,1,1,2,2,3,3,2,1,3} my algorithm produces valid solution {{1,3,4,2},{4,2,1,3},{3,4,2,1},{2,1,3,4}}
yet the test says it's wrong.