Skip to content

Instantly share code, notes, and snippets.

@ngobach
ngobach / 00_basic2_en.md
Last active September 10, 2016 10:30
00_basic2_en.md

basic2_en

Các solution cho contest basic2_en

@ngobach
ngobach / P161PROC.CPP
Created September 18, 2016 17:17
P161PROC.CPP
#include <iostream>
using namespace std;
int main(){
// freopen("input.txt","r",stdin);
int n,k;
cin>>n>>k;
int a[n+5] = {0},t = 1, b[n+5] = {0};
cin>>a[0];
while(n-1 > 0){
#include <bits/stdc++.h>
#define _for(i,a,b) for (int i=(a),_b_=(b),_d_=(a<b?1:-1);i!=_b_;i+=_d_)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i)
#define _all(v) v.begin(), v.end()
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
template<typename T> vector<T> &operator += (vector<T> &v, T x) {v.push_back(x);return v;}
#include <bits/stdc++.h>
#define _for(i,a,b) for (int i=(a),_b_=(b),_d_=(a<b?1:-1);i!=_b_;i+=_d_)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i)
#define _all(v) v.begin(), v.end()
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
template<typename T> vector<T> &operator += (vector<T> &v, T x) {v.push_back(x);return v;}
#include <bits/stdc++.h>
#define _for(i,a,b) for (int i=(a),_b_=(b),_d_=(a<b?1:-1);i!=_b_;i+=_d_)
#define _it(i,v) for (typeof((v).begin()) i = (v).begin(); i != (v).end(); ++i)
#define _all(v) v.begin(), v.end()
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
template<typename T> vector<T> &operator += (vector<T> &v, T x) {v.push_back(x);return v;}
Beginner: Linked List, Stack, Queue, Binary Search Tree.
Intermediate: Heap, Priority Queue, Huffman Tree, Union Find, Tries, Hash Table, Tree Map.
Proficient: Segment Tree, Binary Indexed Tree, Suffix Array, Sparse Table, Lowest Common Ancestor, Range Tree.
Expert: Suffix Automaton, Suffix Tree, Heavy-Light Decomposition, Treap, Aho-Corasick, K-d tree, Link-Cut Tree, Splay Tree, Palindromic Tree, Rope, Dancing Links, Radix Tree, Dynamic Suffix Array.

Ubuntu 14.04 and CMS v 1.2

Download at

wget "https://github.com/cms-dev/cms/releases/download/v1.2.0/v1.2.0.tar.gz"

Pre requirements

{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"BracketHighlighter",
"DocBlockr",
"Emmet",
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@ngobach
ngobach / optimize-vmware.md
Last active December 15, 2017 14:08 — forked from wpivotto/gist:3993502
Maximize VMWare images performance

optimize-vmware

Insert the following code into the *.VMX file:

sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"