Skip to content

Instantly share code, notes, and snippets.

@adriweb
adriweb / math_bruteforce.c
Last active August 29, 2015 14:21
Bruteforce solutions finder for the vietnamese math problem (see http://gu.com/p/493zk/stw)
// (C) Adrien "Adriweb" Bertrand
// Originally posted at http://ti-pla.net/t16528
// 2015-05-20
#include <stdio.h>
#include <stdint.h>
uint32_t solutionsFound = 0;
inline void swap(uint8_t *x, uint8_t *y) { if (x != y) { *x ^= *y; *y ^= *x; *x ^= *y; } }