Skip to content

Instantly share code, notes, and snippets.

View fkino's full-sized avatar

Fumihiko Kinoshita fkino

View GitHub Profile
@fkino
fkino / esm_bento.rb
Created September 5, 2016 05:34
Code on the Bento Wrapping Paper at RubyKaigi 2016
eval(
%w( put
s(([ 2*7,
2*31 ,1,3
*3*5 ,2*2
*2*2 *3].
map{ |c|c
.to_ s(5*7
).gs ub("1 ","
\s") .upca se}.
@fkino
fkino / star.c
Created December 12, 2015 12:05
星めぐり 〜 第2回 ESM オフラインどう書く 例題 回答
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
static const unsigned char Direction[10][2] = {
/* R , W */
{'H', 'I'}, /*A*/
{'D', 'G'}, /*B*/
{'J', 'A'}, /*C*/
{'F', 'I'}, /*D*/
@fkino
fkino / ramen.c
Last active October 22, 2015 07:41
行列のできるラーメン屋 ESM オフラインどう書く (2015/10/22)
#include <stdio.h>
#include <string.h>
#define SEAT_NUM 8
int init(int* seat) {
memset(seat, 0x00, SEAT_NUM);
}
int search(int* seat, int num) {