Skip to content

Instantly share code, notes, and snippets.

View cochran q test.py
def qtest(xs):
m = len(xs)
ts = [sum(x) for x in xs]
tbar = sum(ts) / m
ss = []
for i in range(len(xs[0])):
s = 0
for j in range(len(xs)):
s += xs[j][i]
View README.md

avast/retdec をcloneしてきてビルドした後、retdec::deps::eigen が見つからないといってretdecを用いたプログラムのコンパイルに失敗した時の対処

View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
alias T = Tuple!(long, "value", long, "time");
class Segtree
{
private:
long size;
T[] xs;
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
alias T = Tuple!(long, "time", long, "value");
class Segtree
{
private:
T[] xs;
long size;
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
struct SplayNode
{
public:
SplayNode* parent, left, right;
long size;
long value, minimum;
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
struct SplayNode
{
public:
long size;
long x, minimum;
SplayNode* parent, left, right;
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
class SegmentTree
{
private:
long[] xs;
long size;
public:
this(long size)
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
alias T = Tuple!(long, "value", long, "time");
class SegmentTree
{
private:
T[] xs;
long size;
View main.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
long[] parent;
long[][] children;
long[] depth;
long[][] ancestor_table;
void calc_depth(long i, long d)
{
View b.d
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv,
std.typecons, std.math, std.container, std.format, std.numeric;
void main(string[] args)
{
long n;
readf("%d\n", &n);
long ans = 0;
long before = 0;