When using this to read and check the input I get NZEC, is there something wrong with the input?
....
int m, r1, r2;
char com[10];
for (int i = 0; i < m; i++)
{
scanf("%s %d %d\n", com, &r1, &r2);
r1--; r2--;
if (com[0] == 'R'){
if (r1>n - 1) return -1;
}
...