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
\documentclass[a4paper, 12pt, oneside]{scrartcl} | |
%\documentclass[a4paper, 12pt, oneside]{ncc} | |
\usepackage[warn]{mathtext} % русские буквы в формулах, с предупреждением | |
\usepackage[T2A]{fontenc} % внутренняя кодировка TeX | |
\usepackage[utf8x]{inputenc} % кодовая страница документа | |
\usepackage[english, russian]{babel} % локализация и переносы | |
\usepackage{indentfirst} % отступ первого абзаца раздела | |
\usepackage{misccorr} % точка в номерах заголовков | |
\usepackage{cmap} % русский поиск в pdf | |
\usepackage{graphicx} % Работа с графикой \includegraphics{} |
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
perms :: [a] -> [[a]] | |
perms [] = [[]] | |
perms xs = [ y:zs | (y,ys) <- select xs, zs <- perms ys] | |
where select [] = [] | |
select (x:xs) = (x,xs) : [ (y,x:ys) | (y,ys) <- select xs ] |
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
-- Quicksort algorithm by Tony Hoare | |
-- https://en.wikipedia.org/wiki/Quicksort | |
qsort :: Ord a => [a] -> [a] | |
qsort [] = [] | |
qsort (x:xs) = | |
let up = qsort [a | a <- xs, a > x] | |
down = qsort [a | a <- xs, a <= x] | |
in down ++ [x] ++ up |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Document</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width"> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css"> | |
<link rel="stylesheet" href="style.css"> |