Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
#include <math.h>
struct bitmap {
int w, h;
uint32_t *data;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
#include <math.h>
struct bitmap {
int w, h;
uint32_t *data;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
#include <math.h>
#define SWAP(type,x,y) do { type temp = (x); (x) = (y); (y) = temp; } while (0)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <ctype.h>
#include <math.h>
#define SWAP(type,x,y) do { type temp = (x); (x) = (y); (y) = temp; } while (0)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#define SWAP(type,x,y) do { type temp = (x); (x) = (y); (y) = temp; } while (0)
/***************************************************************************/
@Zeno-
Zeno- / sweeper.c
Created December 9, 2015 12:35
Updated to include "end game"
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#define MAX_ADJACENCIES 4
#define BUFF_SIZE 80
struct adj {
@Zeno-
Zeno- / sweeper.c
Last active December 7, 2015 13:06
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#define MAX_ADJACENCIES 4
#define BUFF_SIZE 80
struct adj {
@Zeno-
Zeno- / gist:5ef56d25c7b998275212
Last active December 7, 2015 08:37
reddit-dailyprogrammer #243 [Hard] New York Street Sweeper Paths
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <assert.h>
#define MAX_ADJACENCIES 4
struct adj {
int src; // node index (parent)
@Zeno-
Zeno- / Zenburn.xml
Created January 16, 2014 11:34 — forked from photex/Zenburn.xml
<?xml version="1.0" encoding="UTF-8"?>
<style-scheme version="1.0" name="Zenburn">
<style name="AddedLine" foreground="#708c80" background="#313c36" bold="true"/>
<style name="Comment" foreground="#7f9f7f"/>
<style name="CurrentLine" foreground="#dcdccc" background="#262626"/>
<style name="CurrentLineNumber" foreground="#9fafaf" bold="true"/>
<style name="DiffFile" foreground="#ecbcbc" background="#41363c" bold="true"/>
<style name="DiffLocation" foreground="#80d4aa" background="#2f2f2f" bold="true"/>
<style name="DisabledCode" background="#555555" bold="true"/>
<style name="Doxygen.Comment" foreground="#80969f"/>