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
# Este es un ingenuo intento de análisis de fraude para el balotaje. | |
# Es sabido que haciendo una encuesta a sólo 601 personas tomadas al azar, | |
# uno puede estimar con alta probabilidad el resultado de una elección binaria | |
# con error menor a 4% (más abajo pongo la demostración). | |
# Entonces, como tenemos acceso a los telegramas digitalizados y que dado un telegrama | |
# muchas veces podemos inferir su correctitud a ojo, una forma fácil de comprobar el | |
# impacto de los telegramas incorrectos es tomar 601 votantes al azar, comprobar la | |
# correctitud de todos los telegramas de las mesas donde todos ellos votaron y, | |
# si todos son correctos, y además el resultado de la encuesta es consistente con | |
# el resultado oficial de las elecciones, nuestra confianza en la irrelevancia |
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
1234 | |
1111 | |
0000 | |
1212 | |
7777 | |
1004 | |
2000 | |
4444 | |
2222 | |
6969 |
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 <string.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
#include <omp.h> // OpenMP | |
#include "matrix.h" | |
#define MIN_STRASSEN (64*64) | |
#define OMP_DYNAMIC TRUE | |
matrix_t matrix_alloc(int h, int w) { |
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{article} | |
\usepackage[a4paper,margin=1cm]{geometry} | |
\usepackage{tikz} | |
\usetikzlibrary{calendar,folding} | |
\usepackage[spanish,activeacute]{babel} | |
\renewcommand\shorthandsspanish{} | |
\usepackage[utf8]{inputenc} | |
\newcommand{\fancy}[1]{\bfseries\textcolor{red}{#1} \%y0} |
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 <iostream> | |
#include <vector> | |
#include <queue> | |
#include <list> | |
#include <utility> | |
#include <algorithm> | |
#include <climits> | |
using namespace std; | |
#define forn(i, n) for(int i = 0; i < (int)(n); ++i) |
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
//The following code is based on the paper "Dancing Links" by D. E. Knuth. | |
//See http://www-cs-faculty.stanford.edu/~uno/papers/dancing-color.ps.gz | |
#ifndef DLX_H | |
#define DLX_H | |
#include <cstring> | |
#include <climits> | |
struct data_object //A module in the sparse matrix data structure. | |
{ | |
data_object* L; //Link to next object left. | |
data_object* R; // " right. |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <limits.h> | |
#define forn(i,n) for(i=0; i<(n); i++) | |
#define forsn(i,s,n) for(i=(s); i<(n); i++) | |
#define MAXN 100001 | |
int N, A[MAXN], pi[MAXN], beta[MAXN], alfa[MAXN], tau[MAXN], lam[MAXN]; | |
struct node { |