This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* HTML PRIDE! */ | |
html { | |
-webkit-animation: rainbow 8s infinite; | |
} | |
/* | |
Spin all images | |
*/ | |
img { | |
-webkit-animation: spin 1s linear infinite; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Nov. 7th 2014 **/ //{ | |
/** Header .. **/ //{ | |
#pragma comment(linker, "/STACK:36777216") | |
//#pragma GCC optimize ("O2") | |
#define LOCAL | |
//#include "testlib.h" | |
#include <functional> | |
#include <algorithm> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <cstdio> | |
#include <cstring> | |
#define pick(a, b) ((a >> (b - 1)) & 1) | |
#define EPS 1e-7 | |
using namespace std; | |
typedef long long ll; | |
int n; | |
struct trie { | |
char e; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filetype plugin indent on | |
filetype detect | |
set cindent tabstop=8 shiftwidth=8 cinoptions=l1,:0,(0,g0 | |
" TODO: extern "C" gets indented | |
" And some sane defaults, optional, but quite nice | |
set nocompatible | |
syntax on | |
colorscheme default | |
set hls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(by lydrainbowcat) | |
题意: | |
给定N个整数a1,a2...an,求1~n的一个排列p1~pn,最大化 abs(abs(abs(abs(a[p1]-a[p2])-a[p3])-a[p4])......-a[pn])。 | |
N<=200, |ai|<=1000 | |
解法: | |
首先,所有<=0的ai放在最后,可以全部利用起来,使答案不断变大。 | |
于是只需考虑正的ai。找到其中最大的,放在最后,问题变为对于剩余的数做最小化的上述问题。 | |
最小化就比较好做了,相当于把数分成两堆,使得他们的和尽量接近,可以用背包求解。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" let mapleader="," | |
set guifont=ubuntu\ mono\ for\ powerline:h18 | |
syntax on | |
set expandtab | |
" set clipboard=unnamed | |
set number | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set background=dark |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
#include <queue> | |
#define INF (1 << 30) | |
#define maxn 210 | |
#define maxm 6010 | |
using namespace std; | |
queue <int> que; | |
struct str { int v,cap,nex; } edge[maxm]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$html = '<form><div style="width: 300px; height: 28px; background-size: 276px 28px;display: inline-block;"><input type="text" maxlength="40" name="q"> <input type="submit" value="go"></div></form>'; | |
if(!isset($_GET['q'])) { | |
echo $html; | |
} else { | |
$q = $_GET['q']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Micro Mezz Macro Flation -- Overheated Economy ., Last Update: Aug. 20th 2013 **/ //{ | |
/** Header .. **/ //{ | |
#pragma comment(linker, "/STACK:36777216") | |
//#pragma GCC optimize ("O2") | |
#define LOCAL | |
//#include "testlib.h" | |
#include <functional> | |
#include <algorithm> |
OlderNewer