Skip to content

Instantly share code, notes, and snippets.

View ignaciobll's full-sized avatar

Ignacio Ballesteros ignaciobll

View GitHub Profile
@ignaciobll
ignaciobll / FastReader.java
Created November 19, 2021 09:45
Fast I/O Java
// https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
// Imports solo para leer decentemente.
// Por algo amamos Java para aprender a programar (no).
{
"$schema": "https://json.schemastore.org/resume",
"basics": {
"name": "Ignacio Ballesteros González",
"label": "--",
"image": "",
"email": "[email protected]",
"phone": "",
"url": "",
"summary": "",
@ignaciobll
ignaciobll / AoC-day04.mzn
Created December 4, 2019 10:39
Solution to Advent Of Code Day 04 with MiniZinc (CLP)
array [1..6] of var 0..9: pass;
int:lower = 264793;
int:upper = 803935;
predicate in_range(array [1..6] of var 0..9: a) =
let {
var int: n = a[1] * 100000 +
a[2] * 10000 +
a[3] * 1000 +
import requests
import json
import sys
base = "https://openapi.emtmadrid.es/v1"
def login(email, password):
headers = {'email' : email, 'password': password }
r = requests.get(url = base + "/mobilitylabs/user/login/", headers = headers)
@ignaciobll
ignaciobll / Dhont.hs
Created May 21, 2019 23:05
Haskell D'hont
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Dhont
( dhont
, Entry
, entries
) where
import Data.Aeson
@ignaciobll
ignaciobll / Box.java
Created March 23, 2018 09:09
Ada Byron Fase Local UPM - Problema 591 - Box of Bricks
// https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
// Imports solo para leer decentemente.
// Por algo amamos Java para aprender a programar (no).
@ignaciobll
ignaciobll / Main.java
Last active March 22, 2018 23:23
Ada Byron Fase Local UPM - Problema 865 - Sustitution Cipher
// https://www.geeksforgeeks.org/fast-io-in-java-in-competitive-programming/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;
import java.util.HashMap;