Skip to content

Instantly share code, notes, and snippets.

View NotFounds's full-sized avatar
🦕

Iori IKEDA NotFounds

🦕
View GitHub Profile
@NotFounds
NotFounds / Template.cs
Last active June 4, 2017 06:19
for Competition Programing in C# 6.0
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Console;
using static System.Math;
using static NotFounds.MyMath;
using static NotFounds.MyUtility;
namespace NotFounds
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
namespace WaterAngel
{
public class Program
{
public static void Main(string[] args)
#!/bin/sh
ROGNAME=$(basename $0)
VERSION="1.0"
HELP_MSG="'$PROGNAME -h'と指定することでヘルプを見ることができます"i
FLG_W=0
FLG_R=0
FLG_RT=0
# ヘルプメッセージ
usage() {
@NotFounds
NotFounds / h8_printf.h
Last active May 16, 2016 12:44
実験で使うH8マイコン用の簡易printf関数
/*
The MIT License (MIT)
Copyright (c) 2016 NotFounds
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE S
#include <iostream>
#include <fstream>
#include <string>
#include <cctype>
#include <vector>
using namespace std;
void printH()
{
# 左右にウィンドウを分割
split-window -h
# 2番目のpaneを選択
select-pane -t 2
# 上下にウィンドウを分割する
split-window -v
# 2番目のpaneの高さを設定
resize-pane -D -t 2 15
# 3番目のpaneを選択
select-pane -t 3
# prefixキーをC-fに変更
set -g prefix C-f
# 色の設定
set-option -g default-terminal screen-256color
set -g terminal-overrides 'xterm:colors=256'
# ステータスバーをトップに配置する
set-option -g status-position top
#include <iostream>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <string>
#include <vector>
#include <cctype>
#include <algorithm>
Result = Struct.new(:charactor, :expression, :answer)
def to_int(map, str)
str.split(//).reduce(0) {|acc, c| acc * 10 + map[c]}
end
def alphametic(expression)
# count uniq charactors
charactors = Array.new(expression).join.split(//).uniq
length = charactors.length
State = Struct.new(:pitcher, :result, :cnt, :operate)
Target = [ 5, 5, 0]
First = [10, 0, 0]
Pitcher = [10, 7, 3]
def check(pitcher)
return pitcher == Target
end