会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xuandyu000
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2024年1月3日
lecture6
摘要: lecture6 Welcome! Python Hello Types Speller Image Recognition CS50 Library Conditionals Variables Loops Calculator Compare Object-Oriented Programmin
阅读全文
posted @ 2024-01-03 19:52 viewoverlook
阅读(16)
评论(0)
推荐(0)
2023年12月21日
lecture4
摘要: lecture4 Addressres C语言提供了了两种关于内存的强大操作 & // 提供在内存中所存事物的地址 * // 指示编译器去往内存中某个位置 example: #include<stdio.h> int main(void) { int n = 50; printf("%p\n", &
阅读全文
posted @ 2023-12-21 19:05 viewoverlook
阅读(18)
评论(0)
推荐(0)
lecture3
摘要: lecture3 Running time 符号: O:大O符号,表示上限 \(\Omega\):大Omega符号,表示下限 \(\Theta\):大Theta符号,表示上下限 seach.c #include <cs50.h> #include <stdio.h> int main(void){
阅读全文
posted @ 2023-12-21 19:04 viewoverlook
阅读(16)
评论(0)
推荐(0)
lecture2
摘要: lecture2 Compiling 为什么在云端上有cs50这个头文件,在本机上没有? 在机器的某处存在~/usr/include/cs50.h,但是在本机上没有 代码编译四步骤 preprocessing 将散列包含行的内容转化为其他内容 compiling 将源代码转化为汇编代码 assemb
阅读全文
posted @ 2023-12-21 19:04 viewoverlook
阅读(12)
评论(0)
推荐(0)
高斯消元
摘要: 高斯消元 设有n个未知数m个方程的线性方程组 \[\begin{cases} a_{11}x_{1}+a_{12}x_{2}+\dots+a_{1n}x{n}=b_{1} \\ a_{21}x_{1}+a_{22}x_{2}+\dots+a_{2n}x{n}=b_2 \\ \dots \dots \
阅读全文
posted @ 2023-12-21 19:04 viewoverlook
阅读(49)
评论(0)
推荐(0)
组合数学
摘要: 组合数学 概念 二项式定理 \[\begin{array}{l} (x+y)^{n} = \left(\begin{array}{cc} n \\ 0 \end{array} \right) x^{n}y^{0} + \left(\begin{array}{cc} n \\ 1 \end{array
阅读全文
posted @ 2023-12-21 19:03 viewoverlook
阅读(29)
评论(0)
推荐(0)
离散化,前缀和,差分
摘要: 离散化,前缀和,差分 一维前缀和和差分之前学过不再记录 二维情况 前缀和 多维前缀和的普通求解方法几乎都是基于容斥原理 例如有这样一个矩阵,可以视为二维数组: 1 2 4 3 5 1 2 4 6 3 5 9 定义一个矩阵\(sum\)使得\(sum_{x,y}=\sum_{i=1}^{x}\sum_
阅读全文
posted @ 2023-12-21 19:03 viewoverlook
阅读(65)
评论(0)
推荐(0)
状压dp
摘要: 状压dp 暴力 枚举每一天摸不摸鱼, 对于每一组方案, 我们都可以判断其可不可行, 从可行方案中选择快乐值总和最大的一组; 复杂度\(O(2^{20})\) 每一组方案可以用 一个长度为n的二进制串来表示; 从右到左第i个位置表示第i天摸不摸鱼(1表示, 0表示不摸) 当n=5时, 10111表示在
阅读全文
posted @ 2023-12-21 19:02 viewoverlook
阅读(10)
评论(0)
推荐(0)
滑动窗口(双指针)
摘要: 滑动窗口(双指针) #include <iostream> #include <cstring> #include <queue> #include <algorithm> #include <cmath> #include <stack> #include <vector> #include <m
阅读全文
posted @ 2023-12-21 19:02 viewoverlook
阅读(5)
评论(0)
推荐(0)
概率dp
摘要: 概率dp f[x]表示能走到x号城市的概率, f[1] = 1 考虑从x号城市出发到y号城市的高速公路, 通过x号城市走到y号城市的概率有多大? f[y] += f[x] / d[x], d[x]表示从x号城市出发的高速公路一共有多少条; 能走到y号城市的概率 \[f[y] = \sum_{x\in
阅读全文
posted @ 2023-12-21 19:02 viewoverlook
阅读(9)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告