permsign_tests.c (312B)
1 #include "../test.h" 2 3 int permsign(uint8_t *, int64_t); 4 5 void run(void) { 6 char str[STRLENMAX]; 7 uint8_t a[100]; 8 int p; 9 int64_t n, i; 10 11 fgets(str, STRLENMAX, stdin); 12 n = atoll(str); 13 14 for (i = 0; i < n; i++) { 15 fgets(str, STRLENMAX, stdin); 16 a[i] = atoi(str); 17 } 18 19 p = permsign(a, n); 20 printf("%d\n", p); 21 }