- 博客(7)
- 收藏
- 关注
原创 bootmain.c
/* bootmain - the entry of bootloader */voidbootmain(void) { // read the 1st page off disk readseg((uintptr_t)ELFHDR, SECTSIZE * 8, 0); // is this a valid ELF? if (ELFHDR->e_magic != ELF_MAGIC) { goto bad; } struct pr
2021-02-08 22:19:46
641
1
原创 eoj3294
WiFi题面:eoj3284 WiFi思路我们假设第i个wifi发射器的位置和发射的信号强度为posi,vali,x为询问的坐标x我们要求的是val - |x- pos| 的最大值,做一个代数变形就是val - x + pos 或者 val + x - pos 的最大值令p = val - | x - pos |对于x左边的WiFi发射器,有x-pos >= 0p = val - x + pos ,那么我们只需二分查找找到x >= pos的点在按(val+p.
2021-02-06 21:09:47
292
原创 uCore操作系统源码分析——bootasm.S
CPU加电后稳定后此时CS的值为0xF000EIP的值为0xFFF0那么PC=(CS << 1) + EIP = 0xFFFF0CPU要执行的第一条指令位于0xFFFF0处的指令这条指令是个长跳转指令,跳转到0xF000:0xE05B处执行可知BIOS实例就在这里Bootloader在BIOS完成系统硬件自检和把bootloader装载进内存之后,接下来就到bootloader干的活了。本文重点也旨在分析bootloader的代码。bootloader的代码分为两大部分,一部
2021-02-04 21:43:50
850
原创 Parenting Partnering Returns
Google Code Jam Qualification Round 2020C题 Parenting Partnering Returns题干Cameron and Jamie’s kid is almost 3 years old! However, even though the child is more independent now, scheduling kid activ...
2020-04-08 15:16:15
262
原创 Nesting Depth
Google Code Jam Qualification Round 2020C 题 Nesting Depth题目链接(需要科技)题干Given a string of digits S, insert a minimum number of opening and closing parentheses into it such that the resulting string i...
2020-04-08 15:08:53
543
原创 Bad Ugly Numbers
Codeforces Global Round 7题干You are given a integer n (n>0). Find any integer s which satisfies these conditions, or report that there are no such numbers:In the decimal representation of s:s>...
2020-03-20 10:47:24
176
原创 Anu-Has-a-Function
CodeForces Round # 618 div2 C题Anu Has a Function题干Anu has created her own function f:f(x,y)=(x∣y)−yf : f(x,y)=(x|y)−yf:f(x,y)=(x∣y)−y where || | denotes the bitwise OR operation. For example,f(11,...
2020-03-19 19:50:42
231
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人