<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[Rachelhello123的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/Rachelhello123</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; Rachelhello123]]></copyright><item><title><![CDATA[wsl中配置cuda,pytorch,cudnn,vscode]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/142761112</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/142761112</guid><author>Rachelhello123</author><pubDate>Tue, 08 Oct 2024 19:58:04 +0800</pubDate><description><![CDATA[将下载的 cuda-wsl-ubuntu.pin 文件移动到系统的 /etc/apt/preferences.d/ 目录下，并将其重命名为 cuda-repository-pin-600。Compute Platform根据CUDA的安装版本来进行选择，CUDA版本高于11.8选择CUDA 12.1，反之选择CUDA 11.8。点击对应选项，下方会生成对应的下载命令语句，将命令语句输入到命令行界面即可。将 CUDA 11.8 的 GPG 密钥复制到系统的密钥环中。将下载的 CUDA 安装包安装到系统中。]]></description><category></category></item><item><title><![CDATA[配置WSL（单纯记录]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/142202178</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/142202178</guid><author>Rachelhello123</author><pubDate>Fri, 13 Sep 2024 13:06:42 +0800</pubDate><description><![CDATA[参考链接(https://blog.youkuaiyun.com/mustuo/article/details/133960230)勾选适用于Linux的Windows子系统和虚拟机平台。在控制面板-启用或关闭windows功能中。重启后用管理员权限打开Powershell。查看已安装的系统，图上显示说明未安装。重新键入安装ubuntu的命令。将wsl默认版本改为wsl1。可能是默认安装了wsl2。把wsl版本设置成版本2。进入BIOS启用虚拟化。]]></description><category></category></item><item><title><![CDATA[F1. 生活在树上（easy version）树，dfs]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/128068137</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/128068137</guid><author>Rachelhello123</author><pubDate>Sun, 27 Nov 2022 19:11:00 +0800</pubDate><description><![CDATA[树、dfs]]></description><category></category></item><item><title><![CDATA[P8198 [传智杯 #4 决赛] 背单词的小智 二分答案+前缀和]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/128067837</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/128067837</guid><author>Rachelhello123</author><pubDate>Sun, 27 Nov 2022 19:05:45 +0800</pubDate><description><![CDATA[二分答案]]></description><category></category></item><item><title><![CDATA[P8842 [传智杯 #4 初赛] 小卡与质数2 垃圾筛]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/127988788</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/127988788</guid><author>Rachelhello123</author><pubDate>Tue, 22 Nov 2022 19:56:53 +0800</pubDate><description><![CDATA[垃圾筛]]></description><category></category></item><item><title><![CDATA[小码哥的比赛 概率dp]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/127037742</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/127037742</guid><author>Rachelhello123</author><pubDate>Sun, 25 Sep 2022 15:30:11 +0800</pubDate><description><![CDATA[概率dp]]></description><category></category></item><item><title><![CDATA[讲价 数学问题]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/126886549</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/126886549</guid><author>Rachelhello123</author><pubDate>Fri, 16 Sep 2022 12:11:34 +0800</pubDate><description><![CDATA[数学类的算法题]]></description><category></category></item><item><title><![CDATA[字串差值 dp]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/126886324</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/126886324</guid><author>Rachelhello123</author><pubDate>Fri, 16 Sep 2022 11:01:14 +0800</pubDate><description><![CDATA[dp]]></description><category></category></item><item><title><![CDATA[逆波兰表达式 （利用stl]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/126885551</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/126885551</guid><author>Rachelhello123</author><pubDate>Fri, 16 Sep 2022 10:53:19 +0800</pubDate><description><![CDATA[逆波兰表达式（后缀表达式）]]></description><category></category></item><item><title><![CDATA[求解同余方程 数论 扩展欧几里得]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/126087885</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/126087885</guid><author>Rachelhello123</author><pubDate>Sun, 31 Jul 2022 22:42:46 +0800</pubDate><description><![CDATA[同于方程 扩欧]]></description><category></category></item><item><title><![CDATA[分子个数 数论（欧拉函数 前缀和]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/126085747</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/126085747</guid><author>Rachelhello123</author><pubDate>Sun, 31 Jul 2022 17:09:39 +0800</pubDate><description><![CDATA[欧拉函数]]></description><category></category></item><item><title><![CDATA[河内双塔 递归]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124902969</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124902969</guid><author>Rachelhello123</author><pubDate>Sat, 21 May 2022 20:35:09 +0800</pubDate><description><![CDATA[题目：


思路：
总的来说，和有汉诺塔的原题差不多，只要在此基础上*2即可
所以先考虑汉诺塔原题该如何解决
1.将n-1个盘子通过C然后放置到B上
2.再将最大的盘子放到C
3.将n-2个盘子通过C放置到A上
4.第二大的放到C
。。。。。
TLE做法：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
#include &lt;cmath&gt;
using namespace std;
const int maxn=111111;
int n;
int]]></description><category></category></item><item><title><![CDATA[mxr数 map]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124902622</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124902622</guid><author>Rachelhello123</author><pubDate>Sat, 21 May 2022 20:04:42 +0800</pubDate><description><![CDATA[题目：

思路：
考虑到如果直接开bool数组可能会爆，所以搞了个map
代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
#include &lt;map&gt;
using namespace std;
const int maxn=511111;
int n;
map&lt;int,bool&gt; m;
bool flag;
int main()
{
    cin&gt;&gt;n;
    for(int i=1;i*(i+1)/2&lt]]></description><category></category></item><item><title><![CDATA[进行一个幂的运算 数学杂题]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124901594</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124901594</guid><author>Rachelhello123</author><pubDate>Sat, 21 May 2022 19:35:14 +0800</pubDate><description><![CDATA[题目：

思路：
这个题目巧妙的地方在于2的k次-1需要联想到就是每个位上是1的情况，然后看成类似m进制
Eg.2的7次=2的一次 * 2的2次*2的4次
代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
using namespace std;
const int maxn=111111111;
const int mod=1e8+7;
long long m,k,ans;
int main()
{
    cin&gt;&gt;m&gt;&gt;]]></description><category></category></item><item><title><![CDATA[P2347 [NOIP1996 提高组] 砝码称重 dp（01背包）]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124840925</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124840925</guid><author>Rachelhello123</author><pubDate>Wed, 18 May 2022 13:56:06 +0800</pubDate><description><![CDATA[题目：

思路：
把砝码一个个列出来，成为一个数组，然后做选择（选或者不选）
需要注意的是需要从1000开始查询vis[i]是否可行
代码：
#include &lt;iostream&gt;
#include &lt;cstdio&gt;
using namespace std;
const int maxn=1111;
int n,a[maxn],b[11]={0,1,2,3,5,10,20};
bool vis[maxn];
int main()
{
    for(int i=1;i&lt;=6;i]]></description><category></category></item><item><title><![CDATA[购买数字 字符串]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124840320</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124840320</guid><author>Rachelhello123</author><pubDate>Wed, 18 May 2022 13:24:12 +0800</pubDate><description><![CDATA[题目：


思路：
总的思路是一个比较巧妙的方法，把前导零去掉后搞成两个int数组，以前面一部分来对称构造前导零，如果构造出来的这个数小于真正的那个数的话就刚好是最大的那个回文数。如果比真正的那个数大的话，从中间开始对应搞回文数。
注意点：
1.1000，100，10这种情况需要另外讨论
代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
#include &lt;cstring&gt;
using namespace std;
const int m]]></description><category></category></item><item><title><![CDATA[赌石 dp]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124544789</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124544789</guid><author>Rachelhello123</author><pubDate>Mon, 02 May 2022 18:59:28 +0800</pubDate><description><![CDATA[题目：

思路：
一开始直接朝着概率论的方向去了，万万没想到是道dp
基本就是把这道题换了个题面
考虑状态转移方程dp[i][j]表示剩下i个蓝球和j个红球的时候，最后剩下两个相同的球的概率
dp[i][j]=dp[i-1][j]*0.5+dp[i][j-1]*0.5

如果某一种球的数量=0且另一种的球的数量大于等于2，那么dp[i][0]=0
#include &lt;iostream&gt;  
#include &lt;cstdio&gt;  
#include &lt;cstring&gt;  
]]></description><category></category></item><item><title><![CDATA[矩形相交 几何问题]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124538146</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124538146</guid><author>Rachelhello123</author><pubDate>Mon, 02 May 2022 11:31:16 +0800</pubDate><description><![CDATA[题目：


思路：
一开始想着纯分类讨论，讨论x3的位置在哪（以x1,x2作为分隔点）然后越讨论越混乱，然后看了看别人的做法，发现类比圆，用类似圆心的方法去考虑很巧妙。然后只需要特判一下部分情况。
Tips：
需要把这里的矩形看成空心矩形，只有在两个矩形不完全重合并且有大于一个交点才视为相交
AC代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
#include &lt;algorithm&gt;
#include &lt;cstring&gt;
u]]></description><category></category></item><item><title><![CDATA[区间修改 差分]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124537619</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124537619</guid><author>Rachelhello123</author><pubDate>Mon, 02 May 2022 10:54:54 +0800</pubDate><description><![CDATA[题目：


思路：
可以参考铺设道路
两道题的区别在于不仅可以往上加，也可以往下减，如果某一段+1/-1，那么相应的差分数组中就会有一组数+1、-1，但是计算的时候为了可以每次都配对成功，a[1]-a[0]和a[n+1]-a[n]也需要加上，但是计算的时候不需要管，只要d[2]-d[n]最终都变为0了就可以
AC代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
using namespace std;
const int maxn=111111;
i]]></description><category></category></item><item><title><![CDATA[铺设道路 差分]]></title><link>https://blog.youkuaiyun.com/Rachelhello123/article/details/124537411</link><guid>https://blog.youkuaiyun.com/Rachelhello123/article/details/124537411</guid><author>Rachelhello123</author><pubDate>Mon, 02 May 2022 10:26:34 +0800</pubDate><description><![CDATA[题目：

思路：
差分：d[i]=a[i]-a[i-1](记录相邻两个位置的差值，可以类比前缀和）
目的是填充不平的区域，并且可以连续区域填充，也就是如果相邻位置经过填充之后高度相同可以看成同一段。所以可以猜测用差分来计算。
Tips:
需要保留第一个点与地面的差
代码：
#include &lt;cstdio&gt;
#include &lt;iostream&gt;
using namespace std;
const int maxn=111111;
int n,a[maxn],d[maxn],ans]]></description><category></category></item></channel></rss>