codeforces replace 794g all
Node.js SSE in Action All In One
Node.js SSE in Action All In One
Node.js & Server-sent events
HTTP/2
......
Codeforces Round 905 Div 1 (CF1887)
A1. Dances (Easy version) 把 \(a,b\) 序列都从小到大排序,\(a\) 贪心删大的,\(b\) 贪心删小的,二分答案并 \(O(n)\) \(\text{check}\)。 Code ```cpp const int N=1e5+5; int T,n,m; int a ......
[GAA系列]详解台积电2纳米制程中的全环绕栅极(Gate-All-Around)晶体管技术
Section Ⅰ 半导体技术发展史的本质就是晶体管尺寸的缩小史。从上世纪七十年代的10微米节点开始,遵循着摩尔定律一步一步走到了今天的5纳米。在这一过程中,每当摩尔定律遭遇困境,总会有新的技术及时出现并引领着摩尔定律继续前行。自22纳米节点上被英特尔首次采用,鳍式场效应晶体管(FinFET)在过去 ......
How to use regular expression to match a special meta tag in html string using javascript All In One
How to use regular expression to match a special meta tag in html string using javascript All In One
......
How to fix Fetch API GET request return an opaque response bug All In One
How to fix Fetch API GET request return an opaque response bug All In One Status Code: 302 Found fetch(`https://www.hulu.com/watch/78974b54-1feb-43ce- ......
2023 Q4 特斯拉销售策略分析 All In One
2023 Q4 特斯拉销售策略分析 All In One
预测一波: 特斯拉 买不动了,要降价了 ❓
Tesla Model Y
......
Codeforces Round 887 (Div. 2)
Codeforces Round 887 (Div. 2) A. Desorting 解题思路: 每次操作能使相邻数之差减\(2\),设最小相邻数之差为\(mind\),答案为\(ans = (mind + 1) / 2\)。 代码: #include <bits/stdc++.h> using n ......
Codeforces Round 855 (Div. 3) C. Powering the Hero
有 \(n\) 张卡的卡堆,你可以自顶向下抽卡。装备卡显示数值为 \(a_i(a_i>0)\) ,英雄卡显示数值为 \(a_i = 0\) 。 如果是装备卡,你可以将卡抽出放在装备堆。如果是英雄卡,你可以将装备堆顶端的一张数值为 \(x\) 的装备卡装备给英雄,英雄数值 \(+ x\) 。无论是否装 ......
Codeforces Round 857 (Div. 2) B. Settlement of Guinea Pigs
你非常喜欢豚鼠。每个笼子可以住两只豚鼠,且你不想把每个笼子放入不同性别的豚鼠。豚鼠只有两种性别。假设你买到豚鼠时并不知道性别,只有医生能够分辨。 接下来的 \(n\) 天方案中,若第 \(i\) 天为 \(1\) ,你买入一只豚鼠;若为 \(2\) ,你请医生分辨你的豚鼠性别。 给出方案,你最少需要 ......
Educational Codeforces Round 145 (Rated for Div. 2) B. Points on Plane
给一个二维平面,你需要在上面放 \(n\) 个芯片。将一个芯片放在 \((x, y)\) 的代价为 \(|x| + |y|\) 。放 \(n\) 个代价的代价为,所有芯片中耗费的最大代价。并且你需要保证任意两个芯片之间的距离严格 \(> 1\) 。 现在给出 \(n\) 给芯片,询问放 \(n\) ......
Codeforces Round 875 (Div. 2) C. Copil Copac Draws Trees( DFS )
Codeforces Round 875 (Div. 2) C. Copil Copac Draws Trees 思路: 在输入树的边的同时记录他们的输入顺序 从 1 开始跑 DFS ,遇到未连上的边时 , 有两种情况(用 q 表示当前点的顺序序号) 1.边的顺序在这个点连上之前,那么 DFS 的 ......
Educational Codeforces Round 149 (Rated for Div. 2)
这场D被切穿了。 A题 答案为 x 或者 x-1 1 B题 答案就是最长的连续一段的长度+1 证明的话大概可以将它看成是几段连续上升和下降的段,然后在峰谷、峰顶分别填上最小、最大,剩下的就依次递增或递减就行。 C题 将一段连续的0/1视作一个块,那么我们最小化这个块的数量就行。 D题如果猜到如果有解 ......
Tesla 财报解读 All In One
Tesla 财报解读 All In One
Tesla Investor Relations
特斯拉投资者关系
Cybertruck
Model Y / Model 3
2023 特斯拉 Q3季度财报解读
......
Codeforces Round 863 (Div. 3) B. Conveyor Belts
给一个 \(n \times n\) 的矩阵, \(n\) 是偶数。将矩阵按圈分割,同一圈的位置可以不消耗代价移动,可以消耗一个代价移动到相邻圈。 给出 \(n, x_1, y_1, x_2, y_2\) ,询问 \((x_1, y_1)\) 移动到 \((x_2, y_2)\) 的代价最小是多少。 ......
Codeforces Round 865 (Div. 2) B. Grid Reconstruction
给一个 \(2 \times n\) 的网格,且 \(n\) 是偶数。你需要将 \(1 \sim 2 \times n\) 填入这个网格。 一条路径是从 \((1, 1)\) 开始,每次只能向右或向下,到 \((2, n)\) 结束时,所经过的位置。按经过点的顺序标号,一两条路径的代价是 \(cos ......
Codeforces Round 902 (Div. 2, based on COMPFEST 15 - Final Round)
\(D. Effects of Anti Pimples\) 对每个数字能到达的所有位置先预处理最大值,那么就代表选择这个数字之后真实的贡献,那么对这样的预处理值,最小值显然只有一种做法,为 \(2^0\) ,第二小的值应该可以与最小值一起选择,所以答案为 \(2^1\) ,以此类推之后,每个值乘上 ......
Codeforces 选做
CF878E Numbers on the blackboard 好题。看到这个东西考虑打表一下最后每个点系数,需要一定的眼力才能看出相当于一个除了只有第一个是 1,后面的点每次最多比前面一个乘二的序列。知道结论证明就可以简单归纳了。 然后考虑答案的形态,发现如果我们称每次乘二的一段为连续段,那么对 ......
[921] Replace texts, copy formats, align paragraphs in a Word document by Python
The whole steps of this function are as follows: Open the Word document. Replace the text with the new text. Copy the format from the source cell to t ......
[916] Replace text in a Word document using Python
To replace text in a Word document using Python, you can use the python-docx library, which allows you to work with Microsoft Word files (.docx). If y ......
[917] Replace text in a specific table within a Word document using Python
To replace text in a specific table within a Word document using Python, you can use the python-docx library to access and modify the content of the t ......
Codeforces Round 872 (Div. 2) B. LuoTianyi and the Table
给一个 \(n \times m\) 的矩阵和 \(n \times m\) 个数,你需要把这些数填入矩阵。保证 \[\sum_{i=1}^n \sum_{j=1}^m \left ( \mathop{max}\limits_{1 \leq x \leq i, 1 \leq y \leq j} a_ ......
Codeforces Round 871 (Div. 4) D. Gold Rush
给一个堆 \(n\) 个石子,如果可以分裂为整数,它将分裂为 \(\frac{1}{3} n\) 和 \(\frac{2}{3} n\) 的两堆石子。并且新石堆会继续分裂。 询问过程中是否出现过大小为 \(m\) 的石堆。 显然记忆化 \(dfs\) 即可。 记忆数组一般开全局。容易观察到值域很大, ......
Codeforces Round 875 (Div. 2) B. Array merging
给定两个长为 \(n\) 的数组 \(a\) 和 \(b\) 。你需要将 \(a\) \(b\) 归并成一个数组 \(c\) 。询问所有归并方法中,连续数相同的子段最长为多少。\(1 \leq a_i, b_i \leq 2n\) 。 显然归并在 \(a\) 可以任选一段 \([l_1, r_1]\ ......
Codeforces Round 879 (Div. 2) B. Maximum Strength
定义正整数 \(C = \overline{c_1c_2 \cdots c_k} = c_1 \cdot 10^{k-1} + c_2 \cdot 10^{k - 2} + \cdots + c_1\) 。 假设有两个正整数 \(X = \overline{x_1x_2 \cdots x_n}, Y ......
Educational Codeforces Round 149 (Rated for Div. 2) C. Best Binary String
给一个字符串 \(s\) 包含 \(0, 1, ?\) 。 定义一个 \(01\) 串 \(s\) 的 \(cost\) 为:选择 \(s\) 的任意一个子段 \([l, r]\) 并 \(reverse\) 。将 \(s\) 变为一个非降序序列时的 \(reverse\) 最小次数即 \(cost ......
Hive中的regexp_replace函数
正则表达式替换函数:regexp_replace 语法:regexp_replace(string subject,string pattern,string str) subject为被替换的字符串,pattern为正则表达式,str为替换正则表达式的字符串(将字符串subject中符合正则表达式 ......
Codeforces Round 901 (Div. 2)
Codeforces Round 901 (Div. 2) 比赛链接 "考古"啦!之前没有做,现在补上 A. Jellyfish and Undertale 题目链接 思路: 按理说用模拟应该也是可以做到的,但是我应该没有写好,因为我们要找的是最大时间,所以我们每次加上的是min(a-1,x[i]) ......
TypeScript type predicates All In One
TypeScript type predicates All In One
类型谓词 / 类型断言
Narrowing / 类型收窄
type predicates
......