aboutsummaryrefslogtreecommitdiff
path: root/test/012_math_permsign/permsign_tests.c
blob: 0ec22afd4dd93426bc499201875ff7d2abcd4a61 (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 [n]);

void run(void) {
	char str[STRLENMAX];
	uint8_t a[100];
	int p;
	int64_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