Skip to content

Instantly share code, notes, and snippets.

View ushitora-anqou's full-sized avatar
🤪
Lots of fun

Ryotaro Banno ushitora-anqou

🤪
Lots of fun
View GitHub Profile
#include "hoolib.hpp"
#include <array>
#include <iostream>
#include <memory>
#include <vector>
#include <iomanip>
#include <boost/optional.hpp>
enum {
FIELD_WIDTH = 7,
#include <algorithm>
#include <iostream>
#include <array>
#include <vector>
#include <cmath>
const int CARD_KIND_NUM = 6, CARD_SEQ_SIZE = 10;
using CardSeq = std::array<int, CARD_SEQ_SIZE>;
void init(std::vector<CardSeq>& list)
#include <functional>
#include <iostream>
#include <vector>
#include "hoolib.hpp"
template <class T>
using GeneSeq = std::vector<T>;
template <class T>
using GeneSeqList = std::vector<GeneSeq<T>>;
@ushitora-anqou
ushitora-anqou / yukicoder-no-168-monosasi.cpp
Last active December 28, 2017 05:29
yukicoder No.168 ものさし
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define cbuf(buf, init) memset(buf, init, sizeof(buf))
#define sq(x) (x) * (x)
ll N, X[2000], Y[2000];
bool used[2000];
@ushitora-anqou
ushitora-anqou / yukicoder-no-067-bar.cpp
Created December 28, 2017 05:32
yukicoder No.67 よくある棒を切る問題 (1)
#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
const ll LINF = 1l << 61;
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
ll N, L[300000], K;
bool C(double l)
{
@ushitora-anqou
ushitora-anqou / sort.hpp
Created May 16, 2018 03:16
Sort is fun.
#include <vector>
template <class RandomAccessIterator>
void insert_sort(RandomAccessIterator first, RandomAccessIterator last)
{
const auto rlast = std::reverse_iterator(first);
auto it = first;
while (++it != last) {
auto elm = *it;
auto rit = std::reverse_iterator(it);
@ushitora-anqou
ushitora-anqou / radiru.sh
Last active June 28, 2018 14:48
radiru.sh - a shellscript to record らじる★らじる(Radiru*Radiru)
#!/bin/sh
# THANKS TO https://gist.github.com/riocampos/93739197ab7c765d16004cd4164dca73
##### LICENSE - CC0 ######
#radiru.sh - a shellscript to record らじる★らじる(Radiru*Radiru)
#Written in 2018 by Ushitora Anqou
#To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
#You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
##########################
@ushitora-anqou
ushitora-anqou / ept.tex
Last active June 30, 2018 09:07
Extended Pascal's Triangle
% License: CC0
% Thanks to: https://qiita.com/ryutaatkagawanct/items/d01ed4a6e0e61bed45bc
% Thanks to: https://texwiki.texjp.org/?TikZ
\documentclass[dvipdfmx,a4paper,uplatex]{jsarticle}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[level distance=8mm]
\node{0}
child { node{1}
\documentclass[%
paper=a4,article,fontsize=10pt,%
number_of_lines=40,gutter=1in,%
jlreq_notes%
]{jlreq}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
@ushitora-anqou
ushitora-anqou / mc.sh
Created July 28, 2018 06:15
Minecraft start script
#!/bin/sh
PATH="/usr/bin:/usr/local/bin:$PATH"
SESSION_NAME="minecraft"
MC_LIVE_PATH="/home/minecraft/instance/live"
MC_BACKUP_PATH="$MC_LIVE_PATH/../backup"
MC_EXECUTE_COMMAND="java -Xmx1024M -Xms1024M -jar server.jar nogui"
mc_already_started() {