Day 20/C: Slightly faster
This commit is contained in:
parent
2e95a27c0d
commit
e1e50de4e3
1 changed files with 3 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue