文章目录

    • A I'm a teapot
    • B You're a teapot
    • C Flush
    • D XNOR Operation
    • E Trapezium
    • F We're teapots
    • G Binary Operation

AtCoder Beginner Contest 418

A I’m a teapot

Takahashi is a teapot.
Since he is a teapot, he will gladly accept tea, but will refuse any other liquid.
Determine whether you can pour a liquid named SSS into him.

You are given a string SSS of length NNN consisting of lowercase English letters.
Determine whether SSS is a string that ends with tea.

Constraints

  • 1≤N≤201 \leq N \leq 201N20
  • NNN is an integer.
  • SSS is a string of length NNN consisting of lowercase English letters.

翻译

高桥是一个茶壶。
既然他是茶壶,他就会欣然接受茶水,而拒绝其他任何液体。
确定能否向它倒入名为 SSS 的液体。

给你一个长度为 NNN 的字符串 SSS ,由小写英文字母组成。
请判断 SSS 是否是以 tea 结尾的字符串。

约束

  • 1≤N≤201 \leq N \leq 201N20
  • NNN 是整数。
  • SSS 是长度为 NNN 的字符串,由小写英文字母组成。

分析:判断字符的结尾是不是 tea 即可。

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6 + 10, INF = 0x3f3f3f3f;void solve() {int n; string s; cin >> n >> s;bool f = (n > 2 && s.substr(n - 3, 3) == "tea");cout << (f ? "Yes" : "No") << "\n";
}
int main() {// freopen("1.in", "r", stdin);int T = 1; while (T--) solve();return 0;
}

B You’re a teapot

I begin with T and end with T, and I am full of T. What am I?

For a string ttt, define the filling rate as follows:

  • If the first and last characters of ttt are both t and ∣t∣≥3|t| \geq 3t3: Let xxx be the number of t in ttt. Then the filling rate of ttt is x−2∣t∣−2\displaystyle\frac{x-2}{|t|-2}t2x2, where ∣t∣|t|t denotes the length of ttt.
  • Otherwise: the filling rate of ttt is 000.

You are given a string SSS. Find the maximum possible filling rate of a substring of SSS.

What is a substring?
A substring of SSS is a string obtained by removing zero or more characters from the beginning and the end of SSS. For example, ab, bc, and bcd are substrings of abcd, while ac, dc, and e are not substrings of abcd.

Constraints

  • 1≤∣S∣≤1001 \leq |S| \leq 1001S100
  • SSS is a string consisting of lowercase English letters.

翻译

我是什么?

对于一个字符串 ttt ,定义填充率如下:

  • 如果 ttt 的第一个字符和最后一个字符都是 "T "和 ∣t∣≥3|t| \geq 3t3 :设 xxxttt 中 "t "的个数。那么 ttt 的填充率为 x−2∣t∣−2\displaystyle\frac{x-2}{|t|-2}t2x2 ,其中 ∣t∣|t|t 表示 ttt 的长度。
  • 否则: ttt 的填充率为 000

给你一个字符串 SSS 。求 SSS 子串的最大填充率。

什么是子串?
SSS子串是指从 SSS 的开头和结尾删除零个或多个字符后得到的字符串。例如,abbcbcdabcd的子串,而acdce不是abcd的子串。

约束

  • 1≤∣S∣≤1001 \leq |S| \leq 1001S100
  • SSS 是一个由小写英文字母组成的字符串。
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6 + 10, INF = 0x3f3f3f3f;void solve() {string s; cin >> s;int x = 0, n = s.size();double ans = 0;for (int i = 0; i < n; i++)for (int j = i + 1; j < n; j++)if (s[i] == 't' && s[j] == 't') {int x = 0, len = j - i + 1;for (int k = i; k <= j; k++)x += (s[k] == 't');ans = max(ans, (x - 2.0) / (len - 2.0));}cout << fixed << setprecision(12) << ans << "\n";
}
int main() {// freopen("1.in", "r", stdin);int T = 1; while (T--) solve();return 0;
}

C Flush

On the poker table, there are tea bags of NNN different flavors. The flavors are numbered from 1 through NNN, and there are AiA_iAi tea bags of flavor iii (1≤i≤N1 \leq i \leq N1iN).

