This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv, | |
std.typecons, std.math, std.container, std.format, std.numeric; | |
struct LinkCutNode | |
{ | |
public: | |
LinkCutNode* parent, left, right; | |
void rotate() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio, std.string, std.algorithm, std.array, std.range, std.conv, | |
std.typecons, std.math, std.container, std.format, std.numeric; | |
struct LinkCutNode | |
{ | |
public: | |
LinkCutNode* parent, left, right; | |
/// thisがparentの親になるように部分木をを回す | |
void rotate() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
SplayNode* parent, left, right; | |
long value, minimum; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 value; | |
SplayNode* parent; | |
SplayNode* left, right; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module CPU where | |
import Clash.Sized.Unsigned (Unsigned) | |
import Clash.Sized.Vector (Vec((:>), Nil), (!!), replace, repeat, (++)) | |
import Clash.Class.Resize (zeroExtend, resize) | |
import Clash.Sized.BitVector (BitVector, (++#), Bit) | |
import Clash.Class.BitPack (pack, unpack) | |
import Clash.Promoted.Nat.Literals as Nat | |
import Clash.Prelude (slice,System) | |
import Clash.Signal (Signal,register,sample) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
import os | |
from itertools import product | |
OUTPUT_DIR = 'decrypted_files' | |
# list up all cipher methods and digest algorithms | |
lines = subprocess.run(['openssl', 'help'], check=True, stderr=subprocess.PIPE).stderr.decode().splitlines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A | C00001 | C10000 | Nn | |
---|---|---|---|---|
0.0000 | 0.1689 | 0.0136 | 107.8424 | |
6.7156 | 7.6140 | 6.7031 | 70.9367 | |
9.9518 | 10.2794 | 9.9450 | 59.2852 | |
8.0321 | 10.4816 | 8.0463 | 48.3563 | |
1.9509 | 1.3047 | 1.9560 | 48.2972 | |
-5.1410 | -4.8743 | -5.1362 | 44.6529 | |
-9.5694 | -9.6891 | -9.5795 | 40.4456 | |
-9.0399 | -9.5145 | -9.0418 | 37.7089 | |
-3.8268 | -3.1973 | -3.8463 | 35.8761 |