Skip to content

Instantly share code, notes, and snippets.

{"configversion":"1.1","ignoremaps":{"<S-Insert>":"mode normal","<CA-Escape>":"mode normal","<CA-`>":"mode normal","<S-Escape>":"mode normal","I":"mode normal"},"inputmaps":{"<Escape>":"composite unfocus | mode normal","<C-[>":"composite unfocus | mode normal","<C-i>":"editor","<Tab>":"focusinput -n","<S-Tab>":"focusinput -N","<CA-Escape>":"mode normal","<CA-`>":"mode normal","<C-^>":"buffer #"},"imaps":{"<Escape>":"composite unfocus | mode normal","<C-[>":"composite unfocus | mode normal","<C-i>":"editor","<CA-Escape>":"mode normal","<CA-`>":"mode normal","<C-6>":"buffer #","<C-^>":"buffer #","<S-Escape>":"mode ignore"},"nmaps":{",m":""},"autocmds":{"DocStart":{},"DocLoad":{},"DocEnd":{},"TriStart":{".*":"source_quiet"},"TabEnter":{},"TabLeft":{}},"keytranslatemap":{},"keytranslatemodes":{"nmaps":"true","imaps":"false","inputmaps":"false","ignoremaps":"false"},"autocontain":{},"exaliases":{"alias":"command","au":"autocmd","aucon":"autocontain","audel":"autocmddelete","audelete":"autocmddelete","b":"buffer","
@Iey4iej3
Iey4iej3 / winner.cc
Created June 22, 2012 11:40
Source Code for Winner Game
#include <cstdio>
#define MAX_N 10
#define MAX_MASK 1023
int n;
int f[MAX_N+1][MAX_MASK+1][MAX_MASK+1];
void calc(int k, int A, int B)
{
for (int j=k+1; j<=n; j++) {