Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <memory.h>
using namespace std;
#define MAXN 1500
int cashe[MAXN][MAXN];
int binomial(int n, int k, int p){
if(cashe[n][k] != -1 ) return cashe[n][k];
if(k ==0 || k == n)
return cashe[n][k] = 1;
return cashe[n][k] = (binomial(n-1, k-1, p)+binomial(n-1, k, p))%p;
#include <iostream>
#include <vector>
using namespace std;
#define ll long long
#define MAXN 2010
int binomial[MAXN][MAXN];
ll N, K, M;
int main(){
cin >> N >> K >> M;
for(int i=0; i<M; i++){
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
#define MAXV 10010
int V, E, counter=0, discovered[MAXV];
bool isCutVertex[MAXV];
vector<int> graph[MAXV];
@bowbowbow
bowbowbow / getCAbundle.js
Created November 27, 2015 11:12 — forked from pleaseshutup/getCAbundle.js
node.js certificate issues with https.createServer and nodejitsu's http-proxy
//Thanks to:
//http://www.benjiegillam.com/2012/06/node-dot-js-ssl-certificate-chain/
//For the code to pass a CA bundle (multiple certs in one file) as an array
//which fixes certificate errors on some browsers when doing https.createServer(options
//This is how you can fix that with nodejitsu's http-proxy when using SNI
// to have a server listening and returning multiple ssl certs
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
#define ll long long
vector<ll> tree;
vector<ll> arr;
// 최초로 Segment트리의 대표값을 지정하는 함수
#include <cstdio>
#define MAXN 1000010
#define ll long long
ll arr[MAXN];
typedef struct Tree{
ll value, lazy;
}Tree;
Tree tree[3*MAXN];
#include <iostream>
#include <math.h>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
int main(){
Mat sourceImg =imread("/Users/clsrn1581/Desktop/sample.png", CV_LOAD_IMAGE_GRAYSCALE);
#include <iostream>
#include <math.h>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
Mat sourceImg;
Mat resultImg;
#include <iostream>
#include <math.h>
#include <opencv2/opencv.hpp>
using namespace cv;
Mat sourceImg;
Mat resultImg;
//가우시안 함수
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
using namespace std;
vector<int> getPi(string p){
int m = (int)p.size(), j=0;
vector<int> pi(m, 0);
for(int i = 1; i< m ; i++){
while(j > 0 && p[i] != p[j])