Skip to content

Instantly share code, notes, and snippets.

View key-moon's full-sized avatar

keymoon key-moon

  • Tokyo
  • 13:33 (UTC +09:00)
  • X @kymn_
View GitHub Profile

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:

using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using BenchmarkDotNet.Running;
using BenchmarkDotNet.Attributes;
public static class P
{
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;

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

実装したい

  • 可換セグ木(StarrySky木)
  • next_permutation
  • X-fast trie
  • Wavelet Matrix
  • 実時間O(1)永続Queue
  • 永続SegmentTree
  • 動的SegmentTree
積雪深差
視程の通報
風力観測
感雨時刻の整理
正直者
直訴
派閥
AtCoder社の給料
AtCoderトランプ
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 February 1, 2020 15:51
プリプロセスつらい
//複数行コメントアウトを置換しないと、本来入らないプリプロセッサが入ってしまう。
/*
#pragma hoge fuga~ //←本来入らないはず
*/
//リテラルを考慮せずに置換すると破滅する:ここでint nにはCS0168は出ない `/\*.*\*/|//.*$`とかで適当に置換をすると出るようになる
var a = ("/*") *//*
#if DEBUG
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;
#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 July 25, 2020 16:21
コンテスト中の順位を推定するに当たって試行錯誤をした際のnotebook | data: https://drive.google.com/drive/folders/1BnUtgcjfDNZDe9MkiBN-zBJ7vVt9Jvfc
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.