Personal technical blog
MATH371 First Four Weeks
Lec 1 Q1. How many three-digit integers there are so that the sum of the three digits is 24 where all the digits are distinct? Simple if we split the number in certain order, say, dictionary order and descending order.., $$ 24 = 9+8+7 $$ and we can’t do anything more, It should be $3!=6$ Q2. How many three-digit integers there are so that the sum of the three digits is 18 where all the digits are distinct ...
2026-09-14
虎椒博士确实不错,弥补了在国外买不到枇杷膏的缺点,Type 1 and you can join us having Dr Pepper : ) 骗你的右边那位活不了 被我骗到了吧,这里是SG世界线,现在你有了不存在在这个世界线的记忆,你马上要被踢出去了。 ...
2026-09-09
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. ...
2026-09-06
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. ...
2026-09-03
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$. ...
2026-09-02
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: ...
2026-09-01
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. ...
2026-08-30
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. ...
Only a Test
Only a Test 你好,我没有在睡觉
AI 管理的 Hugo 博客与自动化部署计划
AI 管理的 Hugo 博客与自动化部署计划 上一篇《本博客的框架与部署》记录了本站的技术栈与部署方式。 本文从另一个角度补充记录:AI 助手在本站扮演了什么角色,以及已落地的 Git 同步自动化部署——既是备忘,也是给未来的自己看的工作记录。 ...