GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com β€” GitHub - Anikor/CCC_UTM_Classic_2026: Team solutions for CCC 2026 #Classic. Local Moldova (UTM): 1st, Global: 14th.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
assets
assets
 
 
stats
stats
 
 
CCC.zip
CCC.zip
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

CCC_UTM_Classic_2026 - Team Solutions

Uploaded files from CCC 2026 42nd #Classic with our team solutions and test data.

FAB-42 Nanofabricator, CCC 2026 42nd #Classic: UTM 1st place, Global 14th place. A level 6 board where laser beams have just completed a 71-cell pattern.

C++ Python CUDA

Theme of 42nd edition: Nanofabricator

In a cleanroom so clean that even the dust must wear a hairnet, Dr. Γ…ngstrΓΆm has just switched on FAB-42, the world's first nanofabricator. It doesn't print, carve or mill anything. It creates matter with laser light, one hexagonal cell at a time.

Six laser emitters ride on a rail around a hexagonal board. On every tick each emitter moves forward (F), moves back (B), toggles its laser (T) or waits (-). A cell hit by exactly two beams becomes matter, and three or more beams destroy it. When the whole pattern stands in its exact place with nothing touching it, the pick-up arm collects it.

Animated replay of our 27-line program for medium case 59: the emitters move and fire, and a 36-cell pattern is built and collected 5 times. Animated replay of our 19-line program for medium case 16: three setup ticks yield the first copy of a 6-cell pattern on tick 3, then five lasers stay in place and the pattern is collected on every tick, 17 times in all.

Two of our real level 6 programs, replayed tick by tick. Left: a 36-cell pattern is built up over five ticks and collected 5 times in 27 lines. Right: three setup ticks yield the first copy on tick 3. From then on five lasers stay in place; triple crossings erase every cell that would touch the pattern, so FAB-42 rebuilds and collects it on every tick, 17 times in 19 lines.

Results

We solved all 6 levels and finished with:

  • πŸ₯‡ Local Moldova (UTM): 1st place
  • 🌍 Global: 14th place
  • ⚑ Level 6 (optimization): 14,566 program lines in total, lower is better
Input Patterns Board radius Lines Lines per pattern
2-medium 210 3–5 5,806 27.6
3-large 190 6–8 4,664 24.5
4-enormous 140 9–12 4,096 29.3
Total 540 14,566 27.0

Levels

Level FAB-42 says Task
1 software ...... NOT FOUND Print the hexagonal board for each radius
2 emitter ....... ARMED One emitter: every cell its beam hits becomes matter
3 beam power .... 50% Up to six emitters: two beams create matter, three or more destroy it
4 RUN? [y/N] Run emitter programs (F, B, T, -) tick by tick
5 pattern ....... LOADED Detect finished patterns and count how many get submitted
6 incoming challenge ... PER TICK Optimization: the shortest programs that make each pattern the required number of times

Levels 1–5 are solved in C++ (level_N/Solution/level_N.cpp). Level 6 lives in level_6/opt/.

Level 6: the shortest programs

Every tick offers 46 = 4,096 possible instruction lines, and a program needs a few dozen of them, so we treated level 6 as a search problem and ran it on both the CPU and the GPU.

Level 6 pipeline: C++ beam search (4,096 moves per tick), then GPU beam search (CUDA, width up to 131,072), then tail re-search from the best programs, then an exact validator keeping the best program per pattern, then the auto-submit loop to the contest API.

  • Beam search. A state is the emitter positions, which lasers are on, the matter on the board and the copies collected so far. States are deduplicated on the pattern cells only, which keeps the beam diverse (bs6s.cpp, bs6p.cpp).
  • On the GPU. The same search as CUDA kernels compiled at runtime through CuPy, with beam widths up to 131,072 (gpu6.py, gpu6snap.py).
  • Tail re-search. Cut the best program part-way through (at fixed fractions of its length, or right after a collection), replay the prefix and search the rest again from that exact state, keeping only strictly shorter endings (tail6g*.py, tailA.py, post6.cpp).
  • Closer to the real rules. Let the search rebuild destroyed cells and keep temporary matter next to the pattern, and rerank by a lower bound on the remaining ticks (gpu6r.py, gpu6a.py, gpu6L.py).
  • Never lose a gain. Every candidate is checked by an exact simulator, the shortest valid program per pattern is merged (nano6.py, merge6.py), and a loop submitted every file that beat the board until the final seconds of the contest.

In the first 21 minutes on the board the method changed three times, from a greedy builder to beam search; after that the search only got wider, smarter and more parallel.

Step chart, log scale, of the team's level 6 board total over the whole contest: 197,821 at 16:08 (greedy, two beams per cell), 89,619 at 16:13 (row sweeps), 64,427 at 16:18 (two rows per sweep), 19,995 at 16:29 (C++ beam search, W = 64), 17,437 at 17:50 (relaxed stray rule, W = 256), 15,432 at 18:54 (GPU search up to W = 131,072, tail re-search) and 14,566 at 19:56 (post-optimisation and merges to the end).

Step chart of the team's level 6 board total during the last 72 minutes: 16,538 at 18:47, 14,566 at the end of the contest at 20:00.

Input 18:47 (first loop round) Final Change
2-medium 6,105 5,806 βˆ’299
3-large 5,357 4,664 βˆ’693
4-enormous 5,076 4,096 βˆ’980
Total 16,538 14,566 βˆ’1,972 (βˆ’11.9%)

Every candidate file from the contest, scored with the exact simulator, is in stats/stats.md; every board change, per input, is in stats/timeline_full.csv.

Repository structure

CCC.zip
β”œβ”€β”€ level_1 … level_5
β”‚   β”œβ”€β”€ statement.txt
β”‚   β”œβ”€β”€ input/           inputs, example output, statement PDF
β”‚   β”œβ”€β”€ output/          our outputs
β”‚   β”œβ”€β”€ Solution/        final C++ solution
β”‚   └── tried_working/   earlier attempts
└── level_6
    β”œβ”€β”€ statement.txt
    β”œβ”€β”€ input/           example, small, medium, large, enormous
    └── opt/             solvers, tools, logs and outputs
        β”œβ”€β”€ w_*.out      final submitted programs
        β”œβ”€β”€ agents/      extra solvers: CPU tail, heuristic, cycle search, post-optimizer
        └── win_scripts/ merge and auto-submit loop
assets/                  README visuals, rendered from our real programs and submit log
stats/                   every candidate file scored, full board timeline

Run it yourself

unzip CCC.zip
cd level_6/opt
# validate and score a solution file
python3 nano6.py score ../input/in_level-6_2-medium.txt w_2-medium.out

# CPU beam search: <in> <out> [W0] [threads] [budget_s] [Wmax] [reverse]
g++ -O2 -std=c++17 -pthread bs6s.cpp -o bs6s
./bs6s ../input/in_level-6_3-large.txt large.out 64 8 20 4096

# GPU beam search (NVIDIA GPU + CuPy): <in> <out> <beam width>
python3 gpu6.py ../input/in_level-6_4-enormous.txt enormous.out 16384

License

MIT

About

Team solutions for CCC 2026 #Classic. Local Moldova (UTM): 1st, Global: 14th.

codingcontest.org/hall-of-fame

Topics

algorithm-challengescccccc-classiccloudflightcloudflight-coding-contestcloudflight-coding-contest-classiccoding-contestcompetitive-programming-contestscpppythonteam-repouniversity

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402792 β€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Γ—600. No cookies required.