Introduction to python's interpreter spython
Introduction to Python Interpreter spython
brief introduction
I have been interested in python's interpreter for 16 years because of my hobbies and needs, and I am determined to re-implement a version. In my personal re-game server development, I have rich application experience in c++ embedded Lua and python, and I think I have a profound unde ...
Posted by Joeddox on Sun, 07 Apr 2019 12:42:30 -0700
Expression evaluation
1: Preface
The so-called expression evaluation is to write a micro-calculator. For example, input: (1+9)* 2/2-1, output 9. For such problems, we usually use stack to simulate mathematical operations. In order to simplify the problem, before proceeding with the following analysis, let's make a convention here: this paper only discusses the four ...
Posted by four4swords on Sat, 06 Apr 2019 11:57:31 -0700
c++ Object-Oriented operator new Learning Notes
new is rarely seen in actual code, even in older c++ compiler environments, auto_ptr manages memory.But after all, several examples of c++ close to the bottom are that there is no additional burden on class encapsulation, and the c++ object model is still mapped to continuous memory addresses one by one.For memory allocation, control is still i ...
Posted by arnihr on Sat, 06 Apr 2019 11:15:31 -0700
Sorting of C++ Learning (C Language Part) (Bubble Selection Insert Quick Row)
Algorithms are solutions to a class of problemsSorting algorithm ranks from small to large and from large to small according to the size relationship of elementsBubble Selection Insert Quick RowHill sort merge sort heap sort
Bubble sorting compares the top to bottom or the bottom to float the smallest number in each round
Choose Sort 1. Find ...
Posted by pmjm1 on Tue, 02 Apr 2019 13:03:30 -0700
Loj_. Similarity of "Elegance Training 2017 Day7" (SAM set heuristic merging two-dimensional number points)
meaning of the title
Title Link
Sol
Only suffix arrays + grumpy Mo team Suites set (n sqrt {n} log n) but absolutely can't run.
Positive solution is SAM + set heuristic combination + two-dimensional point / SAM + LCT
But I only have the first qwq
The first property is that the longest common suffix of two prefixes is len of LCA on their parent ...
Posted by alcedema on Sat, 30 Mar 2019 16:09:29 -0700
Small Turtle-C++ Quick Start Notes (29) Inheritance
When does multiple inheritance need to be used?
As long as the problem you encounter cannot be described by a single "one" relationship, it is the time to inherit more.
For example, there are teachers and students in school. They are all Person s. We can use the grammar of "teacher is human" and "stud ...
Posted by d401tq on Sun, 24 Mar 2019 07:03:28 -0700
[51NOD] 1006 longest common subsequence Lcs (dynamic programming)
Given two strings A and B, find the longest common subsequence of A and B (the subsequence does not need to be continuous).
For example, two strings are:
abcicba
abdkscab
ab is a subsequence of two strings, so is abc and abca. ABCA is the longest subsequence of the two strings.
Input
Line 1: String A
Line 2: String B
(Length of A,B <= ...
Posted by optikalefx on Fri, 22 Mar 2019 07:39:53 -0700
Function Call Operator and Overload, Type Conversion
Function call operator: operator()
Function operators must be member functions. A class can define multiple versions of call operators, which should differ from each other in the number or type of parameters. If a class defines a call operator, the object of that class is called a function object.
Function object classes can contain other me ...
Posted by timus on Fri, 22 Mar 2019 00:48:53 -0700
[Splay] [Learning Notes]
Rats
Because Treap is learned first, and there are many similarities between splay and treap, so there will be many places that will not be very detailed. For Treap and balance tree reference This blog
About splay
splay, also known as stretching tree, is a binary sort tree, which can insert, find and delete operations in O(log n). It was creat ...
Posted by EnDee321 on Wed, 20 Mar 2019 12:03:28 -0700
Cf997C. Sky Full of Stars
meaning of the title
Title Link
\ (ntimesn) grid, dyed with three colors, and asked the number of schemes with one row/column all of the same color at the end.
Sol
Orz fjzzq
The final answer is this.
\[3^{n^2} - (3^n - 3)^n - \sum_{i = 1}^n (-1)^i C_n^i 3(3^{n-i} - 1)^n + (3^i - 3)(3^{(n-i)n}) \]
Let me force a wave of explanations.
First, you ...
Posted by Jtech inc. on Sun, 03 Mar 2019 19:15:22 -0800