I hereby claim:
- I am rcabreu on github.
- I am rcabreu (https://keybase.io/rcabreu) on keybase.
- I have a public key ASDcZeANpKnG_glVczvaYdFs4MLfnKrPVQI0idO0mmHuKQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
FROM ubuntu:18.04 | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
RUN apt-get -y update | |
RUN apt-get -qq -y install curl wget unzip zip openjdk-11-jdk | |
RUN apt-get -y install nano | |
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/ | |
RUN export JAVA_HOME | |
RUN curl -s "https://get.sdkman.io" | bash |
const http = require('http') | |
const server = http.createServer(function(request, response) { | |
console.dir(request.param) | |
if (request.method == 'POST') { | |
console.log('POST') | |
var body = '' | |
request.on('data', function(data) { | |
body += data |
namespace FastFFT { | |
typedef long double Double; | |
typedef long long Long; | |
typedef vector<int> VI; | |
struct point { | |
Double x, y; | |
point(Double x = 0, Double y = 0) : x(x), y(y) { } | |
point conjugate() const { return point(x, -y); } | |
}; | |
point operator+(const point &a, const point &b) { return {a.x + b.x, a.y + b.y}; } |
find . -type f -regex '\.[^.]*$' -exec mv {} {}.in \; |
vi primes; | |
bool prime[1000100]; | |
void generatePrimes(int n) { | |
for (int i = 2; i * i <= n; i++) | |
if (prime[i]) | |
for (int j = i * i; j <= n; j += i) | |
prime[j] = false; | |
int cnt = 0; | |
for (int i = 2; i <= n; i++) |
#define MAXN 1005 | |
#define MAXE 1005 | |
#define MAXL 25 | |
struct Node { | |
int p, h; | |
}; | |
Node V[MAXN]; | |
vi E[MAXE]; |
vector<int> kmp(string s, string w) { | |
vector<int> T(w.size() + 1, 0), matches; | |
T[0] = -1, T[1] = 0; // default values, will never change | |
int pos = 0; | |
for (int i = 2; i <= w.size(); ++i) { | |
if (w[i - 1] == w[pos]) { // keep matching, and if we ever failing at position i - 1, we've matched pos characters | |
++pos; | |
T[i] = pos; | |
} |
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long ll; | |
typedef pair<int, int> pii; | |
typedef vector<int> vi; | |
#define GCD(a,b) __gcd(a, b) | |
#define mp make_pair | |
#define DEBUG(x) cout << x << "\n" | |
#define ALL(x) x.begin(), x.end() |
#define MAX_V 123456 | |
struct Node { | |
int id; | |
int ind, lowlink; | |
int SCC; | |
bool visited; | |
}; | |
int N, M; | |
Node V[MAX_V]; |