This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int bit_for(char n) { | |
return 1 << (n - 'a'); | |
} | |
int has_bit(int bits, char n) { | |
return (bits & bit_for(n)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
void main(void) { | |
int num_problems; | |
int problem; | |
char* welcome = "welcome to code jam"; | |
unsigned int ret[strlen(welcome)]; | |
const int wel_len = strlen(welcome); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
enum dir {North, West, East, South, NONE}; | |
unsigned int look_alt(int h, int w, int H, int W, enum dir dir, unsigned int *al | |
t_map) { | |
#define ALT(m,n) *(alt_map + (m) * W + (n)) | |
if (dir == North) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
enum dir {North, West, East, South, NONE}; | |
unsigned int look_alt(int h, int w, int H, int W, enum dir dir, unsigned int *alt_map) { | |
#define ALT(m,n) *(alt_map + (m) * W + (n)) | |
if (dir == North) { | |
if (h == 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'grit' | |
include Grit | |
repo = Repo.new(".") | |
def date(head) | |
head.commit.committed_date | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import ConCaT.CATEGORY_THEORY.FUNCTOR.Functor. | |
Section alg_def. | |
Variables (A : Category) (T : Functor A A). | |
Structure Alg_ob : Type := {Ob_alg_ob : A; Mor_alg_ob : T Ob_alg_ob --> Ob_alg_ob}. | |
Section alg_arrow_def. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameter person thing : Set. | |
Parameter own: person -> thing -> Prop. | |
Parameter capitalist: forall (x: thing), exists p:person, own p x. | |
Parameter bottle: thing. | |
Definition owner: person. | |
Admitted. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parameter person :Set. | |
Parameter thing: Set. | |
Parameter bottle: thing. | |
Parameter own: person -> thing -> Prop. | |
Parameter capitalist: forall (x: thing), { p:person & own p x }. | |
Definition owner: person. | |
generalize (capitalist bottle). | |
intros. |
OlderNewer