Skip to content

Instantly share code, notes, and snippets.

Avatar

Fumihiko Kinoshita fkino

View GitHub Profile
@fkino
fkino / esm_bento.rb
Created Sep 5, 2016
Code on the Bento Wrapping Paper at RubyKaigi 2016
View esm_bento.rb
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 Dec 12, 2015
星めぐり 〜 第2回 ESM オフラインどう書く 例題 回答
View star.c
#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 Oct 22, 2015
行列のできるラーメン屋 ESM オフラインどう書く (2015/10/22)
View ramen.c
#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) {