New answers tagged

1

Click run. It displays only in increments of 30 minutes because the clock is a single emoji. function updateTick(){let e=new Date,t=e.getSeconds()+60*e.getMinutes()+e.getHours()%12*60*60,n=parseInt(t/3600*2)+1;document.documentElement.style.setProperty("--tick",n)}let d=new Date;setTimeout(()=>{setInterval(updateTick,18e5)},1e3*(d.getMinutes()+d....


3

Geometry Dash, 2 objects/276 bytes Raw text that the level is stored as: H4sIAAAAAAAAE6WPzQrCMBCEX2iFnc1PU8RDexGPUvC66EWkvoDgw5tkKyJYtHjIDJlhPpJxcImgEoJKVVcVFsEyWOh1BY0KZtZGoQhFkrImxR3ZJZfyGwL_I9qPiIVfES37TyDIC8TfMGEWw0teE2cwNHZwxMWCWTTzlDVSLseusWiyVGxwbb1JVSPUovNVrQWbgXgNajNUCDGQI3CgNuPJo0gGHHEsB-RAw9CdT7f--hqlZhoJ8vU5WkHedodLz7vtfrN-APfUD_t-AgAA Level ...


4

Brainfuck, 4201 bytes compressed. Image format used is PNG. I'm pretty sure the challenge is over because I'm leaving 4 instances modified script overnight. Explaination So how does it work? Using a Java program I'm generating a JPG file. Then, it's compressed and it's size is being checked prompting me shall I keep it. I ran this script for a while and ...


4

0.9514747859 (4204-byte output) Note: the image above is not the actual file I used, but it is the image. Here is a hexdump of the file: https://gist.github.com/pommicket/cf2982e8ecf09a4de89d3a849526c64b The file is in the netpbm format, and can be generated with this C code: #include <stdio.h> #include <stdlib.h> int main(int argc, char **...


6

Python, 2.62 * 10^40 This algorithm just floodfills (BFS) the plane starting from the black parts of the image, where for each new pixel we record what black part it was flooded from. As soon as we have two neighbouring pixels with different black parts as ancestors, we basically merge these two black parts by joining them through the ancestors of the two ...


7

C, score 2.397x10^38 Man this took way too long to do, most likely due to my choice of language. I got the algorithm working fairly early, but ran into a lot of problems with memory allocation (couldn't recursively free stuff due to stack overflows, leak sizes were huge). Still! It beats the other entry on every test case, and might even be optimal gets ...


3

Charcoal, 78 bytes NθNη”{⊞⊟¦≦⁶q×fΣ\⊙t×_⊟✳-Y⁴℅=⁶υ”≔›θ³ζ≔›η³εFζ≦⁻⁷θFε≦⁻⁷ηJ⊕÷θ²⊕÷粧#$⁺ⅈⅉJθη Fζ‖Fε‖↓ Try it online! Link is to verbose version of code. Outputs using #$% characters. Explanation: NθNη Input the co-ordinates of the blank square. ”{⊞⊟¦≦⁶q×fΣ\⊙t×_⊟✳-Y⁴℅=⁶υ” Output a compressed string. It contains newlines so to avoid breaking up the flow of ...


5

Python 3: 1.7x10^42 1.5x10^41 Using Pillow, numpy and scipy. Images are assumed to be in an images folder located in the same directory as the script. Disclaimer: It takes a long time to process all the images. Code import sys import os from PIL import Image import numpy as np import scipy.ndimage def obtain_groups(image, threshold, structuring_el): ...


21

JavaScript (ES6),  184 ... 171  163 bytes Takes input as (x)(y), with \$0\leq x\leq7\$ and \$0\leq y\leq7\$. Outputs as a string with 3 colors (marked as \$0\$, \$1\$ and \$2\$). h=>v=>(a=[...'3232132031021010'],a[5+(v&4|h>3)]^=3,a[v/2<<2|h/2]=v%2*2+h%2,g=x=>y&8?'':(x<8?x-h|y-v?a[y/2<<2|x/2]^y%2*2+x%2?(x^y)&...


Top 50 recent answers are included