跳到正文

个人记录

日常学习(正在更新中)

Kevin_Mamba约 14 分钟
原文
文章信息与版本

文章信息

发布
2022年8月18日
收录
2025年12月12日
更新
2026年10月28日
篇幅
约 14 分钟

版本

  1. v2当前
  2. v1

例题 :4+23 \sqrt{4+2\sqrt{3}\space}

解 :

原式 = (12+(3 )2)+23  \sqrt{(1^2+(\sqrt{3\space})^2)+2\sqrt{3\space}\space}

= 12+(3 )2+23  \sqrt{1^2+(\sqrt{3\space})^2+2\sqrt{3\space}\space}

又 ∵(a2+b2)=(a2+b2+2ab)\large\because (a^2+b^2)=(a^2+b^2+2ab)

∴ Original formula=(1+3 )2 \large \therefore\ Original\space formula=\sqrt{(1+\sqrt{3\space})^2\space}

=1+3 \large =1+\sqrt{3\space}

posted on Aug. 18th, 2022posted\space on \space Aug. \space 18th,\space 2022

Thanks to WangHX Thanks \space to \space WangHX \space @违规用户名T3Zr6OE%

From Qingzhuhu−xiangyi Foreign Languages School ChangshaFrom\space Qingzhuhu-xiangyi \space Foreign \space Languages \space School \space Changsha

快速高质量实用乘法(取模)

C++
#include<bits/stdc++.h>
using namespace std;

typedef unsigned long long ull;

ull Fast_Multiplication (ull a, ull b, ull c)		// work out (a * b % c)
{
	long double d = (long double)a * b - (long double)(ull)(a * b / c) * c;
	return (ull)(d + 0.5);
}

int main()
{
	ull a, b, c;
	scanf ("%llu%llu%llu",&a, &b, &c);
	printf ("%llu", Fast_Multiplication (a, b, c));
	return 0;
}

posted on Aug. 19th, 2022posted\space on \space Aug. \space 19th,\space 2022

Thanks to LeiRQ Thanks \space to \space LeiRQ \space @lrq090403

From YZYLFrom\space YZYL

JSOI2015 夏令营提高组实战 Day5 T1

题面 :

解析

知道你看不懂,我也没看懂 。

反正就是什么 lg (log10) x 和 x 的位数 有亿点点关系 。

代码也是需要自己理解的 。

C++
#include<bits/stdc++.h>
using namespace std;

int n;

int l, r, mid;													// 二分必备

int main()
{
	scanf("%d", &n);

	l = 0, r = 2e9 + 114514;
	while(l + 1 < r)											// 二分模板 之一
	{
		mid = (l + r) >> 1;
		if((double) mid * log10 (mid) >= (double) n - 1.0)		// 注意精度,不能直接 floor() or ceil();还需要 -1
			r = mid;
		else l = mid;
	}
	printf("%d", r); 											// 输出,参照某 对线哥

	return puts(""),0;
}

/*
温故而 知新 :
log10()		顾名思义,就是 log10 x

floor()		将浮点数 向下取整
ceil()		将浮点数 向上取整

cerr << ;	高级输出调试,用法和 cout 差不多,自己百度
*/

posted on Aug. 21th, 2022posted\space on \space Aug. \space 21th,\space 2022

Thanks to LiZX Thanks \space to \space LiZX \space @clamee

From The First High School of Changsha HunanFrom\space The \space First \space High \space School \space of \space Changsha \space Hunan

& LiMZ \And \space LiMZ \space @Ice_Cold_Tea

From Qingzhuhu−xiangyi Foreign Languages School ChangshaFrom\space Qingzhuhu-xiangyi \space Foreign \space Languages \space School \space Changsha

新知识:114514  &\space \And 1919810

