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
1 changed files with 3 additions and 1 deletions

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];
}
}
}