Skip to content

Instantly share code, notes, and snippets.

View jen6's full-sized avatar
🔝
Growing Faster

SonGeon jen6

🔝
Growing Faster
View GitHub Profile
#include <iostream>
#include <fstream>
#include <vector>
const std::string KFILE_NAME = "./intlist.txt";
static long long inverse_counter = 0;
template <class VecIter>
auto merge(VecIter iter_begin, VecIter iter_middle, VecIter iter_end){
size_t iter_dis = std::distance(iter_begin, iter_end);
@jen6
jen6 / .tmux.conf
Created January 18, 2018 02:33 — forked from tsl0922/.tmux.conf
vim style tmux config
# use C-a, since it's on the home row and easier to hit than C-b
set-option -g prefix C-a
unbind-key C-a
bind-key C-a send-prefix
set -g base-index 1
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good
@jen6
jen6 / amazing.go
Last active November 24, 2017 09:49
for i, clink := range childLinks {
rch := make(chan interface{})
resultChannels[i] = rch
duplicateLink, ok := linkMap.Load(clink.FullLink)
if ok {
fmt.Println("-----------------------")//if remove 26 sec | now 12 sec
*clink = *duplicateLink.(*link.Link)
go func() {
rch <- struct{}{}
import subprocess
#import urllib
from urllib.parse import urlencode
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
import time
import json
kHerokuUrl = "http://lit-castle-67838.herokuapp.com"
delayTime = 5
set nocompatible
set nu
set ts=8
set sw=4
set sts=4
set tabstop=4
set smartindent
set autoindent
set t_Co=256
syntax on
#include <iostream>
static int w[] = {20,20,20};
static int x0 = 1;
const int kwAdd = 5;
bool twoPercep(int x1, int x2)
{
int x[3] = {0,};
readInts :: IO [Int]
readInts = fmap (take 3 . map read.words) getLine
camping n = do
(x:y:z:[]) <- readInts
if not $ z == 0
then
do
let day = ((z `div` y) * x + (z `mod` y))
putStrLn $ "Case " ++ (show n) ++ ": " ++ (show day)
#include <iostream>
#include <bitset>
#include <cstring>
void printBin(int num)
{
unsigned char arr[4] = {0,};
char *ptr = reinterpret_cast<char *>(&num);
std::memcpy(arr, ptr, sizeof(int));
std::bitset<8> buf;
#include <stdio.h>
#include <unistd.h>
int main() {
int m, n;
scanf("%d %d" , &n, &m);
int arr[1000] = {0, };
//1234567
/*
12 4567 3
#include <stdio.h>
#include <stdlib.h>
struct node {
int data;
struct node *nxt;
} Node;
Node base;