Four Tasks from a Beginner Contest: Permutation Duel, Sub-grid Matching, Hamiltonian Walks, and Optimal Chemical Blending
Task A – Permutation Duel
A cyclic permutation maps
[1\to2\to3\to\dots\to13\to1]
Two players choose indices (x,y\in[1,13]). Compare the images (p(x)) and (p(y)); output the winner or "Draw".
int main() {
int x, y; std::cin >> x >> y;
int px = (x == 13 ? 1 : x + 1);
int py = (y == 13 ? 1 : y + 1);
if (px == ...
Posted on Fri, 15 May 2026 19:42:06 +0000 by NathanLedet