114514和1919810到底是在什么地方出现呢?有些了解的网友进行了解答!回答如下:“其实这个梗出自被日本网友一直恶搞的钙片真夏夜淫梦第四章昏睡!野獣先辈,最后野兽先辈(本名田所)高潮的时候,最后发出的声音,日文原本翻译成中文是“好,好吧!”,发音是:逸逸有可以有,结果这里的发音特别像日文中数字“114514”的读法,因此就出现了“114514”的弹幕。”。

(来自 百度)

posted on Aug. 22th, 2022posted\space on \space Aug. \space 22th,\space 2022

Thanks to LeiRQ \large Thanks \space to \space LeiRQ \space @lrq090403

他推荐的视频:U240871 thing_of_thing

From YZYLFrom\space YZYL

二项式定理反演

注记:(nm)=Cnm\dbinom{n}{m} = \Large C_n^m

结论

∑i=1n (ni)(−1)n−i=[n==0]\Large \sum\limits_{i=1}^{n}\ \dbinom{n}{i} (-1)^{n-i}=[n == 0]

f(n)=∑i=0n(ni)g(i)  ⟺  g(n)=∑i=0n(−1)n−i(ni)f(i)\huge f(n)=\sum\limits_{i=0}^{n}\dbinom{n}{i}g(i)\iff g(n)=\sum\limits_{i=0}^{n}(-1)^{n-i}\dbinom{n}{i}f(i)

推理

f(n)=∑i=0n(ni)g(i)\Large f(n)=\sum\limits_{i=0}^{n}\dbinom{n}{i}g(i)

=∑i=0n(ni)∑j=0i(−1)i−j(ij)f(j)\Large = \sum\limits_{i=0}^{n}\dbinom{n}{i}\sum\limits_{j=0}^{i}(-1)^{i-j}\dbinom{i}{j}f(j)

=∑j=0nf(j)∑i=jn(ni)(ij)(−1)i−j\Large = \sum\limits_{j=0}^{n}f(j)\sum\limits_{i=j}^{n}\dbinom{n}{i}\dbinom{i}{j}(-1)^{i-j}

=∑j=0nf(j)∑i=jn(nj)(n−ji−j)(−1)i−j\Large = \sum\limits_{j=0}^{n}f(j)\sum\limits_{i=j}{n}\dbinom{n}{j}\dbinom{n-j}{i-j}(-1)^{i-j}

=∑j=0nf(j)(nj)∑i=jn(n−ji−j)(−1)i−j\Large = \sum\limits_{j=0}^{n}f(j)\dbinom{n}{j}\sum\limits_{i=j}{n}\dbinom{n-j}{i-j}(-1)^{i-j}

=∑j=0nf(j)(nj)∑k=0n−j(n−jk)(−1)k\Large = \sum\limits_{j=0}^{n}f(j)\dbinom{n}{j}\sum\limits_{k=0}^{n-j}\dbinom{n-j}{k}(-1)^{k}

=∑j=0nf(j)(nj)[n==0]\Large = \sum\limits_{j=0}^{n}f(j)\dbinom{n}{j}[n == 0] = 左边 。

posted on Aug. 24th, 2022posted\space on \space Aug. \space 24th,\space 2022

Thanks to LiZX Thanks \space to \space LiZX \space @clamee

From The First High School of Changsha HunanFrom\space The \space First \space High \space School \space of \space Changsha \space Hunan

一元二次方程求根公式

原方程:

ax2+bx+c=0    (a≠0)\large ax^{2}+bx+c=0\space\space\space\space(a\not=0)

解

x=−b ± b2−4ac 2a\Large x=\huge\frac{-b\space\pm \space \sqrt{b^{2}-4ac\space}}{2a}

推理过程

ax2+bx+c=0\large ax^{2}+bx+c=0

ax2+bx=−c\large ax^{2}+bx=-c

x2+bax=−ca\large x^{2}+\dfrac{b}{a}x=-\dfrac{c}{a}

x2+bax+(b2a)2=−ca+(b2a)2\large x^{2}+\dfrac{b}{a}x+\begin{pmatrix}\dfrac{b}{2a}\end{pmatrix}^{2}=-\dfrac{c}{a}+\begin{pmatrix}\dfrac{b}{2a}\end{pmatrix}^{2}

