<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[WRITELN]]></title><description><![CDATA[Readln & Writeln]]></description><link>https://blog.csdn.net/setoy</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; setoy]]></copyright><item><title><![CDATA[STL sort/qsort 使用functor、函数指针、lambda表达式和运算符重载的速度差异]]></title><link>https://blog.csdn.net/setoy/article/details/133014898</link><guid>https://blog.csdn.net/setoy/article/details/133014898</guid><author>setoy</author><pubDate>Tue, 19 Sep 2023 09:58:42 +0800</pubDate><description><![CDATA[比较以下STL sort使用仿函数、函数指针和运算符重载的速度差异，顺便也和C的qsort对比一下。，若去掉该优化，C的。]]></description><category></category></item><item><title><![CDATA[python 一种简单有效的将input/print重定向到文件输入/输出]]></title><link>https://blog.csdn.net/setoy/article/details/125396743</link><guid>https://blog.csdn.net/setoy/article/details/125396743</guid><author>setoy</author><pubDate>Tue, 21 Jun 2022 18:59:37 +0800</pubDate><description><![CDATA[python 种简单有效的将input重定向到文件输入
]]></description><category></category></item><item><title><![CDATA[imindmap脑图特点&使用tips]]></title><link>https://blog.csdn.net/setoy/article/details/122192553</link><guid>https://blog.csdn.net/setoy/article/details/122192553</guid><author>setoy</author><pubDate>Tue, 28 Dec 2021 14:36:51 +0800</pubDate><description><![CDATA[脑图软件就iMindMap看着比较有颜值，所以一直用它，不过也有一些无法满足日常应用的地方

9.0版本和10.0版似乎有和谐包，不过10.0已经找不到了
12.0旗舰版某宝卖100，双12时说卖19
9.0版线条上的文本位置可以随意拖动，12.0版似乎只能居左、居中、居右
9.0版图标只能放线条上，12.0可以放框内，图标多了不少
9.0版线长短只能自动调整，12.0可以手动缩短
两个版本都没法导出16:9的ppt，会导致4:3下宽度不够而字体变小
搞成16:9的单页动画可以是：

导出单页动画ppt
打]]></description><category></category></item><item><title><![CDATA[Ubuntu20.04 上使用 Let’s Encrypt 给 Nginx 加密（SSL）]]></title><link>https://blog.csdn.net/setoy/article/details/110771005</link><guid>https://blog.csdn.net/setoy/article/details/110771005</guid><author>setoy</author><pubDate>Sun, 06 Dec 2020 21:32:55 +0800</pubDate><description><![CDATA[https://www.kalasearch.cn/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04/
现在越来越简单了，简要列下步骤：

安装Certbot

apt install certbot python3-certbot-nginx

两个都要装！

确认nginx配置中有域名

server_name example.com www.example.com;


生成证书

certbot --]]></description><category></category></item><item><title><![CDATA[Codeforces 51E Pentagon]]></title><link>https://blog.csdn.net/setoy/article/details/104251536</link><guid>https://blog.csdn.net/setoy/article/details/104251536</guid><author>setoy</author><pubDate>Mon, 10 Feb 2020 19:56:53 +0800</pubDate><description><![CDATA[题意
https://codeforces.com/problemset/problem/51/E
在无向图中统计有多少个五元环，顶点数≤700\le 700≤700
算法：枚举
枚举五元环的两个顶点，找到两条各自包含2条和3条的不重复边的环。
u→vu \to vu→v的长度是2的路径条数如何计数呢？可以类似Folyd的传递闭包方法，枚举一个中间点xxx即可，根据乘法原理，∑ux=∑ux×∑xv...]]></description><category></category></item><item><title><![CDATA[Codeforces 52C Circular RMQ]]></title><link>https://blog.csdn.net/setoy/article/details/104251426</link><guid>https://blog.csdn.net/setoy/article/details/104251426</guid><author>setoy</author><pubDate>Mon, 10 Feb 2020 17:11:55 +0800</pubDate><description><![CDATA[题意
https://codeforces.com/problemset/problem/52/C
两种操作：

inc(lf, rg, v)inc(lf, rg, v)inc(lf, rg, v) — 闭区间[lf, rg][lf, rg][lf, rg]内每个数都+v+v+v
rmq(lf, rg)rmq(lf, rg)rmq(lf, rg) — 查询闭区间[lf, rg][lf, rg][l...]]></description><category></category></item><item><title><![CDATA[Codeforces 51C Three Base Stations]]></title><link>https://blog.csdn.net/setoy/article/details/104250456</link><guid>https://blog.csdn.net/setoy/article/details/104250456</guid><author>setoy</author><pubDate>Mon, 10 Feb 2020 17:00:43 +0800</pubDate><description><![CDATA[题意
https://codeforces.com/problemset/problem/51/C
xxx水平轴上有n(≤2×105)n(\le 2 \times 10^5)n(≤2×105)个房子，建3个基站，使得每个基站的直径都是ddd最小且能覆盖所有房子。房子坐标都是整数，且≤109\le 10^9≤109，输出基站半径和三个基站的中心坐标，保留6位小数。
算法一：枚举
中心位置未知、直径长...]]></description><category></category></item><item><title><![CDATA[Codeforces 45G Prime Problem]]></title><link>https://blog.csdn.net/setoy/article/details/104198971</link><guid>https://blog.csdn.net/setoy/article/details/104198971</guid><author>setoy</author><pubDate>Thu, 06 Feb 2020 17:47:55 +0800</pubDate><description><![CDATA[题意
https://codeforces.com/problemset/problem/45/G
作为数论题，这个题面给出的问题情景可以打高分，所以把题目简述下
有nnn个房子，编号1..n1..n1..n，现要给它们涂色，要求是：