You will play a game using these tea bags. The game has a parameter called difficulty between 1 and A1+⋯+ANA_1 + \cdots + A_NA1++AN, inclusive. A game of difficulty bbb proceeds as follows:

  1. You declare an integer xxx. Here, it must satisfy b≤x≤A1+⋯+ANb \leq x \leq A_1 + \cdots + A_NbxA1++AN.
  2. The dealer chooses exactly xxx tea bags from among those on the table and gives them to you.
  3. You check the flavors of the xxx tea bags you received, and choose bbb tea bags from them.
  4. If all bbb tea bags you chose are of the same flavor, you win. Otherwise, you lose.

The dealer will do their best to make you lose.

You are given QQQ queries, so answer each of them. The jjj-th query is as follows:

  • For a game of difficulty BjB_jBj, report the minimum integer xxx you must declare at the start to guarantee a win. If it is impossible to win, report −1-11 instead.

Constraints

  • 1≤N≤3×1051 \leq N \leq 3 \times 10^51N3×105
  • 1≤Q≤3×1051 \leq Q \leq 3 \times 10^51Q3×105
  • 1≤Ai≤1061 \leq A_i \leq 10^61Ai106 (1≤i≤N1 \leq i \leq N1iN)
  • 1≤Bj≤min⁡(109,A1+⋯+AN)1 \leq B_j \leq \min(10^9, A_1 + \cdots + A_N)1Bjmin(109,A1++AN) (1≤j≤Q1 \leq j \leq Q1jQ)
  • All input values are integers.

翻译:
在扑克桌上,有不同口味的茶包。口味从 111NNN 编号,有 AiA_iAi 个茶包口味 iii1≤i≤N1\leq i\leq N1iN)。
你将用这些茶包玩游戏。游戏有一个名为难度的参数,介于 111a1+⋯+aNa_1+\cdots+a_Na1++aN 之间。难度游戏 bbb 的收益如下:

  1. 声明一个整数 xxx。这里,它必须满足 b≤x≤A1+⋯+ANb\leq x\leq A_1+\cdots+A_NbxA1++AN
  2. 经销商从桌上的茶包中准确地选择 xxx 个茶包,并将其送给您。
  3. 您检查收到的 xxx 个茶包,并从中选择 bbb 个茶包。
  4. 如果你选择的 bbb 个茶包都是相同的味道,你就赢了。否则,你输了。

经销商会尽最大努力让你输。

您会收到 QQQ 的查询,请逐一回答。第 jjj 个查询如下:

  • 对于难度为 BjB_jBj 的游戏,报告您必须在开始时声明的最小整数 xxx,以确保获胜。如果不可能获胜,则报告 −1-11

约束条件

  • 1≤N≤3×1051 \leq N \leq 3 \times 10^51N3×105
  • 1≤Q≤3×1051 \leq Q \leq 3 \times 10^51Q3×105
  • 1≤Ai≤1061 \leq A_i \leq 10^61Ai106 (1≤i≤N1 \leq i \leq N1iN)
  • 1≤Bj≤min⁡(109,A1+⋯+AN)1 \leq B_j \leq \min(10^9, A_1 + \cdots + A_N)1Bjmin(109,A1++AN) (1≤j≤Q1 \leq j \leq Q1jQ)
  • 所有输入值都是整数。

分析:

本题目要模拟样例,找到题目所求:当相同元素的数量至少为 bbb 的需要最少有解数量 xxx

解法:考虑对原数组 aia_iai 排序,求出前缀和 sis_isi,二分查询第一个≥b\ge bb 的元素位置 ididid,如果答案存在,则 ans=sid−1+(b−1)×(n−id+1)+1ans=s_{id-1} + (b-1) \times (n-id+1) +1ans=sid1+(b1)×(nid+1)+1;否则 ans=−1ans=-1ans=1

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e6 + 10, INF = 0x3f3f3f3f;
int n, q, a[N], b;
ll s[N];void solve() {cin >> n >> q;for (int i = 1; i <= n; i++) cin >> a[i];sort(a + 1, a + 1 + n);for (int i = 1; i <= n; i++) s[i] = s[i - 1] + a[i];while (q--) {cin >> b;int id = lower_bound(a + 1, a + 1 + n, b) - a;ll ans = -1;if (id <= n && a[id] >= b)ans = s[id - 1] + 1ll * (b - 1) * (n - id + 1) + 1;cout << ans << "\n";}
}
int main() {// freopen("1.in", "r", stdin);int T = 1; while (T--) solve();return 0;
}

