Skip to content

Instantly share code, notes, and snippets.

@AtnNn
Created January 25, 2013 23:44
Show Gist options
  • Save AtnNn/4638934 to your computer and use it in GitHub Desktop.
Save AtnNn/4638934 to your computer and use it in GitHub Desktop.
struct t{struct t*l,*r;int x;};
extern puts();
int main(){
struct t tree1 = { 0, 0, 1 };
struct t tree3 = { 0, 0, 3 };
struct t tree2 = { &tree1, &tree3, 2 };
struct t tree5 = { 0, 0, 5 };
struct t tree7 = { 0, 0, 7 };
struct t tree6 = { &tree5, &tree7, 6 };
struct t tree4 = { &tree2, &tree6, 4 };
puts(f(&tree4)?"yes":"no");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment