I consider the problem is with my I/O, as the first test my programme passes. Here is my code:Your program ('prg') exited with signal #139 () when presented with test case 2, shown below...
[cpp]
#include <stdio.h>
#include <stdlib.h>
[global variables declaration]
int main(void)
{
FILE *fin, *fout;
fin = fopen("prg.in", "r");
fout = fopen("prg.out", "w");
fscanf(fin, "%d %d %d\n", &a, &b, &n);
[ ...C O D E ...]
fprintf(fout, "%d %d\n", q+1, color[q]);
exit(0);
}
[/cpp]
Can anyone help me?
