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
{-# LANGUAGE LambdaCase, TupleSections, ViewPatterns #-} | |
module Solve where | |
import System.Console.ANSI | |
import Control.Concurrent | |
import Control.Monad | |
import System.IO.Unsafe | |
import Data.Map.Strict (Map(..)) |
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
/** Copyright (c) 20XD XD. | |
All rights reserved. | |
Redistribution and use in source and binary forms are permitted | |
provided that the above XD notice and this paragraph are | |
duplicated in all such forms and that any documentation, | |
advertising materials, and other materials related to such | |
distribution and use acknowledge that the software was developed | |
by the XD. inc. The name of the | |
XD may not be used to endorse or promote products derived |
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
const { exec } = require('child_process'); | |
const operators = ['+', '*', '-', '*', '%']; | |
const choose = xs => xs[Math.floor(Math.random() * xs.length)]; | |
const make_number = max => Math.floor(Math.random() * max + 1).toString(); | |
const make_stuff = (length, depth) => | |
{ |
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
{-# LANGUAGE NamedFieldPuns #-} | |
module Main where | |
import qualified Data.Array as A | |
import Text.Read | |
import Safe | |
import Data.Maybe | |
import Control.Monad | |
import System.Environment |
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> | |
unsigned char swap_bits(unsigned char octet) | |
{ | |
return (octet >> 4) | (octet << 4); | |
} | |
int main() | |
{ |
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> | |
/* this */ | |
int* mk_arr_point(int x, int y) | |
{ | |
int *p; | |
p = malloc(sizeof(int) * 2); | |
p[0] = x; |
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
/* ************************************************************************** */ | |
/* */ | |
/* :::::::: */ | |
/* libft.h :+: :+: */ | |
/* +:+ */ | |
/* By: nmartins <[email protected]> +#+ */ | |
/* +#+ */ | |
/* Created: 2019/02/26 15:29:41 by nmartins #+# #+# */ | |
/* Updated: 2019/03/20 19:26:46 by nmartins ######## odam.nl */ | |
/* */ |
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> | |
#include "libft.h" | |
size_t digit_mul(long long n) | |
{ | |
size_t i; | |
i = n % 10; | |
n /= 10; |
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
" show line numbers | |
set number | |
" enable mouse support | |
set mouse=a | |
" enable ruler | |
set ruler | |
" set tabs to 4 spaces | |
set ts=4 | |
set softtabstop=0 noexpandtab | |
set shiftwidth=4 |
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 <fcntl.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include "get_next_line.h" | |
#include "libft.h" | |
int main(int argc, char **argv) | |
{ |