Why my code gives segfault/stackoverflow in local computer and gives AC in codeforces?

Правка en1, от aryan57, 2021-05-06 13:22:36

I was solving https://codeforces.me/contest/1498/problem/C on cf . My c++ code got accepted but it is giving segmentation fault in my local computer. Why is it so? I also tried other online compilers like ideone , and it was working there too.

Same case with java. My java code got AC in cf but gives stackoverflow error in my computer.

My operating system is Ubuntu 20.04

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский aryan57 2021-05-06 13:23:36 16
en1 Английский aryan57 2021-05-06 13:22:36 619 Initial revision (published)