Skip to content

Instantly share code, notes, and snippets.

View alculquicondor's full-sized avatar

Aldo Culquicondor alculquicondor

View GitHub Profile
server {
listen 8080;
server_name localhost;
location / {
proxy_pass tcp://chat-main.hipchat.com:5222;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
}
#ifndef _SELECTION_TEST_H
#define _SELECTION_TEST_H
#include <iostream>
#include <iomanip>
#include <vector>
#include <typeinfo>
#include <cassert>
#include "selection.h"
#include <cstring>
#include <vector>
#include <cassert>
#include <cstdio>
#include <iostream>
using namespace std;
#define MAXN 100000
#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
template<typename T>
struct p2d {
T x, y;
#include <iostream>
#include <queue>
#include <algorithm>
#define MAXN 100005
using namespace std;
typedef pair<int, int> pii;
typedef priority_queue<pii> prique;
pii M[MAXN];
set nomodeline
set background=dark
syntax on
set smarttab
set nobackup
set autoindent
set smartindent
set sw=2
set tabstop=2
set softtabstop=2
#include <iostream>
#include <cstring>
#define MOD 100000000000000LL;
using namespace std;
typedef long long ll;
const int MAXN = 100, L = 2 * MAXN + 1, ini = MAXN * L + MAXN;
ll M[L*L][MAXN+1];
#include <iostream>
#include <set>
#include <cstring>
#define MAXN 60
using namespace std;
typedef long long ll;
ll A[MAXN];
multiset<ll> S;
set nomodeline
set background=dark
syntax on
set smarttab
set nobackup
set autoindent
set smartindent
set sw=2
set tabstop=2
set softtabstop=2
@alculquicondor
alculquicondor / sievepattern.cc
Last active December 26, 2015 20:19
Finds the wheel for 2 x 3 x 5 x ... x pi http://en.wikipedia.org/wiki/Wheel_factorization Complexity O(n*lg(n))
#include <iostream>
#include <cstring>
#include <vector>
#define MAXN 50000000
using namespace std;
bool isp[MAXN];
vector<int> sieve(int q = 3) {