Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am key-moon on github.
  • I am keymoon (https://keybase.io/keymoon) on keybase.
  • I have a public key ASADpPLIS0B_4e6-eBuzljFGIZdIOnqw57TpV3BKgtDeXgo

To claim this, I am signing this object:

View ロリハ計測.cs
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Attributes;
public static class P
{
View 償却O(1)永続Queue.cs
public class AmortizedConstantTimeImmutableQueue<T> : IImmutableQueue<T>
{
public bool IsEmpty => throw new NotImplementedException();
bool IImmutableQueue<T>.IsEmpty => throw new NotImplementedException();
public static AmortizedConstantTimeImmutableQueue<T> Empty =>
new AmortizedConstantTimeImmutableQueue<T>(0, ImmutableStack<T>.Empty, 0, ImmutableStack<T>.Empty, ImmutableStack<Lazy<ImmutableStack<T>>>.Empty);
private ImmutableStack<T> Front;
View 実装したいアルゴリズム.md

上に行くほど簡単/優先度高

実装したい

  • 可換セグ木(StarrySky木)
  • next_permutation
  • X-fast trie
  • Wavelet Matrix
  • 実時間O(1)永続Queue
  • 永続SegmentTree
  • 動的SegmentTree
View a_c.txt
積雪深差
視程の通報
風力観測
感雨時刻の整理
正直者
直訴
派閥
AtCoder社の給料
AtCoderトランプ
View fetch-source.yaml
name: Fetch sources
on:
schedule:
- cron: '* 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
@key-moon
key-moon / Preprocess is too hard.csx
Last active Feb 1, 2020
プリプロセスつらい
View Preprocess is too hard.csx
//複数行コメントアウトを置換しないと、本来入らないプリプロセッサが入ってしまう。
/*
#pragma hoge fuga~ //←本来入らないはず
*/
//リテラルを考慮せずに置換すると破滅する:ここでint nにはCS0168は出ない `/\*.*\*/|//.*$`とかで適当に置換をすると出るようになる
var a = ("/*") *//*
#if DEBUG
View splay tree(top-down,foldable).cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
View inv.cpp
#include <bits/stdc++.h>
using ll = long long;
/*
* task: calculate sum_{i=1}^input inv(i)
*
* input = 20000000
*
* MOD_A := 2^29+11 (smallest prime after 2^29(few bits))
* MOD_B := 2^30-35 (largest prime before 2^30(many bits))
@key-moon
key-moon / predictor.ipynb
Last active Jul 25, 2020
コンテスト中の順位を推定するに当たって試行錯誤をした際のnotebook | data: https://drive.google.com/drive/folders/1BnUtgcjfDNZDe9MkiBN-zBJ7vVt9Jvfc
View predictor.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.