D XNOR Operation

This problem is a subproblem of Problem G.

A non-empty string SSS consisting of 0 and 1 is called a beautiful string when it satisfies the following condition:

  • (Condition) You can perform the following sequence of operations until the length of SSS becomes 111 and make the only character remaining in SSS be 1.
    1. Choose any integer iii satisfying 1≤i≤∣S∣−11 \leq i \leq |S| - 11iS1.
    2. Define an integer xxx as follows:
      • If Si=S_i =Si= 0 and Si+1=S_{i+1} =Si+1= 0, let x=1x = 1x=1.
      • If Si=S_i =Si= 0 and Si+1=S_{i+1} =Si+1= 1, let x=0x = 0x=0.
      • If Si=S_i =Si= 1 and Si+1=S_{i+1} =Si+1= 0, let x=0x = 0x=0.
      • If Si=S_i =Si= 1 and Si+1=S_{i+1} =Si+1= 1, let x=1x = 1x=1.
    3. Remove SiS_iSi and Si+1S_{i+1}Si+1, and insert the digit corresponding to xxx in their place.
      For example, if S=S=S= 10101 and you choose i=2i=2i=2, the string after the operation is 1001.

You are given a string TTT of length NNN consisting of 0 and 1.
Find the number of beautiful strings that are substrings of TTT. Even if two substrings are identical as strings, count them separately if they are taken from different positions.

What are substrings? A substring of SSS is a string obtained by deleting zero or more characters from the beginning and zero or more characters from the end of SSS.
For example, 10 is a substring of 101, but 11 is not a substring of 101.

Constraints

  • 1≤N≤2×1051 \leq N \leq 2 \times 10^51N2×105
  • NNN is an integer.
  • TTT is a string of length NNN consisting of 0 and 1.

翻译:

本问题是问题 G 的子问题。

