aboutsummaryrefslogtreecommitdiff
path: root/test/012_math_permsign/permsign_tests.c
blob: 8c652b514e81f4ce3ecf3e2c0b096a4de848c7d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "../test.h"

int permsign(size_t n, const uint8_t *);

void run(void) {
	char str[STRLENMAX];
	uint8_t a[100];
	int p;
	uint64_t n, i;

	fgets(str, STRLENMAX, stdin);
	n = atoll(str);

	for (i = 0; i < n; i++) {
		fgets(str, STRLENMAX, stdin);
		a[i] = atoi(str);
	}

	p = permsign(n, a);
	printf("%d\n", p);
}

Generated with cgit - Back to sebastiano.tronto.net