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
const int base = 1000000000; const int base_digits = 9; | |
struct bigint { | |
vector<int> a; int sign; | |
bigint() : | |
sign(1) { | |
} | |
bigint(long long v) { | |
*this = v; |
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
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.util.Iterator; | |
import org.apache.poi.hssf.usermodel.HSSFCell; | |
import org.apache.poi.hssf.usermodel.HSSFRow; | |
import org.apache.poi.hssf.usermodel.HSSFSheet; | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
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
# Tạo trên tập dữ liệu 2 triệu tài liệu Tiếng Việt | |
# Xây dựng bằng cách tính IDF và chọn ra các từ có IDF nhỏ. | |
bị | |
bởi | |
cả | |
các | |
cái | |
cần | |
càng | |
chỉ |
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
sudo su | |
# Java | |
yum -y install java-1.8.0-openjdk-devel | |
# Build Esentials (minimal) | |
yum -y install gcc gcc-c++ kernel-devel make automake autoconf swig git unzip libtool binutils | |
# Extra Packages for Enterprise Linux (EPEL) (for pip, zeromq3) | |
yum -y install epel-release |
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
a | |
ai | |
am | |
an | |
ang | |
anh | |
ao | |
au | |
ay | |
ba |
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 <iostream> | |
#include <cstring> | |
#include <vector> | |
#include <cstdlib> | |
#include <algorithm> | |
#include <map> | |
#include <utility> | |
#include <cctype> |
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 MAXN 100000 | |
#define MAX_LOG 17 | |
int n,s[MAXN+5]; | |
int st[MAX_LOG+1][MAXN+5]; | |
inline void init(){/*假設區間由[0~n-1]*/ | |
for(int i=0;i<n;++i)st[0][i]=s[i]; | |
for(int j=1;(1<<j)<=n;++j) | |
for(int i=0;i+(1<<j)<=n;++i) | |
st[j][i]=min(st[j-1][i],st[j-1][i+(1<<(j-1))]); | |
} |
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
//shihongzhi -- 2012.3.9 | |
#include <stdio.h> | |
#include <string.h> | |
void KMP(char *T, char *P, int *pi) | |
{ | |
int tLen = strlen(T); | |
int pLen = strlen(P); | |
int k = 0; | |
for (int i=0; i<tLen; ++i) |
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 <cstring> | |
using namespace std; | |
int buildlps (char * pat, int m, int *lps){ | |
lps[0] = lps[1] = 0; | |
for(int i=2; i<=m; i++){ | |
int j = lps[i-1]; | |
while(1){ |
OlderNewer