suxxsfe

一言(ヒトコト)

当一切都消失得时候
你就会明白生命有何价值

摘要: 1 题目大意:有两个数组 a,b,你可以进行恰好一次,将 a 的一段区间翻转。设所有不同的操作方法中,操作后 a,b 中相等的位置的数量之和是多少。n5×105 我们考虑对于每一种 ai 被反转到 j 位置,然后得到 \(a_i 阅读全文
posted @ 2025-01-25 04:17 suxxsfe 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 1 所有有星星的格子,要么消失,要么移动到 (i+b,j+a) 的位置。 我们从上到小,从左到右决定每个地方有没有星星。 如果输入的位置 (i,j) 为空,那么原来这个地方肯定没有星星。 如果这个地方为灰色,那么判断 (ib,ja) 位置有没有星星(这个位置肯定已经被决策 阅读全文
posted @ 2025-01-25 03:57 suxxsfe 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1 Farmer John's N (1N5105) cows are standing in a line, with cow 1 at the front of the line and cow N at the back of the line. FJ's 阅读全文
posted @ 2025-01-25 03:32 suxxsfe 阅读(149) 评论(1) 推荐(0) 编辑
摘要: T1 opcode 4 位 nzp 3 位 PCoffset 9 位 最大内存:x40FF T2 立即数寻址,寄存器寻址,直接寻址,间接寻址,基址偏移寻址 operate instructions: ADD, NOT data movement instructions: LEA, LDR cont 阅读全文
posted @ 2024-11-02 22:56 suxxsfe 阅读(21) 评论(0) 推荐(0) 编辑
摘要: T1 1 log2(32786)=15 最少 15 位。 2 5 位 opcode 两个寄存器共 6 位 1 位指示指令为立即数的加 剩 4 位立即数 补码,最大数为 231=7 3 5 位 opcode 寄存器 3 位 剩 8 位 PCof 阅读全文
posted @ 2024-11-02 21:40 suxxsfe 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 24.10.10 hw2 T1 NOT: A¯=A NAND A AND: A AND B=(A NAND B) NAND (A NAND B) OR: \(A \te 阅读全文
posted @ 2024-10-10 19:17 suxxsfe 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 24.10.10 hw4 1 C A C B CB 2 int temp[N*M],s[N*M]; void sort(int l,int r){ if(l==r) return; int mid=(l+r)/2; sort(l,mid); sort(mid+1,r); int i=l,j=mid+ 阅读全文
posted @ 2024-10-10 11:48 suxxsfe 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 2024 09 25 hw3 1 C 2.5 1 AD 2 int check(char *str){ int sum = 0; for(char *c=str; *c; c = c+1){ if(*c == 'I'){ sum = sum+1; } else{ sum = sum-1; } if( 阅读全文
posted @ 2024-09-25 23:09 suxxsfe 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 20240 09 14 hw1 1 2 2.1 73 01001001 46 00101110 -115 10001101 2.24 01011010 90 11110110 -10 10000110 -122 3 (11)B+(01010101)B=1+85=86 \((01001 阅读全文
posted @ 2024-09-14 20:28 suxxsfe 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 2024 09 11 hw2 1 3 B 8 A 13 D 15 C 2 1 Node* merge(Node *p,Node *q){ if(p->val > q->val){ swap(p, q); } Node *ans=p, *last=p; p=p->next; while(p && q) 阅读全文
posted @ 2024-09-14 17:57 suxxsfe 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 数据结构 1 2024 09 04 1 逻辑结构:指数据元素之间的关系以及数据的组织方式,不涉及数据在计算机中实际存储细节。关注数据的抽象组织和操作方式。 物理结构:指数据在计算机存储设备中的具体存储方式。涉及如何将数据的逻辑结构映射到计算机的存储设备上。 区别:逻辑结构关注数据的抽象组织和操作方式 阅读全文
posted @ 2024-09-09 19:55 suxxsfe 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 5.1 0,0,0,0 0,0,0,1 0,0,0,2 0,0,1,0 0,0,1,1 0,0,1,2 0,0,2,0 0,0,2,1 0,0,2,2 0,1,0,0 0,1,0,1 0,1,0,2 0,1,1,0 0,1,1,1 0,1,1,2 0,1,2,0 0,1,2,1 0,1,2,2 1, 阅读全文
posted @ 2024-04-15 16:46 suxxsfe 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 3.7 bool check(char *a){//return true if the expression is legal stack<char> s; for(; *a; a++){ if(*a == ')'){ if(s.top() != '('){ return false; } s.p 阅读全文
posted @ 2024-03-28 17:50 suxxsfe 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 单摆法测重力加速度实验报告 1 摘要 本实验通过单摆法,进行一系列数据处理和运算,来测量本地的重力加速度 g。 了解单摆摆长周期的关系,确定实验方式。 测量摆长和周期,计算重力加速度和其不确定度。 测量多组摆长,通过 lT2 的关系进行拟合,进而确定重力加速度。 分析 阅读全文
posted @ 2024-03-27 17:36 suxxsfe 阅读(35) 评论(0) 推荐(0) 编辑
摘要: element.cloneNode(true) 可以获得一个节点的复制,参数表示是否递归复制 DOMContentLoaded 为页面 dom 结构加载完成的事件,如果时间中绑定的代码无论如何不生效,可能原因是 addEventListener 时 dom 已经完成了加载 解决:addEventLi 阅读全文
posted @ 2024-01-19 23:34 suxxsfe 阅读(22) 评论(0) 推荐(0) 编辑
摘要: 考虑下面一段 antlr 语法 STRING: [a-zA-Z0-9]+; NUMBER: [0-9]+; NEWLINE: '\r'? '\n'; root: id title EOF; id: 'id:' NUMBER NEWLINE; title: 'title:' STRING NEWLIN 阅读全文
posted @ 2023-12-29 16:25 suxxsfe 阅读(39) 评论(0) 推荐(0) 编辑
摘要: bash 使用反引号包裹命令可得到命令的输出:var=`command` [ -z string][nstring ] 字符串不为空则为真 getopts 内置于 bash 中,用于解析参数,只支持单个字符参数,不支持形如 --help 的长参数 阅读全文
posted @ 2023-09-18 20:53 suxxsfe 阅读(14) 评论(0) 推荐(0) 编辑
摘要: MIT-Missing-Semester https://missing-semester-cn.github.io/ 1.shell cd - 返回之前的目录 >> 输出重定向为追加而不是覆盖 目录权限:r 查看目录文件列表,w 在目录中重命名、删除、创建文件,x 搜索权限,是否允许进入该目录 t 阅读全文
posted @ 2023-09-08 10:30 suxxsfe 阅读(79) 评论(0) 推荐(0) 编辑
摘要: ## 图论 tarjan 缩强连通分量 ```cpp int dfn[N],low[N],dfscnt; int stack[N],top; int scc[N],scccnt; void tarjan(int u){ dfn[u]=low[u]=++dfscnt; stack[top++]=u; 阅读全文
posted @ 2023-09-03 19:51 suxxsfe 阅读(22) 评论(0) 推荐(0) 编辑
摘要: ## 数据结构 普通堆、可删堆 ```cpp struct Node{ inline int operator 1){ fa=i>>1; if(a[fa]b;} std::priority_queue,int(*)(const int &a,const int &b)>pque(pqueCmp); 阅读全文
posted @ 2023-09-03 19:23 suxxsfe 阅读(16) 评论(0) 推荐(0) 编辑

This blog has running: 1848 days 12 hours 55 minutes 37 seconds

Copyright © 2025 suxxsfe
Powered by .NET 9.0 on Kubernetes
点击右上角即可分享
微信分享提示