(x+b2a)2=b2−4ac4a2\large \begin{pmatrix}x+\dfrac{b}{2a}\end{pmatrix} ^{2}=\dfrac{b^{2}-4ac}{4a^{2}}

x+b2a=±b2−4ac4a2 \large x+\dfrac{b}{2a}=\pm\sqrt{\dfrac{b^{2}-4ac}{4a^{2}}\space}

x=−b2a±b2−4ac 2a\large x=-\dfrac{b}{2a}\pm\dfrac{\sqrt{b^{2}-4ac\space}}{2a}

∴x=−b ± b2−4ac 2a\large \therefore x=\dfrac{-b\space\pm \space \sqrt{b^{2}-4ac\space}}{2a}

posted on Sept. 12th, 2022posted\space on \space Sept. \space 12th,\space 2022

Thanks to Baidu Thanks \space to \space Baidu \space 百度

From China From\space China\space

文件小快读(超快的哦)

C++
const int BUF = 80000000;
char Buf[80000000], *buf = Buf;
void read(int &x)
{
  for (x = 0; !std::isdigit(*buf); ++buf) ;
  for (; std::isdigit(*buf); x = (x << 1) + (x << 3) + (*buf ^ 48), ++buf) ;
}
int main()
{
  	freopen("A.in","r",stdin);
  	freopen("A.out","w",stdout);
	fread(buf, 1, BUF, stdin);

	return 0;
}

posted on Sept. 24th, 2022posted\space on \space Sept. \space 24th,\space 2022

Thanks to std Thanks \space to \space std \space

From The First High School of Changsha HunanFrom\space The \space First \space High \space School \space of \space Changsha \space Hunan

PythonPython 除法

a //= b \large a\space//=\space b \space 表示 a 整除 b(向下取整) 。

posted on Sept. 30th, 2022posted\space on \space Sept. \space 30th,\space 2022

Thanks toThanks \space to @jijidawang  & \space \And \space @charleshe

From China From\space China \space 洛谷

乘法公式应用题

x2+y2+2x−4y+5=0x^2+y^2+2x-4y+5=0

x+y= ?x+y=\space?

SolutionSolution

x2+y2+2x−4y+(1+4)=0\large x^2+y^2+2x-4y+(1+4)=0

(x2+2x+1)+(y2−4y+4)=0\large (x^2+2x+1)+(y^2-4y+4)=0

(x+1)2+(y−2)2=0\large (x+1)^2+(y-2)^2=0

又∵(x+1)2≥0, (y−2)2≥0\text又 \because (x+1)^2\ge0,\space(y-2)^2\ge0

∴(x+1)2=(y−2)2=0 → x+1=y−2=0\therefore (x+1)^2=(y-2)^2=0 \space\rightarrow\space x+1=y-2=0

∴x=−1, y=2\therefore x=-1,\space y=2

∴x+y=−1+2=1\therefore x+y=-1+2=1

posted on Oct. 13th, 2022posted\space on \space Oct. \space 13th,\space 2022

Thanks toThanks \space to @lxy07830  & \space \And \space @jijidawang  & \space\And\space @As_Nerve

From China From\space China \space 洛谷

loglog 函数

In C++, there are two functions that look similar but are In\space C++,\space there\space are \space two\space functions\space that\space look\space similar\space but \space are \space

Quite Different.\large Quite \space Different.

They are log()&log2().They \space are\space log() \And log2().

log(n) represents log⁡en, on the other hand, log2(n)=log⁡2n.\large log(n) \space represents \space \log_en,\space on \space the\space other\space hand,\space log2(n)=\log_2n.

posted on Oct. 22th, 2022posted\space on \space Oct. \space 22th,\space 2022

Thanks toThanks \space to @lxy07830

From China From\space China \space 洛谷

原文