01 组成的非空字符串 SSS 满足以下条件时,称为优美字符串:

  • 条件)你可以执行以下一系列操作,直到 SSS 的长度变为 111 ,并使 SSS 中唯一剩下的字符是 1
    1. 选择满足 1≤i≤∣S∣−11 \leq i \leq |S| - 11iS1 的任意整数 iii
    2. 定义整数 xxx 如下:
      • 如果 Si=S_i =Si= 0 且 {98421818}0和 $S_{i+1} =$ 0,设 x=1x = 1x=1 .
      • Si=S_i =Si= 0 且 {56774510} 0, 则设 x=1x = 1x=1 .0和 $S_{i+1} =$ 1,则 x=0x = 0x=0 .
      • Si=S_i =Si= 1,且 Si+1=S_{i+1} =Si+1= 0,则让 {12243413}.0",则 x=0x = 0x=0 .
      • 如果 Si=S_i =Si= 1 和 {1848987} 0, 让 {297737}.1且 $S_{i+1} =$ 1`,则设 x=1x = 1x=1
    3. 删除 SiS_iSiSi+1S_{i+1}Si+1 ,并插入与 xxx 相对应的数字。
      例如,如果 S=S=S= 10101",而您选择了 i=2i=2i=2 ,则操作后的字符串为 “1001”。

给定长度为 NNN 的字符串 TTT01 组成。
求作为 TTT 的子串的美丽字符串的个数。即使两个子串是相同的字符串,如果它们取自不同的位置,也要分别计算。

什么是子串? SSS子串是删除 SSS 开头的零个或多个字符和结尾的零个或多个字符后得到的字符串。
例如,10101的子串,但11不是101的子串。

约束

  • 1≤N≤2×1051 \leq N \leq 2 \times 10^51N2×105
  • NNN 是整数。
  • TTT 是长度为 NNN 的字符串,由 01 组成。

分析:

E Trapezium

There are NNN points on a two-dimensional plane, with the iii-th point at coordinates (Xi,Yi)(X_i, Y_i)(Xi,Yi). It is guaranteed that no two points are at the same position, and no three points are collinear.

Among the combinations of four points from these points, how many combinations can form a trapezoid as a polygon with those four points as vertices?

Constraints

  • 4≤N≤20004 \leq N \leq 2\,0004N2000
  • 0≤Xi,Yi≤1070 \leq X_i, Y_i \leq 10^70Xi,Yi107 (1≤i≤N1 \leq i \leq N1iN)
  • No two points are at the same location.
  • No three points are collinear.
  • All input values are integers.

翻译:
在一个二维平面上有 NNN 个点,其中第 iii 个点的坐标为 (Xi,Yi)(X_i, Y_i)(Xi,Yi) 。保证没有两个点在同一位置,也没有三个点是共线的。

在这些点的四点组合中,以这四点为顶点能组成梯形多边形的组合有多少种?

约束

  • 4≤N≤20004 \leq N \leq 2\,0004N2000
  • 0≤Xi,Yi≤1070 \leq X_i, Y_i \leq 10^70Xi,Yi107 ( 1≤i≤N1 \leq i \leq N1iN )
  • 没有两个点在同一位置。
  • 没有三个点是相邻的。
  • 所有输入值均为整数。

分析:

F We’re teapots

There are NNN teapots arranged in a row, numbered from 111 to NNN from left to right.

There is a sequence of integers (a1,…,aN)(a_1, \dots, a_N)(a1,,aN), initially with values a1=⋯=aN=−1a_1 = \dots = a_N = -1a1==aN=1.

You will fill each teapot with either tea or coffee so that the following conditions are all satisfied:

  • For any two adjacent teapots, at least one of them contains tea.
  • For any integer iii satisfying 1≤i≤N1 \leq i \leq N1iN, if ai≠−1a_i \neq -1ai=1, then exactly aia_iai of teapots 1,…,i1, \dots, i1,,i contain coffee.

You are given QQQ queries, which you should process in the given order.

The jjj-th query (1≤j≤Q1 \leq j \leq Q1jQ) is as follows:

  • Change the value of aXja_{X_j}aXj to YjY_jYj. Then, print the number, modulo 998244353998244353998244353, of ways to fill the teapots satisfying the conditions.

Constraints

  • 2≤N≤2×1052 \leq N \leq 2 \times 10^52N2×105
  • 1≤Q≤2×1051 \leq Q \leq 2 \times 10^51Q2×105
  • 1≤Xj≤N1 \leq X_j \leq N1XjN (1≤j≤Q1 \leq j \leq Q1jQ)
  • −1≤Yj≤Xj-1 \leq Y_j \leq X_j1YjXj (1≤j≤Q1 \leq j \leq Q1jQ)
  • All input values are integers.

翻译

NNN 个茶壶排成一排,从左到右依次编号为 111NNN

有一串整数 (a1,…,aN)(a_1, \dots, a_N)(a1,,aN) ,最初的值为 a1=⋯=aN=−1a_1 = \dots = a_N = -1a1==aN=1

你要在每个茶壶中注入茶或咖啡,以满足以下所有条件:

  • 对于任意两个相邻的茶壶,其中至少有一个装有茶叶。
  • 对于满足 1≤i≤N1 \leq i \leq N1iN 的任意整数 iii ,如果有 ai≠−1a_i \neq -1ai=1 ,那么在 1,…,i1, \dots, i1,,i 的茶壶中,正好有 aia_iai 个茶壶装有咖啡。

给你 QQQ 个查询,你应按给定的顺序处理这些查询。

jjj -th 查询( 1≤j≤Q1 \leq j \leq Q1jQ )如下:

  • aXja_{X_j}aXj 的值改为 YjY_jYj 。然后,打印出满足条件的茶壶的装水方式的数量,模数为 998244353998244353998244353

限制因素

  • 2≤N≤2×1052 \leq N \leq 2 \times 10^52N2×105
  • 1≤Q≤2×1051 \leq Q \leq 2 \times 10^51Q2×105
  • 1≤Xj≤N1 \leq X_j \leq N1XjN ( 1≤j≤Q1 \leq j \leq Q1jQ )
  • −1≤Yj≤Xj-1 \leq Y_j \leq X_j1YjXj ( 1≤j≤Q1 \leq j \leq Q1jQ )
  • 所有输入值均为整数。

分析:

G Binary Operation

There are 161616 integer tuples (A,B,C,D)(A, B, C, D)(A,B,C,D) satisfying A,B,C,D∈{0,1}A, B, C, D \in \lbrace 0, 1 \rbraceA,B,C,D{0,1}. For each of them, solve the following problem.

A non-empty string SSS consisting of 0 and 1 is called a beautiful string when it satisfies the following condition:

  • (Condition) You can perform the following sequence of operations until the length of SSS becomes 111 and make the only character remaining in SSS be 1.
    1. Choose any integer iii satisfying 1≤i≤∣S∣−11 \leq i \leq |S| - 11iS1.
    2. Define an integer xxx as follows:
      • If Si=S_i =Si= 0 and Si+1=S_{i+1} =Si+1= 0, let x=Ax = Ax=A.
      • If Si=S_i =Si= 0 and Si+1=S_{i+1} =Si+1= 1, let x=Bx = Bx=B.
      • If Si=S_i =Si= 1 and Si+1=S_{i+1} =Si+1= 0, let x=Cx = Cx=C.
      • If Si=S_i =Si= 1 and Si+1=S_{i+1} =Si+1= 1, let x=Dx = Dx=D.
    3. Remove SiS_iSi and Si+1S_{i+1}Si+1, and insert the digit corresponding to xxx in their place.
      For example, if S=S=S= 10101 and you choose i=2i=2i=2, the string after the operation is 1001 if B=0B=0B=0, and 1101 if B=1B=1B=1.

You are given a string TTT of length NNN consisting of 0 and 1.

  • Let LLL be the length of the longest beautiful string that is a substring of TTT (if no substring of TTT is a beautiful string, let L=−1L = -1L=1),
  • Let MMM be the number of beautiful strings that are substrings of TTT.

Find LLL and MMM. Even if two substrings are identical as strings, count them separately if they are taken from different positions.

What are substrings?
A substring of SSS is a string obtained by deleting zero or more characters from the beginning and zero or more characters from the end of SSS.
For example, 10 is a substring of 101, but 11 is not a substring of 101.

Constraints

  • 1≤N≤2×1051 \leq N \leq 2 \times 10^51N2×105
  • NNN is an integer.
  • TTT is a string of length NNN consisting of 0 and 1.

翻译

161616 个整数元组 (A,B,C,D)(A, B, C, D)(A,B,C,D) 满足 A,B,C,D∈{0,1}A, B, C, D \in \lbrace 0, 1 \rbraceA,B,C,D{0,1} 。请分别求解下列问题。

由 "0 "和 "1 "组成的非空字符串 SSS 满足以下条件时,称为优美字符串:

  • (条件)你可以执行下面的操作序列,直到 SSS 的长度变为 111 ,并使 SSS 中唯一剩下的字符是 1
  1. 选择满足 1≤i≤∣S∣−11 \leq i \leq |S| - 11iS1 的任意整数 iii
  2. 定义整数 xxx 如下:
  • 如果 Si=S_i =Si= 0 和 {53892861} 0 。0和 $S_{i+1} =$ 0,则设 x=Ax = Ax=A .
  • 如果 Si=S_i =Si= 0 且 {346645525} 0, 则让 x=Ax = Ax=A .0 "和 Si+1=S_{i+1} =Si+1= “1”,设为 x=Bx = Bx=B
  • 如果 Si=S_i =Si= 1 和 {3676760} 1,令 x=Bx = Bx=B .1 “和 Si+1=S_{i+1} =Si+1= 0”,则 x=Cx = Cx=C .
  • 如果 Si=S_i =Si= 1和 {66227549} 0,让 x=Cx = Cx=C .1和 $S_{i+1} =$ 1.如果 $S_i =$ 1和 $S_{i+1} =$1`, 则让 x=Dx = Dx=D .
  1. 删除 SiS_iSiSi+1S_{i+1}Si+1 ,并插入与 xxx 相对应的数字。
    例如,如果 S=S=S= 10101",并选择 i=2i=2i=2 ,则操作后的字符串如果是 B=0B=0B=0 则为 “1001”,如果是 B=1B=1B=1 则为 “1101”。

