Skip to content

Instantly share code, notes, and snippets.

@plasma-effect
plasma-effect / decorator.hpp
Last active Jan 24, 2021
PythonのデコレーターをC++で再現しようと思ったらよくわからないバケモンが完成した
View decorator.hpp
// copyright (c) 2021 M.K (a.k.a plasma-effect)
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <utility>
#include <tuple>
namespace cpp_decorator
@plasma-effect
plasma-effect / README.md
Created Jun 29, 2020
簡易csv読み取り機
View README.md
@plasma-effect
plasma-effect / main.cpp
Created Aug 30, 2019
指定したディレクトリ内のファイルのサフィックスにくっついた括弧を除去するやつ
View main.cpp
#include<iostream>
#include<string>
#include<filesystem>
int main()
{
std::string path;
std::getline(std::cin, path);
for (auto&& x : std::filesystem::recursive_directory_iterator(path))
{
@plasma-effect
plasma-effect / maybe.hpp
Created Jun 21, 2019
Maybeモナドっぽい何か(お前はMaybeモナドを理解しているのか?)
View maybe.hpp
// copyright (c) 2019 plasma-effect
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include<optional>
#include<stdexcept>
#include<type_traits>
namespace maybe_monad
@plasma-effect
plasma-effect / Main.cs
Created Jun 8, 2019
音ゲーの譜面っぽいやつを連番pngで出力するやつ
View Main.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
using System.IO;
using static System.Linq.Enumerable;
namespace MusicGameMovieMaker
{
View indexer_ver0.hpp
#pragma once
#include<type_traits>
// copyright (c) 2019 plasma-effect
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
namespace auto_indexer
{
enum
View Program.cs
using static System.Console;
using static System.Linq.Enumerable;
using CompetitiveCSharp;
namespace CSharpTest
{
static class Program
{
static void WriteTree(SegTree tree)
{
View seg_tree.hpp
#pragma once
#include<type_traits>
#include<functional>
#include<numeric>
#include<algorithm>
#include<boost/range/irange.hpp>
#include<boost/range/adaptor/reversed.hpp>
namespace lib
{
@plasma-effect
plasma-effect / Route.txt
Last active Oct 1, 2018
時止め巨人の仮面ルート
View Route.txt
Cycle 1
クロックタウン入り
おばあちゃん×2
カカシ
Stray Fairy
平原でルピー集め(81r)
魔力
81r預ける
時のオカリナ
Set: []/オカリナ/[]
View main.cpp
#include<iostream>
#include<functional>
#include<algorithm>
#include<array>
#include<optional>
#include<random>
#include<sstream>
#include<queue>
constexpr int width = 9;