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
# coding: utf-8 | |
from pykakasi import kakasi | |
import Levenshtein | |
import gensim | |
import MeCab | |
import numpy as np | |
from scipy import spatial | |
word2vec_model = gensim.models.KeyedVectors.load_word2vec_format('model/model_neologd.vec', binary=False) | |
mecab = MeCab.Tagger("-d /usr/local/lib/mecab/dic/mecab-ipadic-neologd -Owakati") |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() | |
int N; | |
int cnt[3]; | |
int ans, dup; |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() | |
int N; | |
int cnt[3]; | |
int ans, dup; |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() | |
int N; | |
int cnt[3]; | |
int ans, dup, res; |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() | |
int N; | |
int cnt[3]; | |
int ans, dup, res; |
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 <algorithm> | |
#include <iostream> | |
#include <string> | |
#include <map> | |
#include <utility> | |
#include <bitset> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() |
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 <algorithm> | |
#define repi(i,a,b) for(int i=(a);i<(b);++i) | |
#define rep(i,a) repi(i,0,a) | |
#define all(a) (a).begin(), (a).end() | |
using ll = long long; | |
constexpr ll mod = 10000007; | |
ll N, M; |
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
#ifndef RATIONAL_NUM | |
#define RATIONAL_NUM | |
#include <sstream> | |
#include <string> | |
class Rational { | |
public: | |
Rational() |
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 <algorithm> // for std::swap | |
#include <vector> | |
#include <cstddef> | |
#include <cassert> | |
// Matrix traits: This describes how a matrix is accessed. By | |
// externalizing this information into a traits class, the same code | |
// can be used both with native arrays and matrix classes. To use the | |
// default implementation of the traits class, a matrix type has to | |
// provide the following definitions as members: |
OlderNewer