Skip to content

Instantly share code, notes, and snippets.

View mizuhara's full-sized avatar

Masaya Mizuhara mizuhara

View GitHub Profile
#include <queue>
#include <regex>
#include <string>
#include <bitset>
#include <sstream>
#include <iostream>
#include <algorithm>
const int width = 8;
const int height = 8;
#include <set>
#include <regex>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
const std::size_t base = 16;
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Problem
{
public interface IType
{
bool IsStrongerThan (IType other);
START_POS = %w(a b c)
MAP = [
[ 'ab', 'ac', 'ac', 'a', 'a', 'ab', 'a', '', 'a' ],
[ 'bc', 'b', 'ab', 'ab', 'bc', 'b', '', 'b', 'b' ],
[ 'c', 'bc', 'c', 'bc', 'ac', 'ac', 'c', 'c', '' ],
]
def can_goal(str, path)
return !str.empty? if (path.empty?) or (str.empty?)
#include <vector>
#include <string>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <unordered_map>
std::string nextRoot(const std::string & root, int sideway)
{
static const std::unordered_map<std::string, std::string> um = {
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace ESM
{
public interface IHand
{
#include <vector>
#include <string>
#include <numeric>
#include <iostream>
#include <algorithm>
constexpr size_t CHAIR_COUNTS = 8;
constexpr size_t OCCUPIED_STATE = 3;
void wait(std::vector<int>& chairs, size_t customer)
@mizuhara
mizuhara / aoj_ip1_11_b.cpp
Created July 12, 2015 05:46
An answer of AOJ ITP1_11_B & C
#include <queue>
#include <vector>
#include <string>
#include <cassert>
#include <iostream>
#include <algorithm>
enum class Direction
{
North = 0,
trait FareChart {
def baseFare: Int
def baseDistance: Int
def extraFare: Int
}
class EnraiFareChart extends FareChart {
def baseFare: Int = 400
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
#include <boost/range/algorithm_ext/erase.hpp>
bool is_remove_string(const std::string &s)
{
const std::string not_remove_string = "wxyz/";
return not_remove_string.find(s) == std::string::npos;