Skip to content

Instantly share code, notes, and snippets.

View TakashiHarada's full-sized avatar

HARADA Takashi TakashiHarada

  • Kochi University of Technology
  • Kami City, Kochi, Japan
View GitHub Profile
#include <iostream>
#include <boost/dynamic_bitset.hpp>
#include <stdlib.h>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <set>
#define LEN 10000
// 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 {
// 彩色数最小の頂点彩色を求めるプログラム
#include <stdio.h>
#include <stdlib.h>
#define LEN 10000
#define HSIZE (1 << 17) // ハッシュテーブルのサイズ
typedef struct PAIR {
int fst;
@TakashiHarada
TakashiHarada / prm.hs
Last active September 13, 2022 08:18
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
\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}
(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))
(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)
# 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
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
#! /bin/bash -
n=5
m=10
# m=1
for (( i = 1; i <= n; i += 1 ))
do
for (( j = 1; j <= m; j +=1 ))
do