给出长度为 NNN 的字符串 TTT ,它由 01 组成。

  • LLL 是长度为 TTT 的子串的最长优美字符串(如果 TTT 的子串都不是优美字符串,则设为 L=−1L = -1L=1 )、
  • MMM 是作为 TTT 子串的优美字符串的个数。

找出 LLLMMM 。即使两个子串是相同的字符串,如果它们取自不同的位置,也要分别计算。

什么是子串?
SSS子串是删除 SSS 开头的零个或多个字符和结尾的零个或多个字符后得到的字符串。
例如,10101的子串,但11不是101的子串。

约束

  • 1≤N≤2×1051 \leq N \leq 2 \times 10^51N2×105
  • NNN 是整数。
  • TTT 是长度为 NNN 的字符串,由 01 组成。
    分析:

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/news/918267.shtml
繁体地址,请注明出处:http://hk.pswp.cn/news/918267.shtml
英文地址,请注明出处:http://en.pswp.cn/news/918267.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

多级缓存详解

多级缓存 传统缓存&#xff1a; 传统缓存策略一般是请求到达Tomcat后&#xff0c;先查询Redis&#xff0c;如果未命中则查询数据库。 这种模式下请求一定要经过Tomcat处理&#xff0c;Tomcat的性能就成为了整个系统的瓶颈&#xff1b;并且Redis的缓存也有过期时间&#xff0c;一…

