Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
@hakatashi
hakatashi / info2012.md
Last active December 20, 2015 07:59
東京大学情報2012年度共通問題解答

名前欄の歴史と元ネタ解説

我要給阿Q做正傳、已經不止一兩年了。

2013/2/26~ 魯迅の小説『阿Q正伝』の書き出し。「わたしが阿Qの正伝を作ろうとしたのは一年や二年のことではなかった。」

SousLePontMirabeau

2013/3/26~ ギヨーム・アポリネール(Guillaume Apollinaire)の詩『ミラボー橋』(Le pont Mirabeau)の書き出し「Sous le pont Mirabeau coule la Seine」より抜粋。「ミラボー橋の下で」

@hakatashi
hakatashi / sisoku.cpp
Created October 14, 2013 13:09
中3のとき(C++歴3ヶ月)に書いた四則solverを恥晒しうp。きたない
// sisoku.cpp | (c) 2009 Hakatashi | Licensed under CC0 1.0 Universal http://creativecommons.org/publicdomain/zero/1.0/
#include <stdio.h>
#include <math.h>
#include <string.h>
/*****************************************************
** 即席で作ったプログラムなので限りなく汚いです。 **
*****************************************************/
@hakatashi
hakatashi / JOI-2013-yo-t4.cpp
Created December 15, 2013 07:36
JOI2013年度予選問題4。15分で解いたので汚いのは許して
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
bool atnd(int a, char b) {
if (b == 'J') {
if (a >> 0 & 1 == 1) return true;
else return false;
} else if (b == 'O') {
if (a >> 1 & 1 == 1) return true;
@hakatashi
hakatashi / JOI-2013-yo-t3.cpp
Created December 15, 2013 07:37
JOI2013年度予選問題3。
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
int main() {
int W, H, N, X[1000], Y[1000];
short int dp[1000][1000];
std::cin >> W >> H >> N;
for (int i = 0; i < N; i++) {
std::cin >> X[i] >> Y[i];
@hakatashi
hakatashi / dot-tracer.cpp
Created February 6, 2014 09:25
dot-tracer
#include <iostream>
#include <windows.h>
#include <stdlib.h>
#include "EasyBMP.h" // http://easybmp.sourceforge.net/
using namespace std;
INPUT input[5][24];
int complete = 0;
int colno = 0;
@hakatashi
hakatashi / nicoutil.py
Last active August 7, 2016 19:18
simple utility to process niconico comment XML file.
# -* coding: utf-8 -*-
import sys
import os
import re
import argparse
import shutil
from xml.etree.ElementTree import *
parser = argparse.ArgumentParser(description='simple utility to process niconico comment XML file.')
@hakatashi
hakatashi / helloworld.js
Created April 27, 2014 11:07
#実用的なhelloworld
String.prototype.capitalize = function() {
return this.charAt(0).toUpperCase() + this.slice(1);
};
var Greet = function(greeting, objection) {
this.greeting = greeting || 'hello';
this.objection = objection || 'world';
this.do = function() {
console.log((this.greeting + ', ' + this.objection + '!').capitalize());
};
@hakatashi
hakatashi / AutoHotKey.ahk
Created May 4, 2014 04:14
My AutoHotKey
#PgUp::Volume_Up
#PgDn::Volume_Down
Pause::Media_Play_Pause
ScrollLock & h::send {Left}
ScrollLock & j::send {Down}
ScrollLock & k::send {Up}
ScrollLock & l::send {Right}
ScrollLock & y::send {Home}