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 <vector> | |
#include <map> | |
#include <string> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <climits> | |
using namespace std; |
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
// C++0x | |
#include <cstring> | |
#include <vector> | |
#include <string> | |
#include <climits> | |
using namespace std; | |
class pairSet { | |
const static unsigned int hSize = 100003; |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"net/http" | |
) | |
type Reader struct { |
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
(define (enum a) | |
(cond ((null? a) '(())) | |
(else (apply append (map (lambda (x) (map (lambda (y) (cons x y)) (enum (cdr a)))) (car a)))))) |
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
#!/bin/sh | |
sed 's|^.*if(\(.*\)/i\.test(url)) *return.*|\1|g' | | |
sed 's|^[^:]*:||' | | |
sed 's|\\\(.\)|\1|g' | | |
sed 's|\.\*|*|g' | | |
sed 's|^[^a-zA-Z0-9]*||' |
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 <fstream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <cmath> | |
#include <GL/gl.h> | |
#include <GL/glut.h> | |
#define sqr(a) ((a) * (a)) |
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> | |
int divImpl(int a, int b, int c, int * acc) { | |
if (a < b) { | |
return a; | |
} | |
int ret = divImpl(a, b + b, c + c, acc); | |
if (ret >= b) { | |
*acc += c; | |
ret -= b; |
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 <queue> | |
#define N 9 | |
#define set1(a, b) a = ((a) | (1 << (b))) | |
#define set0(a, b) a = ((a) & (~(1 << (b)))) | |
#define get(a, b) (((a) >> (b)) & 1) | |
#define fetch(a, b) ((((a) >> (2 * (b))) & 1) + (((a) >> (2 * (b))) & 2)) | |
#define movable(p) ((((a[p]) >> 8) & 1) == 0) |
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 <vector> | |
typedef unsigned int st; | |
int n, m; | |
st a[1000]; | |
st valid1[1030]; | |
int validCnt[1030]; |
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 <vector> | |
using namespace std; | |
int n; | |
vector<vector<pair<int, int> > > g; | |
vector<bool> vis; | |
int ans; | |
int cnt; |
OlderNewer