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
// FILE: main.cc | |
#include <vector> | |
#include <string> | |
#include <algorithm> | |
#include "utility.h" | |
using namespace std; | |
#define VECTOR_SIZE 1000000 | |
#define SWAP_SIZE 100000 |
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 INF 987654321 | |
#include <stdio.h> | |
#include <queue> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
int main(int argc, char * argv[]) | |
{ |
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
print "\n".join([" ".join([i==j*j and'*'or((not i or not j)and'+'or' ')for j in reversed(range(-25,25))])for i in reversed(range(0,50))]) |
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 | |
# # Python으로 웹툰 파싱하기 | |
# ### 필요한 패키지들을 가져옵니다. | |
# bs4는 BeautifulSoup로 좀 더 간편하게 파싱을 도와줍니다. | |
# lxml은 beautifulsoup와 같이 사용됩니다. | |
# In[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
# coding: utf-8 | |
# # Python으로 웹페이지 파싱하기 | |
# ### 필요한 패키지들을 가져옵니다. | |
# bs4는 BeautifulSoup로 좀 더 간편하게 파싱을 도와줍니다. | |
# lxml은 beautifulsoup와 같이 사용됩니다. | |
# In[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
from random import randrange, uniform, shuffle | |
from numpy import mean | |
from functools import reduce | |
CHILD_SIZE = 100 | |
DNA_SIZE = 16 | |
SORTED = range(DNA_SIZE) | |
MUTATION_RATE = 0.3 | |
SELECT_BEST_RATE = 0.3 |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#if defined(_WIN32) && defined(_MSC_VER) | |
#pragma warning (disable : 4996) | |
#endif | |
enum { RED, BLACK }; |
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
/** | |
segment tree with lazy propagation | |
init with (vector<T>) | |
use update to update value with range | |
query return value of operation defined oper function | |
*/ | |
#include <iostream> | |
#include <cmath> | |
#include <vector> |
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
@echo off | |
REM "" | |
REM "2015-12-08 MaybeS" | |
REM "" | |
SET version=1.0 | |
SET found="" | |
SET iKey=%1 | |
SET iPath="" |
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 <fstream> | |
using namespace std; | |
int main(int argc, char * argv[]) | |
{ | |
if (argc < 2) | |
return -1; | |
string fname(argv[1]); |