一幢房子涂一种颜色，涂同种颜色的房子编号之和应该是素数
颜色种数不能太多，要尽量少
不同颜色的房子不能连续在一起

输入样例
8

输出样例
1 2 2 1 1 ...]]></description><category></category></item><item><title><![CDATA[Codeforces 46D Parking Lot]]></title><link>https://blog.csdn.net/setoy/article/details/104198767</link><guid>https://blog.csdn.net/setoy/article/details/104198767</guid><author>setoy</author><pubDate>Thu, 06 Feb 2020 17:08:23 +0800</pubDate><description><![CDATA[题意
直线停车场长度L(10≤L≤105)L(10 \le L \le 10^5)L(10≤L≤105)，车长xxx，头尾还需空出b,f(1≤x≤1000,1≤b,f≤100)b,f(1\le x \le1000, 1\le b,f \le 100)b,f(1≤x≤1000,1≤b,f≤100)的距离。最多有100次操作：停车和出车操作。对于每个停车操作输出这辆车停的位置（尽量靠左的位置），对于出...]]></description><category></category></item><item><title><![CDATA[Codeforces 45D Event Dates]]></title><link>https://blog.csdn.net/setoy/article/details/104187416</link><guid>https://blog.csdn.net/setoy/article/details/104187416</guid><author>setoy</author><pubDate>Wed, 05 Feb 2020 19:57:36 +0800</pubDate><description><![CDATA[题意
http://codeforces.com/problemset/problem/45/D
给定nnn个活动可能发生的区间[li,ri][l_i, r_i][li​,ri​]，求这nnn个活动可能发生的各个时刻（都是整数，至少存在一组解）
n≤100,li,ri≤107n \le 100, l_i, r_i \le 10^7n≤100,li​,ri​≤107
算法：模拟、贪心
乍一看像“活动...]]></description><category></category></item><item><title><![CDATA[Codeforces 38G Queue]]></title><link>https://blog.csdn.net/setoy/article/details/104185617</link><guid>https://blog.csdn.net/setoy/article/details/104185617</guid><author>setoy</author><pubDate>Wed, 05 Feb 2020 18:43:11 +0800</pubDate><description><![CDATA[题意
http://codeforces.com/problemset/problem/38/G
给定nnn个数，每个数有两个字段ai,cia_i, c_iai​,ci​，aia_iai​比前面大的就可以往前移，每移一次cic_ici​的值就减1（ci=0c_i=0ci​=0时不能移动），输出操作之后的序列（原始id）
输入样例：
5
2 3
1 4
4 3
3 1
5 2

输出样例：
3 1 ...]]></description><category></category></item><item><title><![CDATA[Codeforces 39H Multiplication Table]]></title><link>https://blog.csdn.net/setoy/article/details/104175391</link><guid>https://blog.csdn.net/setoy/article/details/104175391</guid><author>setoy</author><pubDate>Tue, 04 Feb 2020 21:25:17 +0800</pubDate><description><![CDATA[题意
输入进位制kkk，输出该进制下的(k−1)×(k−1)(k-1) \times (k-1)(k−1)×(k−1)的乘法口诀表
算法：模拟
考察进位转换的题目，从算法入门角度看还是比较综合的。主要注意的凑成kkk进制数的时候要看成10进制
#include&lt;cstdio&gt;
using namespace std;

int calc(int x, int k)
{
    int ...]]></description><category></category></item><item><title><![CDATA[Codeforces 39J Spelling Check]]></title><link>https://blog.csdn.net/setoy/article/details/104175102</link><guid>https://blog.csdn.net/setoy/article/details/104175102</guid><author>setoy</author><pubDate>Tue, 04 Feb 2020 21:16:15 +0800</pubDate><description><![CDATA[题意
字符串aaa比bbb长1位，求aaa去掉哪1位就和bbb相等，如果去1位还不相等，那么输出0。位数可能有10610^6106
算法1：暴力枚举
用C++ string，去掉1位后拼接成string，然后直接==判断。
如果忽略拼接的时间复杂度，==的复杂度也是O(n)O(n)O(n)的，加上枚举位置的复杂度，整体O(n2)&gt;O(1012)O(n^2) &gt; O(10^{12})O(...]]></description><category></category></item><item><title><![CDATA[Codeforces 36 E Two Paths]]></title><link>https://blog.csdn.net/setoy/article/details/104138493</link><guid>https://blog.csdn.net/setoy/article/details/104138493</guid><author>setoy</author><pubDate>Sat, 01 Feb 2020 21:19:40 +0800</pubDate><description><![CDATA[题意
给定mmm条边，寻找一个或者两个欧拉回路包含这mmm条边
输出第一行L−1L-1L−1是第一条路径的长度，然后第二行按输入的顺序输出路径上边的编号
第三行L2L_2L2​是第二条路径的长度，第4行是路径上边的编号
注意本题要文件输入输出：input.txt和output.txt
算法：dfs求欧拉回路
分类讨论比较麻烦，比较类似NOIP的day1T3
无解的条件分四种：

