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
#!/usr/bin/env python | |
# -*- vim: set sts=4 sw=4 fdm=marker: -*- | |
# Please put in your name and id number here | |
# Name: | |
# Matrikelnummer: | |
from collections import defaultdict | |
from functools import reduce |
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
#ifndef ALTERNATIVELINKEDLIST_H | |
#define ALTERNATIVELINKEDLIST_H | |
#include "Item.h" | |
#include "List.h" | |
/* | |
* Deklariert hier die AlternativeLinkedList ohne Dummy-Element. | |
* | |
* Diese Liste soll keine FreeList verwenden, denn die move-Methoden |
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
def eea(r0, r1): | |
if r0 <= r1: | |
r0, r1 = r1, r0 | |
r = [r0, r1, 0] | |
s = [1, 0, 0] | |
t = [0, 1, 0] | |
i = 2 |
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
// clang++ -std=c++17 baby_giant_step.cpp -o baby_giant_step -march=native -O3 | |
// ./baby_giant_step | |
#include <cmath> | |
#include <cstdint> | |
#include <cstdlib> | |
#include <unordered_map> | |
#include <utility> // std::swap | |
struct result { |
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
#!/usr/bin/python3 | |
import functools | |
# 1+0x+x^2+0x^3+0x^4+x^5 | |
p = [1, 0, 1, 0, 0, 1] | |
def format_polynom(xs): | |
return " + ".join(reversed([("x^{}".format(i) if i > 0 else "1") for i, x in enumerate(xs) if x == 1])) |
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
#pragma once | |
#include <exception> | |
#include <variant> | |
#include <experimental/coroutine> | |
#include <experimental/net> | |
namespace ams::async { | |
using std::experimental::coroutine_handle; |
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
namespace TriCore { | |
enum { | |
PHI = 0, | |
INLINEASM = 1, | |
CFI_INSTRUCTION = 2, | |
EH_LABEL = 3, | |
GC_LABEL = 4, | |
KILL = 5, | |
EXTRACT_SUBREG = 6, | |
INSERT_SUBREG = 7, |
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
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
const uint32_t data[256] = | |
{ | |
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, | |
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, | |
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, | |
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, |
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
\usepackage[english]{babel} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage{minted} | |
\usepackage{xcolor} | |
\definecolor{background}{HTML}{1d1f21} | |
\definecolor{foreground}{HTML}{c5c8c6} | |
\definecolor{comment}{HTML}{969896} |
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
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <random> | |
#include <vector> | |
std::vector<unsigned> random_vec(const unsigned count) { | |
std::random_device rnd_device; | |
std::mt19937 mt(rnd_device()); | |
std::uniform_int_distribution<unsigned> dist; |