上に行くほど簡単/優先度高
- 可換セグ木(StarrySky木)
- next_permutation
- X-fast trie
- Wavelet Matrix
- 実時間O(1)永続Queue
- 永続SegmentTree
- 動的SegmentTree
| import subprocess | |
| open("/tmp/exp.c", "w").write(''' | |
| #include<stdio.h> | |
| char buf[10000]; | |
| int main() { | |
| void* val; | |
| fread(buf, 1, 10000, fopen("/proc/self/maps", "r")); | |
| puts(buf); | |
| printf("%llx stackvar\\n", (unsigned long long)&val); |
| import sys | |
| def _getflag(): | |
| orig_file = sys._getframe(1).f_code.co_filename | |
| if orig_file != __file__: | |
| print('who are you...?') | |
| exit(1) | |
| print("0nepts{fakeflag}") | |
| def getflag(): |
| #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)) |
| 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; |
| //複数行コメントアウトを置換しないと、本来入らないプリプロセッサが入ってしまう。 | |
| /* | |
| #pragma hoge fuga~ //←本来入らないはず | |
| */ | |
| //リテラルを考慮せずに置換すると破滅する:ここでint nにはCS0168は出ない `/\*.*\*/|//.*$`とかで適当に置換をすると出るようになる | |
| var a = ("/*") *//* | |
| #if DEBUG |
| name: Fetch sources | |
| on: | |
| schedule: | |
| - cron: '* 0 * * *' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: |
| 積雪深差 | |
| 視程の通報 | |
| 風力観測 | |
| 感雨時刻の整理 | |
| 正直者 | |
| 罠 | |
| 直訴 | |
| 派閥 | |
| AtCoder社の給料 | |
| AtCoderトランプ |
| 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; |