Skip to content

Instantly share code, notes, and snippets.

@ss1h2a3tw
ss1h2a3tw / uva13149.cpp
Created December 21, 2016 18:09
UVA 13149
/*
給你一個Binary String長度 < 10^5
定義成長操作為在兩兩間隔間插入 其XOR值
查詢在經過 g < 10^4 成長後 區間內0,1的數量mod prime
思路
首先查詢區間[a,b]可以以[0,b]-[0,a-1]來計算所以問題可以精簡成為單向成長
那麼在一次成長過程中0增加的數量為相同的鄰居 1則反之
@johnchen902
johnchen902 / HOJ226.cpp
Created February 21, 2015 07:50
HSNU Online Judge Problem : 226 - K. CP
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <new>
using namespace std;
struct Tree;
class TreeRef {
/*
* Simple MD5 implementation
*
* Compile with: gcc -o md5 -O3 -lm md5.c
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
@kyleturner
kyleturner / Remove Submodule
Created January 5, 2012 01:07
How to remove a submodule from a Github project
To remove a submodule you need to:
Delete the relevant line from the .gitmodules file.
Delete the relevant section from .git/config.
Run git rm --cached path_to_submodule (no trailing slash).
Commit and delete the now untracked submodule files.