这是所谓的二叉树么.. 算法很简单, 只是因为第一次用这种结构体封装, 还是试了很多次才摸索出来的.. 很好用诶! 记一下
细节.. 地址和变量不要搞混了.. fw?fw->v():false 我写成了fw->v()? 错了好久
[cpp]#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct Orz {
Orz *fw,*fx;
bool (*f)(bool w,bool x);
bool v() {
return (*f)(fw?fw->v():false,fx?fx->v():false);
};
bool p[5];
char sb[]={‘K’,’A’,’C’,’E’,’N’,’p’,’q’,’r’,’s’,’t’};
char input[201];
int count;
bool fK(bool w,bool x) { return w&x; }
bool fA(bool w,bool x) { return w|x; }
bool fC(bool w,bool x) { return !(w&&!x); }
bool fE(bool w,bool x) { return !(w^x); }
bool fN(bool w,bool x) { return !w; }
bool fp(bool w,bool x) { return p[0]; }
bool fq(bool w,bool x) { return p[1]; }
bool fr(bool w,bool x) { return p[2]; }
bool fs(bool w,bool x) { return p[3]; }
bool ft(bool w,bool x) { return p[4]; }
bool (*f[])(bool w,bool x)={fK,fA,fC,fE,fN,fp,fq,fr,fs,ft};
Orz *proc() {
char a=input[count++];
Orz *node=(Orz *)malloc(sizeof(Orz));
node->fw=node->fx=NULL;
int type;
for(type=0;sb[type]!=a;type++);
node->f=f[type];
if(type<=4)
node->fw=proc();
if(type<4)
node->fx=proc();
return node;
}
int pow2(int n) {
int r=1;
for(int i=0;i<n;i++)
r*=2;
return r;
}
int main() {
while(1) {
gets(input);
if(input[0]==’0′)
break;
count=0;
Orz *bigBang=proc();
short tester;
for(tester=0x0000;tester<=0x001f;tester++) {
for(int i=0;i<5;i++)
p[i]=tester/pow2(i)%2;
if(bigBang->v()!=true)
break;
}
if(tester==0x0020)
printf("tautology\n");
else
printf("not\n");
}
return 0;
}
[/cpp]
References:
Payid pokies list https://code.dsconce.space/taragerstaecke
References:
Payid online pokies australia https://talentwindz.com/employer/payid-betting-sites-australia-2026-top-sites-reviewed/
References:
Online pokies with payid australia real money https://mkhonto.net
References:
Australian pokies payid bigotube.com
References:
Payid online pokies australia https://clinicscareer.com
References:
Australia online pokies payid gitlab.oc3.ru
References:
Online pokies australia payid real money geomaticsusa.com
References:
Australia online pokies payid https://pageofjobs.com/employer/payid-casinos-casino-sites-accepting-payid-deposit/
References:
Australia online pokies payid https://learninghub.fulljam.com/@rosellaohea901?page=about
References:
Payid pokies https://cyprusjobs.com.cy/companies/best-payid-slots-australia-2026-instant-deposit-nail-brewing-nbt-final-series/
References:
Lollybet Casino Bonus https://vocab.getty.edu
References:
Lollybet Freispiele http://cse.google.ac
References:
Lollybet Casino Test webredirect.garenanow.com
References:
Lollybet Casino VIP http://panchodeaonori.sakura.ne.jp/feed/aonori/feed2js.php?src=https://sysclicks.com/kattiewekey621
References:
Lollybet Casino Spiele https://www.musicalion.com/
References:
Lollybet Casino Lizenz diamond-tours.ru
References:
Lollybet Bonus Code http://cse.google.by/url?sa=t&url=https://urladda.com/jamalmeans8798
References:
Lollybet Freispiele http://www.google.mu/url?sa=t&url=https://dilimspunjabverify.online/marquisashcraf
References:
Lollybet Casino Auszahlungsdauer http://images.google.com.om/
References:
Lollybet Casino Auszahlungsdauer https://mamavrn.ru/go.php?url=aHR0cHM6Ly9zaG9ydC52aXJkLmNvL2tlbGx5ZXphbW9yYTM=
References:
Lollybet Erfahrungen http://feeds.hanselman.com/
References:
Lollybet Casino Mobile maps.google.vg
References:
Lollybet Online Casino http://www.ensembl.org/
References:
Lollybet Casino Bonus https://zuya.pxl.su/
References:
Lollybet Casino Bonus Code maps.google.gp
References:
Lollybet Casino Mobile app.feedblitz.com
References:
Lollybet Casino Login maps.google.com.ag
References:
Lollybet Casino Auszahlung https://12.pexeburay.com/index/d1?diff=0&utm_source=ogdd&utm_campaign=20934&utm_content=&utm_clickid=4084kko84s8gks4g&aurl=https://encurta.bio/ehztania10&an=&utm_term=&site=
References:
Lollybet Casino 10 Euro Bonus forums-archive.kanoplay.com
References:
Lollybet Live Casino https://myseldon.com/
References:
Lollybet Kundenservice http://esbt74.ru
References:
Lollybet Casino Paysafecard https://www.wbc.poznan.pl/dlibra/new-account?refUrl=aHR0cHM6Ly9jc3ZpcC5tZS9lbWlsd2lsbHNoaXJlNg==
References:
Lollybet Echtgeld https://www.ironhidegames.com/external?url=https://0zon.cc/angelinehirth3
References:
Lollybet Casino No Deposit Bonus http://cse.google.am/url?sa=t&url=https://links.cleverlybox.com/marcelashepher
References:
Lollybet Casino Zahlungsmethoden air21.ru
References:
Lollybet Casino Betrug sites.fastspring.com
References:
Lollybet Casino Registrierung http://toolbarqueries.google.sc/
References:
Lollybet Live Casino forum-msk.info
References:
Lollybet Casino Kundenservice http://images.google.com.et
References:
Lollybet Casino Erfahrungen http://s.z-z.jp/c.cgi?https://urladda.com/jamalmeans8798
References:
Lollybet Casino Bonusbedingungen http://cse.google.com.nf/url?q=https://avyc.io/roy77369925034
References:
Lollybet Casino Live Casino variable-stars.ru
References:
Lollybet Casino Neukundenbonus http://www.google.co.bw
References:
Lollybet Casino No Deposit Bonus cse.google.gr
References:
Lollybet Casino Bonus ohne Einzahlung http://clients1.google.si/url?q=https://1page.bio/antjedeame
References:
Lollybet Test https://preserve.lib.unb.ca/
References:
Lollybet Cashback https://www.google.ac
References:
Lollybet Casino Bonus ohne Einzahlung https://board-bg.seafight.com/proxy.php?link=https://yors.io/donettequezada
References:
Lollybet Casino Bitcoin w.zuzuche.com
References:
Lollybet Kontakt fr.thefreedictionary.com