Submission #392149

#TimeUsernameProblemLanguageResultExecution timeMemory
392149rainboyGondola (IOI14_gondola)C11
Compilation error
0 ms0 KiB
#include "gondola.h"

#define A	250000

int valid(int n, int aa[]) {
	static char used[A + 1];
	int i, j;

	for (i = 0; i < n; i++) {
		if (used[aa[i]])
			return 0;
		used[aa[i]] = 1;
	}
	for (i = 0; i < n; i++)
		if (aa[i] <= n) {
			for (j = 0; j < n; j++)
				if (aa[(i + j) % n] <= n && aa[(i + j) % n] != (aa[i] - 1 + j) % n + 1)
					return 0;
			return 1;
		}
  return 1;
}

int replacement(int n, int aa[], int bb[]) {
  return -2;
}

int countReplacement(int n, int aa[]) {
  return -3;
}

Compilation message (stderr)

grader.c: In function 'main':
grader.c:37:1: error: a label can only be part of a statement and a declaration is not a statement
   37 | int ans =(  countReplacement(n, gondolaSequence));
      | ^~~