2
1
Fork 0

Day 20/C: Slightly faster

This commit is contained in:
Mia Herkt 2021-12-20 13:31:29 +01:00
parent 2e95a27c0d
commit e1e50de4e3
Signed by: mia
GPG key ID: 72E154B8622EC191

View file

@ -49,6 +49,8 @@ usage:
fscanf(fp, "%ms", &algo);
for (char *ap=algo; *ap; ap++)
*ap = *ap == '#';
while (fscanf(fp, "%ms\n", &s) == 1) {
size_t len = strlen(s);
@ -96,7 +98,7 @@ usage:
else
v |= iter & 1;
back[y * stride + x] = algo[v] == '#';
back[y * stride + x] = algo[v];
}
}
}