接口自动化-JSON Schema

目录 1.介绍 2.安装 3.使用 3.1type关键字 3.2最大值最小值 3.2.1minimum 、 maximum 3.2.2 exclusiveMinimum 、exclusiveMaximum 3.3字符串特殊校验 3.4数据约束 3.5对象约束 3.6必须属性 3.7依赖关系 4.总结 1.介绍 JSON Schema 是一个用来定义和校验 JSON 的…

前端技术架构设计文档(Vue2+Antd+Sass)

前端技术架构设计文档&#xff08;Vue2AntdSass&#xff09; 文档信息项目名称前端系统&#xff08;基于 Vue2 技术栈&#xff09;技术栈核心Vue2 Ant Design Vue Sass版本号V1.0.0技术栈核心Vue2 Ant Design Vue Sass编制日期2025-08-071. 技术栈选型 1.1 核心技术框架类别…

【设计模式】抽象工厂模式 (工具(Kit)模式)

抽象工厂模式&#xff08;Abstract Factory Pattern&#xff09;详解一、抽象工厂模式简介 抽象工厂模式&#xff08;Abstract Factory Pattern&#xff09; 是一种 创建型设计模式&#xff08;对象创建型模式&#xff09;&#xff0c;它提供了一种创建一系列相关或相互依赖对象…

Android初学者系统开发学习路线参考

Android初学者系统开发学习路线参考 文章目录Android初学者系统开发学习路线参考一、前言二、Android初学的学习计划第一阶段&#xff08;一个月&#xff09;UI相关学习&#xff1a;开发环境与 UI 基础&#xff0c;第一周&#xff1a;UI 控件与布局进阶&#xff0c;第二周&…

扩散LLM推理新范式:打破生成长度限制,实现动态自适应调节

随着 Gemini-Diffusion&#xff0c;Seed-Diffusion 等扩散大语言模型&#xff08;DLLM&#xff09;的发布&#xff0c;这一领域成为了工业界和学术界的热门方向。但是&#xff0c;当前 DLLM 存在着在推理时必须采用预设固定长度的限制&#xff0c;对于不同任务都需要专门调整才…

【ee类保研面试】其他类---计算机网络

25保研er&#xff0c;希望将自己的面试复习分享出来&#xff0c;供大家参考 part0—英语类 part1—通信类 part2—信号类 part3—高数类 part100—self项目准备 文章目录计算机网络知识点大全**计算机网络知识点总结**一、五层协议模型二、OSI七层模型补充三、TCP 与 UDP 及区别…

Python-机器学习(一)——特征工程

目录 特征工程 一、特征提取 1、字典特征提取 2、文本特征提取 2.1 英文文本提取 2.2 中文文本提取 3、TF-IDF文本特征词的重要程度特征提取 二、无量纲化-预处理 1 MinMaxScaler 归一化 2 normalize归一化 3 StandardScaler 标准化 三、特征降维 1、特征选择 1.…

谈谈SQL计算存储引擎中的索引和计算

背景 最近在这家公司做了一些事情&#xff0c;做的事情和以往的工作不太一样&#xff0c;不一样的点呢就是 之前我主要的工作是关注计算这方面&#xff0c;因为数据量大&#xff0c;研究的是怎么加速查询&#xff0c;怎么研究规则去优化&#xff0c;怎么去解规则的bug等等。因为…

vscode.window.activeTextEditor 获取不到 png 图片路径问题

