2026-09-14
虎椒博士确实不错,弥补了在国外买不到枇杷膏的缺点,Type 1 and you can join us having Dr Pepper : ) 骗你的右边那位活不了 被我骗到了吧,这里是SG世界线,现在你有了不存在在这个世界线的记忆,你马上要被踢出去了。 ...
虎椒博士确实不错,弥补了在国外买不到枇杷膏的缺点,Type 1 and you can join us having Dr Pepper : ) 骗你的右边那位活不了 被我骗到了吧,这里是SG世界线,现在你有了不存在在这个世界线的记忆,你马上要被踢出去了。 ...
MATH371 Record one interesting problem You have a 6 by 6 chess plate. Place 6 rooks that they can’t attack each other. Can’t place column 1,2 at row 1,2; Can’t place at column 3,4 at row 3,4; Can’t place at column 5,6 at row 5,6. Initially I thought to put them into 3 blocks with two rows of each to apply Inclusion-Exlusion. But this is a wrong idea. Situation such as row 1 and 6 placed in wrong is not included in our calculation. ...
Two Weeks with Operating Systems: From Processes to xv6 Traps(generated by chatgpt) Over the past two weeks, I have been learning operating systems through lectures, OSTEP, RISC-V, and especially the xv6 labs. At first, many concepts felt completely disconnected: processes, file descriptors, page tables, traps, registers, and interrupts all seemed to live in different worlds. After working through xv6, I am starting to see them as different parts of the same machine. ...
About Euler’s Algorithm Say a moduler $p$, we can form a gourp $G$ by gathering around all the integers samller than $p$ that are prime to $p$. It should be a group. Then we focus on any cosubgroup $H$, such that we can form a cyclic group $H$. The point is, any subgroup should divide the whole group by Lagrange’s theorem. $$ siz(H) |siz(G) $$ The interesting point is, if we let $H$ to be the cyclic group of an element, say $a$. ...
CS310 note — Processes, IPC, and Interrupts(Generated by chatgpt) Course notes on xv6 / RISC-V Key concepts: Process · fork() · wait() · Zombie · Pipe · FD · dup() · exec() · Interrupt 1. Process A process is a running program together with the state and resources required for execution. A process contains: Address space Code Data Heap Stack CPU context Registers Program Counter (PC) Stack Pointer (SP) File Descriptor (FD) table PID Parent process Process state A useful mental model: ...
Didn’t do anything meaningful today. One Interesting Problem https://leetcode.cn/problems/count-paths-that-can-form-a-palindrome-in-a-tree/description/ Since parity of the palindrome, we only need to use a binary digit to record the existing of each character. Where we can map all the situations into integers under $2^{26}$. And we do XOR for each new added binary digit. The point is, the characters appear in the edge. Which means it path = i to root XOR j to root. lca(i,j) to root is cancelled due to the rule of XOR. ...
Diary 2026 08 30 Learning some new techs from Richard’s online courses. Tech 1 Given that, $$ p | (n^2+1) $$ We have, $$ n^2 \equiv -1 \pmod p \\ n^4 \equiv 1 \pmod p $$ So $4|p-1$ or $p=2$ (in which case $-1 = 1$) Tech2 Given that, $$ p | (a^q-1), p \not\mid (a-1) $$ where $p,q$ are primes. We learn that, $$ a^q \equiv 1\pmod p $$ So the order of $a$ could only be $q$ or $1$. We also know from $p \not\mid (a-1)$, that the order is not 1. ...