-
-
Save umnikos/613b757b7971aad0c529f990017da651 to your computer and use it in GitHub Desktop.
bff brainf**k interpreter crashing
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
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>+[<[>>+>+<<<-]>>>[<<<+>>>-]<+>>++[<++++++++++>-]<++++>>+<<<[>>+<<-]>>[>-]>[><<<<+>[-]>>->]<+<<[>-[>-]>[><<<<+>[-]+>>->]<+<<-]>[-]>-<<<[>>+[<[>>+>+<<<-]>>>[<<<+>>>-]<+>++++++++++>>+<<<[>>+<<-]>>[>-]>[><<<<+>[-]>>->]<+<<[>-[>-]>[><<<<+>[-]+>>->]<+<<-]>[-]>-<<<[<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-],<[<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-]>[<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>[[>>]+[<<]>>-]+[>>]<[-]<[<<]>[>[>>]<+<[<<]>-]>[>>]<<[-<<]>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[>>>+>+<<<<-]>>>>[<<<<+>>>>-]+[<+>-]<<<<[-]>>>[<<<+>>>-]<[-]<+>]<-]<[-],<<<<[-]>>>>[<<<<+>>>>-]>+[<[>>+>+<<<-]>>>[<<<+>>>-]<+>+++++>>+<<<[>>+<<-]>>[>-]>[><<<<+>[-]>>->]<+<<[>-[>-]>[><<<<+>[-]+>>->]<+<<-]>[-]>-<<<[<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-],<[<<<<<<<<<<<<<<<<<<+>>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>>>>>>>>>>>>>>>>>>>>>>>>>-]<<<<<<<<<<<<<<<<<<<<<<<<<<<>>[[>>]+[<<]>>-]+[>>]<[<[<<]>+<>>>>>>>>>>>>>>>>>>>>>>>>>>+<<<<<<<<<<<<<<<<<<<<<<<<<<>>[>>]<-]<[<<]>[>[>>]<+<[<<]>-]>[>>]<<[-<<]>>>>>>>>>>>>>>>>>>>>>>>>>[->-<]+>[<->[-]]<[>+<[-]]+>[<->-]+<[<<<<[-]>>>>>>[<<<<<<+>>>>>>-]<-<[-]]>[-]<<<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-]+[<+>-]<<<<[-]>>>[<<<+>>>-]<[-]<+>]<-]<[-]<[>+>+<<-]>>[<<+>>-]+<[>>+<<<<<<<[-]>>>>>>>[<<<<<<<+>>>>>>>-]<-<[-]]>[-]<<<<<[>>>>+>+<<<<<-]>>>>>[<<<<<+>>>>>-]+[<+>-]<<<<<[-]>>>>[<<<<+>>>>-]<[-]<[-]<+>]<-]<[-]<[>+>+<<-]>>[<<+>>-]>++++[<++++++++++>-]<++++++++<[>>+>+<<<-]>>>[<<<+>>>-]<[<+>-]<.[-]<[-]<[-]++++++++++.[-]<<<[>>>+>+<<<<-]>>>>[<<<<+>>>>-]+[<+>-]<<<<[-]>>>[<<<+>>>-]<[-]<+>]<-]<[-] |
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
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
1010110010 10110 | |
1110111011 10011 | |
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
int is_contained(int[] a, int[] b) { | |
int full_match = 0; | |
for (int i=0;,i<6,i=i+1;) { // 6 different offsets | |
bool match = true; | |
for (int j=0;,j<5,j=j+1;) { // every character in a and b must match | |
if (a[j+i] != b[j]) { | |
match = false; | |
} | |
} | |
if (match) { | |
full_match = 1; | |
} | |
} | |
return full_match; | |
} | |
int a[10]; | |
int b[5]; | |
int trash = 0; | |
for (int i=0;,i<24,i=i+1;) { | |
for (int j=0;,j<10,j=j+1;) { | |
a[j] = read_char(); | |
} | |
trash = read_char(); | |
for (int j=0;,j<5,j=j+1;) { | |
b[j] = read_char(); | |
} | |
/* | |
for (int j=0;,j<10,j=j+1;) { | |
write_char(a[j]); | |
} | |
for (int j=0;,j<5,j=j+1;) { | |
write_char(b[j]); | |
} | |
*/ | |
trash = read_char(); | |
write_char('0'+is_contained(a, b)); | |
write_char(10); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment