Hello ,in last contest (Codeforces Round #575 (Div. 3)) ,there were 2 question D1 and D2 [problem:RGB Substring (easy version)] 1196D1 - RGB Substring (easy version) , 1196D2]AND [PROBLEM:RGB SUBSTRING (HARD VERSION) - RGB Substring (hard version) . when i submitted my solution to it 57713752 , it gives wrong answer on test 4 on both question,later i checked ,what was test 4 and compiled in on codeforces compiler , i got correct output . here are screenshots . why output of online judge differs and give wrong answer??? ...
in below picture you can see judge gave wrong answer on test 4 ,expected was 219 and system got 218 from my code on its first test case of 4th test. (in both question D1 and D2);
later when i tested that on cf compiler it gives has given correct output for the given test case 4 (1st test case) i got 219 ans.
i think my code is correct .. how can a same code give two different output on two different places. do i need to add something else to make it understand to the judge .