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 <boost/dynamic_bitset.hpp> | |
#include <stdlib.h> | |
#include <vector> | |
#include <unordered_map> | |
#include <unordered_set> | |
#include <set> | |
#define LEN 10000 |
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
// gcc min_dnf.c -o min_dnf -lgmp | |
#include <gmp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAX (1 << 21) | |
typedef struct PAIR { |
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 <stdio.h> | |
#include <stdlib.h> | |
#define LEN 10000 | |
#define HSIZE (1 << 17) // ハッシュテーブルのサイズ | |
typedef struct PAIR { | |
int fst; |
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
import Data.List | |
data Var = Var Int deriving Eq | |
instance Show Var where | |
show (Var x) = "v" ++ show x | |
data Const = Zero | One deriving Eq | |
instance Show Const where |
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
\documentclass{jlreq} | |
| |
%% \documentclass{ltjsarticle} | |
%% \usepackage[haranoaji,deluxe]{luatexja-preset} | |
| |
%% \usepackage[uplatex,deluxe]{otf} | |
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry} | |
\usepackage{ascmac} | |
\usepackage{amsmath} | |
\usepackage{amsthm} |
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
(define rember-f | |
(lambda (test? a l) | |
(cond | |
((null? l) (quote ())) | |
((test? (car l) a) (rember-f test? a (cdr l))) | |
(else (cons (car l) (rember-f test? a (cdr l))))))) | |
(rember-f = 5 '(6 2 5 3)) | |
(rember-f eq? 'jelly '(jelly beans are good)) |
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
(define eqan? | |
(lambda (a1 a2) | |
(cond | |
((and (number? a1) (number? a2) (= a1 a2))) | |
((or (number? a1) (number? a2)) #f) | |
(else (eq? a1 a2))))) | |
(eqan? 3 5) | |
(eqan? 3 'hoge) |
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
# http://folk.uio.no/hpl/scripting/doc/gnuplot/Kawano/intro/working.html | |
# gnuplot < graph.plt | |
# sed "s/latency/time/g" graph.plt | gnuplot | |
set term epslatex # color 12 | |
set output "acl_latency.tex" | |
# set output "acl_time.tex" | |
set boxwidth 1 | |
# set key at 6.5,7000 |
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
n=3 | |
for ((i = 1; i <= 3; ++i)) | |
do | |
sort -n acl_given_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency0 | |
sort -n acl_hikin_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency1 | |
sort -n acl_takeyama_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency2 | |
sort -n acl_sgm_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency3 | |
sort -n acl_swbp_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency4 | |
sort -n acl_proposed_latency${i} | awk '{v[i++]=$1;}END {x=int((i+1)/2); if(x<(i+1)/2) print (v[x-1]+v[x])/2; else print v[x-1];}' >> acl_median_latency5 |
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
#! /bin/bash - | |
n=5 | |
m=10 | |
# m=1 | |
for (( i = 1; i <= n; i += 1 )) | |
do | |
for (( j = 1; j <= m; j +=1 )) | |
do |
NewerOlder