This file contains hidden or 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> | |
int main() { | |
int* state = (int*) calloc(sizeof(int),1024); | |
int* admin_flag = &state[1023]; | |
*admin_flag = 0; | |
free(state); | |
char* str = malloc(4096); |
This file contains hidden or 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 <time.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
########## | |
# SOLVES # | |
########## | |
- sparrow |
This file contains hidden or 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> | |
int main() { | |
long admin = 0; | |
long s; | |
char name[100]; | |
fprintf(stdout, "\e[41mDEBUG:\e[49m %p\n", &s); | |
fprintf(stdout, "\e[41mDEBUG:\e[49m %ld %ld\n", sizeof s, sizeof &s); | |
printf("Whats ur name? "); | |
scanf("%100s", name); |
This file contains hidden or 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> | |
/* | |
########## | |
# Solves # | |
########## | |
- (Derisis13) nope, OBOE, fixed it just after K0B4MB1 | |
- K0B4MB1 | |
- sparrow |
This file contains hidden or 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
import Text.Read (readMaybe) | |
import System.Random | |
import System.IO | |
readGuess :: Integer -> IO Integer | |
readGuess no = do | |
let str = "Please enter your " ++ show no ++ "th guess:" | |
putStr str | |
hFlush stdout -- need that coz we don't print a \n | |
name <- getLine |
This file contains hidden or 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 <stdint.h> | |
#include <stdio.h> | |
uint64_t csoeoe(uint64_t thatFirstParam, uint64_t paramNumberOne, uint64_t dQw4w9WgXcQ) { | |
return (int64_t)(((__int128_t)thatFirstParam*paramNumberOne)%dQw4w9WgXcQ); | |
} | |
uint64_t fueuetoeoecsoeoe(uint64_t ZWxzb1BhcmFtZXRlcg, uint64_t bWFzb2Rpa1BhcmFtZXRlcg, uint64_t dXRvbHNvUGFyYW1ldGVy) | |
{ | |
uint64_t dmFsYW1pUmFuZG9tVmFsdG96bw = 1; |
This file contains hidden or 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
from collections import deque | |
""" | |
Input your (not) fully specified state table here | |
""" | |
T = [ | |
["a", ["h", "1"], ["f", "-"]], | |
["b", ["c", "1"], ["h", "1"]], | |
["c", ["b", "0"], ["a", "0"]], | |
["d", ["d", "1"], ["-", "0"]], |
This file contains hidden or 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
def extractJSON(string): | |
extracted = "" | |
seen = 0 | |
in_string = False | |
escape = False | |
for char in string: | |
if char=="{" and not in_string: | |
seen += 1 |
This file contains hidden or 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
def num_to_str(n): | |
return "{:012b}".format(n) | |
def has_four(s): | |
return sum(int(ch) for ch in s)==4 | |
def no_next_to(s): | |
return s.find("11")==-1 | |
all_possible = list(filter(no_next_to, filter(has_four, map(num_to_str, range(2**12))))) |