m=1
连通块数 ...]]></description><category></category></item><item><title><![CDATA[Codeforces 37 C Old Berland Language]]></title><link>https://blog.csdn.net/setoy/article/details/104138280</link><guid>https://blog.csdn.net/setoy/article/details/104138280</guid><author>setoy</author><pubDate>Sat, 01 Feb 2020 20:57:22 +0800</pubDate><description><![CDATA[题意
构造出指定长度的n个01字串，每个字串不能是其他字串的子串
算法：用DFS模拟
“不能是其他字串的子串”用哈夫曼编码方式编的字串符合这个规则，且会“最短”，本题无需最短，只需满足前一个条件即可。
哈夫曼编码需要构造哈夫曼树（不过此题不需要构造树），然后对哈夫曼树的所有指向左子树的边编码为0，右为1，以此解决“不能是其他字串的子串”问题
因此我们本题可以假设哈夫曼树已经构造完毕，然后用dfs去...]]></description><category></category></item><item><title><![CDATA[Codeforces 33C Wonderful Randomized Sum]]></title><link>https://blog.csdn.net/setoy/article/details/104137743</link><guid>https://blog.csdn.net/setoy/article/details/104137743</guid><author>setoy</author><pubDate>Sat, 01 Feb 2020 20:43:49 +0800</pubDate><description><![CDATA[题意
将序列的前面连续0个或多个数变成相反数，或者将后面连续0个或多个数变成相反数之后求整个序列和的最大值。
算法一
可以枚举1～i每个位置都取相反数之后，序列总和如何取最大，从前到后枚举一遍，从后往前再枚举一遍，然后取最大值。不过枚举效率太低，我们可以考虑先记录下每次枚举的最值
于是可以用：

dp1[i]保存1～i位取反之后，前i个数能取得的最大和
dp2[i]保存i～n位取反之后，后i个数能...]]></description><category></category></item><item><title><![CDATA[图床用文图]]></title><link>https://blog.csdn.net/setoy/article/details/103350140</link><guid>https://blog.csdn.net/setoy/article/details/103350140</guid><author>setoy</author><pubDate>Mon, 02 Dec 2019 15:50:45 +0800</pubDate><description><![CDATA[这些年，用TikZ画的图也不少了，但代码总是忘记，记录下以备云笔记上Ctrl+C/V


]]></description><category></category></item><item><title><![CDATA[几个在线画图的工具，以备偷懒之需]]></title><link>https://blog.csdn.net/setoy/article/details/102807142</link><guid>https://blog.csdn.net/setoy/article/details/102807142</guid><author>setoy</author><pubDate>Tue, 29 Oct 2019 19:45:16 +0800</pubDate><description><![CDATA[https://c.runoob.com/more/shapefly-diagram/
这里面有各种常用形状
https://csacademy.com/app/graph_editor/
这个是生成树、图之类的
https://www.desmos.com/calculator
https://www.geogebra.org/graphing
这个自带坐标系～可以画函数图像
还有一些别的工具
...]]></description><category></category></item><item><title><![CDATA[Latex--TikZ和PGF--高级文本绘图，思维绘图，想到--得到！]]></title><link>https://blog.csdn.net/setoy/article/details/83443732</link><guid>https://blog.csdn.net/setoy/article/details/83443732</guid><author>setoy</author><pubDate>Sat, 27 Oct 2018 10:07:07 +0800</pubDate><description><![CDATA[TikZ和PGF是一种用在TeX上的CLI绘图工具。CLI和GUI是两种常见的绘图方式，前者是所想即所得（WYTIWYG）的，通过类编程的思想实现绘图，这种方式往往能够生成精确控制的函数图，常见的有PostScript、PGF、Asymptote、PSTricks等。后者则是所见即所得（WYSIWYG）的，常见的有CorelDraw、Illustrator、Photoshop、GIMP、Offic...]]></description><category></category></item><item><title><![CDATA[SQL Server 置疑修复]]></title><link>https://blog.csdn.net/setoy/article/details/83268095</link><guid>https://blog.csdn.net/setoy/article/details/83268095</guid><author>setoy</author><pubDate>Mon, 22 Oct 2018 09:02:36 +0800</pubDate><description><![CDATA[先备份db（不用log），然后执行语句
USE MASTER
GO

SP_CONFIGURE 'ALLOW UPDATES',1 RECONFIGURE WITH OVERRIDE
GO

UPDATE SYSDATABASES SET STATUS =32768 WHERE NAME='置疑的数据库名'
Go

sp_dboption '置疑的数据库名', 'single user', 'tr...]]></description><category></category></item></channel></rss>