Skip to content

Instantly share code, notes, and snippets.

@matsu7874
matsu7874 / run.py
Created December 12, 2021 13:30
AHCで手元で複数ケース実行するためのスクリプト
import subprocess
import pipes
import multiprocessing
CASE = 150
TL = 2.0
def execute_case(seed):
input_file_path = f'tools/in/{seed:04}.txt'
output_file_path = f'tools/out/{seed:04}.txt'
with open(input_file_path) as fin:
@shuntaroy
shuntaroy / cleveref_ja.sty
Last active January 31, 2024 21:03
cleveref 和文論文向け設定
\usepackage[noabbrev]{cleveref}
\crefformat{chapter}{第#2#1#3章}
\crefformat{section}{#2#1#3節}
\crefformat{subsection}{#2#1#3節}
\crefname{figure}{図}{図}
\crefname{table}{表}{表}
\crefname{equation}{式}{式}
\crefname{appendix}{付録}{付録}
\newcommand{\crefrangeconjunction}{--}
\newcommand{\crefpairconjunction}{, }
@t-mat
t-mat / 00cpuid.md
Last active March 28, 2024 12:39
CPUIDを使ってCPUの情報を取得する
  • Pentium 以降の世代の CPU なら問題なく実行できる
  • VC++ (2005 以降?) なら <intrin.h>#include して、__cpuid() および __cpuidex() を使用する
  • gcc なら <cpuid.h>#include して、__get_cpuid(), __cpuid_count() を使用する
  • RDRAND を使ってみたかったのだけど、うちのは対応していなかった!
@draftcode
draftcode / gist:1357281
Created November 11, 2011 05:35
構文解析 Howto

構文解析 Howto

Author: draftcode
Date: 2011-11-11T13:18:07+09:00
ID:289a0136-0c1c-11e1-a06b-040ccee352e6

こうぶん、かいせきー