Skip to content

Instantly share code, notes, and snippets.

View lychees's full-sized avatar
🌴
People, Fund, Strategy ...

minakokojima lychees

🌴
People, Fund, Strategy ...
View GitHub Profile
@lychees
lychees / gist:5872039
Last active December 19, 2015 00:58
弹飞绵羊。
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Jun. 26th 2013 **/ //{
/** Header .. **/ //{
#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include <functional>
#include <algorithm>
#include <iostream>
@lychees
lychees / gist:5872057
Created June 26, 2013 21:50
弹飞绵羊 正常维护 size。
#include <iostream>
#include <cstdio>
using namespace std;
#define REP_1(i, n) for (int i=1;i<=int(n);++i)
#define REP_1_C(i, n) for (int n____=int(n),i=1;i<=n____;++i)
#define DO(N) while (N--)
#define DO_C(n) int n____ = n; while(n____--)
template<class T> inline void RD(T &x){char c; for (c = getchar(); c < '0'; c = getchar()); x = c - '0'; for (c = getchar(); c >= '0'; c = getchar()) x = x * 10 + c - '0';}
inline int RD(){ int x; RD(x); return x;}
template<class T> inline T& _RD(T &x){ RD(x); return x;}
@lychees
lychees / gist:5872073
Created June 26, 2013 21:51
维护左子树 size。
#include <iostream>
#include <cstdio>
using namespace std;
#define REP_1(i, n) for (int i=1;i<=int(n);++i)
#define REP_1_C(i, n) for (int n____=int(n),i=1;i<=n____;++i)
#define DO(N) while (N--)
#define DO_C(n) int n____ = n; while(n____--)
template<class T> inline void RD(T &x){char c; for (c = getchar(); c < '0'; c = getchar()); x = c - '0'; for (c = getchar(); c >= '0'; c = getchar()) x = x * 10 + c - '0';}
inline int RD(){ int x; RD(x); return x;}
template<class T> inline T& _RD(T &x){ RD(x); return x;}
@lychees
lychees / gist:5873960
Created June 27, 2013 04:30
Old style .. .
/** ` Micro Mezzo Macro Flation -- Overheated Economy ., **/
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <vector>
using namespace std;
#define REP(i, n) for (int i=0;i<int(n);++i)
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Jun. 26th 2013 **/ //{
/** Header .. **/ //{
#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include <functional>
#include <algorithm>
#include <iostream>
@lychees
lychees / array.cpp
Last active December 24, 2015 07:21
HDU 4010. Query on The Trees 现在的搞法。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
using namespace std;
#define REP_1(i, n) for (int i=1;i<=n;++i)
#define Rush for(int ____T=RD(); ____T--;)
/** I/O Accelerator Interface .. **/ //{
#define g (c=getchar())
@lychees
lychees / gist:5881558
Created June 28, 2013 00:27
以前。。
/** ` Micro Mezzo Macro Flation -- Overheated Economy ., **/
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <string>
#include <vector>
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Jun. 26th 2013 **/ //{
/** Header .. **/ //{
#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include <functional>
#include <algorithm>
#include <iostream>
@lychees
lychees / gist:5881877
Created June 28, 2013 01:48
宇宙大一统 by roosephu
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#include <assert.h>
#include <time.h>
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
#define DEBUG
@lychees
lychees / gist:5949481
Last active December 19, 2015 11:39
...
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Jun. 26th 2013 **/ //{
/** Header .. **/ //{
#pragma comment(linker, "/STACK:36777216")
//#pragma GCC optimize ("O2")
#define LOCAL
//#include "testlib.h"
#include <functional>
#include <algorithm>
#include <iostream>