This file contains hidden or 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 <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; |
This file contains hidden or 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 <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++){ |
This file contains hidden or 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 <vector> | |
#include <algorithm> | |
using namespace std; | |
#define MAXV 10010 | |
int V, E, counter=0, discovered[MAXV]; | |
bool isCutVertex[MAXV]; | |
vector<int> graph[MAXV]; |
This file contains hidden or 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
//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 |
This file contains hidden or 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 <vector> | |
using namespace std; | |
#define ll long long | |
vector<ll> tree; | |
vector<ll> arr; | |
// 최초로 Segment트리의 대표값을 지정하는 함수 |
This file contains hidden or 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> | |
#define MAXN 1000010 | |
#define ll long long | |
ll arr[MAXN]; | |
typedef struct Tree{ | |
ll value, lazy; | |
}Tree; | |
Tree tree[3*MAXN]; |
This file contains hidden or 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 <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); | |
This file contains hidden or 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 <math.h> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
using namespace std; | |
Mat sourceImg; | |
Mat resultImg; |
This file contains hidden or 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 <math.h> | |
#include <opencv2/opencv.hpp> | |
using namespace cv; | |
Mat sourceImg; | |
Mat resultImg; | |
//가우시안 함수 |
This file contains hidden or 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 <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]) |
OlderNewer