vscode 的 extensions 插件开发时用 vscode.window.activeTextEditor?.document.uri 获取不到编辑器打开的图片路径&#xff0c;文档路径可以获取到。个人猜测因为图片不能编辑&#xff0c;所以没有 activeTextEditor 属性吧。解决办法&#xff1a;巧用右键获取路径和相对的路…

Java 大视界 -- Java 大数据在智能医疗手术机器人操作数据记录与性能评估中的应用(390)

Java 大视界 -- Java 大数据在智能医疗手术机器人操作数据记录与性能评估中的应用&#xff08;390&#xff09;引言&#xff1a;正文&#xff1a;一、传统手术机器人的 “黑箱困境”&#xff1a;记不全、算不清、追不到1.1 设备与临床的 “断层”1.1.1 数据记录 “太粗放”1.1.…

C++的结构体指针

结构体变量和结构体指针的区别特性结构体变量结构体指针存储内容结构体的实际数据内存地址内存开销结构体总大小固定4/8字节&#xff08;指针大小&#xff09;成员访问运算符.->函数传参时的行为值拷贝&#xff08;新副本&#xff09;地址传递&#xff08;操作原数据&#x…

pdf文件转word免费使用几个工具

在线工具&#xff08;无需安装&#xff09; Smallpdf ✅ 核心功能&#xff1a; 网页端直接操作&#xff0c;支持 PDF 与 Word 格式互转 免费用户每日限 2 次转换&#xff08;免注册&#xff09; 自动清除服务器文件&#xff0c;确保隐私安全 &#x1f517; 访问链接&#xff1a…

Vue3 组件化开发

文章目录前言组件化开发底部菜单 TabMenu父子组件相互传数据父传子&#xff1a;自定义属性子传父&#xff1a;自定义事件父子组件互传案例插槽 slot多个插槽总结组件化开发总结Vue组件的基本组成子组件使用的三个步骤父子组件相互传递数据前言 提示&#xff1a;这里可以添加本…

服务器硬件电路设计之I2C问答(二):I2C总线的传输速率与上拉电阻有什么关系?

I2C 总线传输速率与上拉电阻关系密切。上拉电阻阻值决定总线电平切换速度&#xff1a;电阻越小&#xff0c;充放电电流越大&#xff0c;信号边沿更陡&#xff0c;支持更高速率&#xff08;如 400kHz 快速模式&#xff09;&#xff1b;电阻过大则切换慢&#xff0c;限制速率&…

大语言模型提示工程与应用:LLMs文本生成与数据标注实践

提示词应用实践 学习目标 本课程通过LLMs生成情感分析样本和标注葡萄9品鉴数据&#xff0c;展示了其文本生成和数据标注能力。同时&#xff0c;利用PAL模型解决日期计算问题&#xff0c;学习了LLMs与编程运行时结合实现复杂推理的方法&#xff0c;为自然语言处理应用提供了实…

node.js 零基础入门

Node.js 零 基础入门与核心语法 适用对象&#xff1a;完全没接触过 Node.js 的同学 目标&#xff1a;从 0 到能写 CLI、小型 HTTP 服务、文件脚本、调用系统/网络资源 目录 什么是 Node.js安装与运行运行脚本与 REPL模块体系&#xff1a;CommonJS 与 ES Modules基础语法在 Node…

《Day3-PyTorch 自动微分入门:从计算图到梯度下降的实践指南》

八、自动微分自动微分模块torch.autograd负责自动计算张量操作的梯度&#xff0c;具有自动求导功能。自动微分模块是构成神经网络训练的必要模块&#xff0c;可以实现网络权重参数的更新&#xff0c;使得反向传播算法的实现变得简单而高效。1. 基础概念张量Torch中一切皆为张量…

apache cgi测试

test.cgi #!/bin/sh echo "Content-type: text/html" echo "" echo "<h1>Hello from a Mac CGI script!</h1>" echo "<p>Current time is: $(date)</p>"ƒ% 放置目录 /opt/homebrew/Cellar/mapserver/8.4.0_1…

力扣 30 天 JavaScript 挑战 第二题笔记

这道题是涉及知识–闭包 1. 闭包定义以及相关知识点 官方定义为&#xff1a;在 JavaScript 中&#xff0c;函数具有对在相同作用域以及任何外部作用域中声明的所有变量的引用。这些作用域被称为函数的 词法环境。函数与其环境的组合被称为 闭包。 简单理解&#xff1a;内层函数…