Gives wrong answer while submitting but correct when using custom test case


#1

7 2 G 2 S 2 6 G 1 S 1 5 S 1 2 G 1 G 2
This test case is failing while submitting.


#2

Clear all global variables in constructor.