compiler error (judge) while submission of code .....

Revision en4, by forget_it, 2019-07-25 05:31:51

Hello ,in last contest (Codeforces Round #575 (Div. 3)) ,there were 2 question D1 and D2 1196D1 - RGB Substring (easy version) and 1196D2 - 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);

solut1

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.

solut2

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 .

@ MikeMirzayanov

Tags judge, #problem, c++ error, #code

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en9 English forget_it 2019-07-25 06:33:19 47 Tiny change: 'lf in it. ' -> 'lf in it. \nlooks like ,i need to work on my code again .'
en8 English forget_it 2019-07-25 06:30:55 1153
en7 English forget_it 2019-07-25 05:58:19 28 Tiny change: '019-07-25]' -> '019-07-25] @ [user:Vovuh]'
en6 English forget_it 2019-07-25 05:36:52 2 Tiny change: 'compiled in on codefo' -> 'compiled it on codefo'
en5 English forget_it 2019-07-25 05:33:54 25 Tiny change: '57713752] , it gives' -> '57713752] and [submission:57714016], it gives'
en4 English forget_it 2019-07-25 05:31:51 86
en3 English forget_it 2019-07-25 05:29:48 4
en2 English forget_it 2019-07-25 05:27:06 40 Tiny change: 'he judge .' -> 'he judge .\n\n @ [user:MikeMirzayanov]'
en1 English forget_it 2019-07-25 05:17:39 1273 Initial revision (published)