AtCoder Beginner Contest 418

文章目錄

    • 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}t?2x?2?, 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}t?2x?2? ,其中 ∣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-1?1 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^61Ai?106 (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)1Bj?min(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-1?1

約束條件

  • 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^61Ai?106 (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)1Bj?min(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=sid?1?+(b?1)×(n?id+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| - 11iS?1.
    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| - 11iS?1 的任意整數 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_iSi?Si+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?,Yi?107 (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?,Yi?107 ( 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 N1Xj?N (1≤j≤Q1 \leq j \leq Q1jQ)
  • ?1≤Yj≤Xj-1 \leq Y_j \leq X_j?1Yj?Xj? (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 N1Xj?N ( 1≤j≤Q1 \leq j \leq Q1jQ )
  • ?1≤Yj≤Xj-1 \leq Y_j \leq X_j?1Yj?Xj? ( 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| - 11iS?1.
    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| - 11iS?1 的任意整數 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_iSi?Si+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;內層函數…