Codeforces Round 976 (Div. 2 ABCDE题)视频讲解

news2024/11/19 5:39:22

A. Find Minimum Operations

Problem Statement

You are given two integers n n n and k k k.

In one operation, you can subtract any power of k k k from n n n. Formally, in one operation, you can replace n n n by ( n − k x ) (n-k^x) (nkx) for any non-negative integer x x x.

Find the minimum number of operations required to make n n n equal to 0 0 0.

Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 1 0 4 1 \le t \le 10^4 1t104). The description of the test cases follows.

The only line of each test case contains two integers n n n and k k k ( 1 ≤ n , k ≤ 1 0 9 1 \le n, k \le 10^9 1n,k109).

Output

For each test case, output the minimum number of operations on a new line.

Example

input
6
5 2
3 5
16 4
100 3
6492 10
10 1
output
2
3
1
4
21
10

Note

In the first test case, you can choose a = 1 a = 1 a=1, b = 2 b = 2 b=2, c = 3 c = 3 c=3 in the only operation, since gcd ⁡ ( 1 , 2 ) = gcd ⁡ ( 2 , 3 ) = gcd ⁡ ( 1 , 3 ) = 1 \gcd(1, 2) = \gcd(2, 3) = \gcd(1, 3) = 1 gcd(1,2)=gcd(2,3)=gcd(1,3)=1, and then there are no more integers in the set, so no more operations can be performed.

In the second test case, you can choose a = 3 a = 3 a=3, b = 5 b = 5 b=5, c = 7 c = 7 c=7 in the only operation.

In the third test case, you can choose a = 11 a = 11 a=11, b = 19 b = 19 b=19, c = 20 c = 20 c=20 in the first operation, a = 13 a = 13 a=13, b = 14 b = 14 b=14, c = 15 c = 15 c=15 in the second operation, and a = 10 a = 10 a=10, b = 17 b = 17 b=17, c = 21 c = 21 c=21 in the third operation. After the three operations, the set s s s contains the following integers: 12 12 12, 16 16 16, 18 18 18. It can be proven that it’s impossible to perform more than 3 3 3 operations.

Solution

具体见文后视频。


Code

#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second

using namespace std;

void solve() {
	int n, k;
	cin >> n >> k;
	
	if (k == 1) {
		cout << n << endl;
		return;
	}
	int cnt = 0, s = n, mul = 1, res = 0;
	while (s) s /= k, cnt ++, mul *= k;
	for (int i = cnt; i >= 0; i --)
		res += n / mul, n %= mul, mul /= k;
	
	cout << res << endl;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);
    
    int dt;
    cin >> dt;
    while (dt -- ) solve();

	return 0;
}

B. Brightness Begins

Problem Statement

Imagine you have n n n light bulbs numbered 1 , 2 , … , n 1, 2, \ldots, n 1,2,,n. Initially, all bulbs are on. To flip the state of a bulb means to turn it off if it used to be on, and to turn it on otherwise.

Next, you do the following:

  • for each i = 1 , 2 , … , n i = 1, 2, \ldots, n i=1,2,,n, flip the state of all bulbs j j j such that j j j is divisible by i † i^\dagger i.

After performing all operations, there will be several bulbs that are still on. Your goal is to make this number exactly k k k.

Find the smallest suitable n n n such that after performing the operations there will be exactly k k k bulbs on. We can show that an answer always exists.

† ^\dagger An integer x x x is divisible by y y y if there exists an integer z z z such that x = y ⋅ z x = y\cdot z x=yz.

Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 1 0 4 1 \le t \le 10^4 1t104). The description of the test cases follows.

The only line of each test case contains a single integer k k k ( 1 ≤ k ≤ 1 0 18 1 \le k \le 10^{18} 1k1018).

Output

For each test case, output n n n — the minimum number of bulbs.

Example

input
3
1
3
8
output
2
5
11

Note

In the first test case, the minimum number of bulbs is 2 2 2. Let’s denote the state of all bulbs with an array, where 1 1 1 corresponds to a turned on bulb, and 0 0 0 corresponds to a turned off bulb. Initially, the array is [ 1 , 1 ] [1, 1] [1,1].

  • After performing the operation with i = 1 i = 1 i=1, the array becomes [ 0 ‾ , 0 ‾ ] [\underline{0}, \underline{0}] [0,0].
  • After performing the operation with i = 2 i = 2 i=2, the array becomes [ 0 , 1 ‾ ] [0, \underline{1}] [0,1].

In the end, there are k = 1 k = 1 k=1 bulbs on. We can also show that the answer cannot be less than 2 2 2.

In the second test case, the minimum number of bulbs is 5 5 5. Initially, the array is [ 1 , 1 , 1 , 1 , 1 ] [1, 1, 1, 1, 1] [1,1,1,1,1].

  • After performing the operation with i = 1 i = 1 i=1, the array becomes [ 0 ‾ , 0 ‾ , 0 ‾ , 0 ‾ , 0 ‾ ] [\underline{0}, \underline{0}, \underline{0}, \underline{0}, \underline{0}] [0,0,0,0,0].
  • After performing the operation with i = 2 i = 2 i=2, the array becomes [ 0 , 1 ‾ , 0 , 1 ‾ , 0 ] [0, \underline{1}, 0, \underline{1}, 0] [0,1,0,1,0].
  • After performing the operation with i = 3 i = 3 i=3, the array becomes [ 0 , 1 , 1 ‾ , 1 , 0 ] [0, 1, \underline{1}, 1, 0] [0,1,1,1,0].
  • After performing the operation with i = 4 i = 4 i=4, the array becomes [ 0 , 1 , 1 , 0 ‾ , 0 ] [0, 1, 1, \underline{0}, 0] [0,1,1,0,0].
  • After performing the operation with i = 5 i = 5 i=5, the array becomes [ 0 , 1 , 1 , 0 , 1 ‾ ] [0, 1, 1, 0, \underline{1}] [0,1,1,0,1].

In the end, there are k = 3 k = 3 k=3 bulbs on. We can also show that the answer cannot be smaller than 5 5 5.

Solution

具体见文后视频。


Code

#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second

using namespace std;

void solve() {
	int n;
	cin >> n;
	
	int lo = 1, ro = 9e18, res;
	while (lo <= ro) {
		int mid = lo + ro >> 1;
		auto sq = [](int x) -> int {
			int lo = 1, ro = 3e9, res;
			while (lo <= ro) {
				int mid = lo + ro >> 1;
				if (mid * mid <= x) lo = mid + 1, res = mid;
				else ro = mid - 1;
			}
			return res;
		};
		if (mid - (int)sq(mid) >= n) ro = mid - 1, res = mid;
		else lo = mid + 1;
	}
	
	cout << res << endl;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);
    
    int dt;
    cin >> dt;
    while (dt -- ) solve();

	return 0;
}

C. Bitwise Balancing

Problem Statement

You are given three non-negative integers b b b, c c c, and d d d.

Please find a non-negative integer a ∈ [ 0 , 2 61 ] a \in [0, 2^{61}] a[0,261] such that ( a   ∣   b ) − ( a   &   c ) = d (a\, |\, b)-(a\, \&\, c)=d (ab)(a&c)=d, where ∣ | and & \& & denote the bitwise OR operation and the bitwise AND operation, respectively.

If such an a a a exists, print its value. If there is no solution, print a single integer − 1 -1 1. If there are multiple solutions, print any of them.

Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 1 0 5 1 \le t \le 10^5 1t105). The description of the test cases follows.

The only line of each test case contains three positive integers b b b, c c c, and d d d ( 0 ≤ b , c , d ≤ 1 0 18 0 \le b, c, d \le 10^{18} 0b,c,d1018).

Output

For each test case, output the value of a a a, or − 1 -1 1 if there is no solution. Please note that a a a must be non-negative and cannot exceed 2 61 2^{61} 261.

Example

input
3
2 2 2
4 2 6
10 2 14
output
0
-1
12

Note

In the first test case, we can increase c 1 = 1 c_1 = 1 c1=1 by a = 5 a = 5 a=5. The array c c c will become [ 6 , 3 , 4 , 4 ] [6, 3, 4, 4] [6,3,4,4], and the range is 3 3 3. Note that there is more than one way to reach the answer.

In the second test case, we can increase c 1 = 1 c_1 = 1 c1=1 by a = 2 a = 2 a=2 and then increase c 1 = 3 c_1 = 3 c1=3 by b = 3 b = 3 b=3. Also, we can increase c 2 = 3 c_2 = 3 c2=3 by b = 3 b = 3 b=3 and increase c 3 = 4 c_3 = 4 c3=4 by a = 2 a = 2 a=2. The array c c c will become [ 6 , 6 , 6 , 6 ] [6, 6, 6, 6] [6,6,6,6], and the range is 0 0 0.

Solution

具体见文后视频。


Code

#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second

using namespace std;

void solve() {
	int a = 0, b, c, d;
	cin >> b >> c >> d;
	
	for (int i = 0; i <= 61; i ++)
		if ((b >> i & 1) == (d >> i & 1)) ;
		else if (1 - (c >> i & 1) == (d >> i & 1)) a |= (1ll << i);
		else {
			cout << -1 << endl;
			return;
		}
	cout << a << endl;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);
    
    int dt;
    cin >> dt;
    while (dt -- ) solve();

	return 0;
}

D. Connect the Dots

Problem Statement

Iris has a tree rooted at vertex 1 1 1. Each vertex has a value of 0 \mathtt 0 0 or 1 \mathtt 1 1.

Let’s consider a leaf of the tree (the vertex 1 1 1 is never considered a leaf) and define its weight. Construct a string formed by the values of the vertices on the path starting at the root and ending in this leaf. Then the weight of the leaf is the difference between the number of occurrences of 10 \mathtt{10} 10 and 01 \mathtt{01} 01 substrings in it.

Take the following tree as an example. Green vertices have a value of 1 \mathtt 1 1 while white vertices have a value of 0 \mathtt 0 0.

Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 1 0 5 1 \le t \le 10^5 1t105). The description of the test cases follows.

The first line of each test case contains two integers n n n and m m m ( 1 ≤ n ≤ 2 ⋅ 1 0 5 1 \le n \le 2 \cdot 10^5 1n2105, 1 ≤ m ≤ 2 ⋅ 1 0 5 1 \le m \le 2 \cdot 10^5 1m2105).

The i i i-th of the following m m m lines contains three integers a i a_i ai, d i d_i di, and k i k_i ki ( 1 ≤ a i ≤ a i + k i ⋅ d i ≤ n 1 \le a_i \le a_i + k_i\cdot d_i \le n 1aiai+kidin, 1 ≤ d i ≤ 10 1 \le d_i \le 10 1di10, 0 ≤ k i ≤ n 0 \le k_i \le n 0kin).

It is guaranteed that both the sum of n n n and the sum of m m m over all test cases do not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105.

Output

For each test case, output the number of connected components.

Example

input
3
10 2
1 2 4
2 2 4
100 1
19 2 4
100 3
1 2 5
7 2 6
17 2 31
output
2
96
61

Note

In the first test case, there are n = 10 n = 10 n=10 points. The first operation joins the points 1 1 1, 3 3 3, 5 5 5, 7 7 7, and 9 9 9. The second operation joins the points 2 2 2, 4 4 4, 6 6 6, 8 8 8, and 10 10 10. There are thus two connected components: { 1 , 3 , 5 , 7 , 9 } \{1, 3, 5, 7, 9\} {1,3,5,7,9} and { 2 , 4 , 6 , 8 , 10 } \{2, 4, 6, 8, 10\} {2,4,6,8,10}.

In the second test case, there are n = 100 n = 100 n=100 points. The only operation joins the points 19 19 19, 21 21 21, 23 23 23, 25 25 25, and 27 27 27. Now all of them form a single connected component of size 5 5 5. The other 95 95 95 points form single-point connected components. Thus, the answer is 1 + 95 = 96 1 + 95 = 96 1+95=96.

In the third test case, there are n = 100 n = 100 n=100 points. After the operations, all odd points from 1 1 1 to 79 79 79 will be in one connected component of size 40 40 40. The other 60 60 60 points form single-point connected components. Thus, the answer is 1 + 60 = 61 1 + 60 = 61 1+60=61.

Solution

具体见文后视频。

Code

#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second

using namespace std;
typedef pair<int, int> PII;

void solve() {
	int n, m;
	cin >> n >> m;
	
	int con = n;
	vector<int> p(n + 1);
	vector<vector<int>> to(11, vector<int>(n + 1));
	for (int i = 1; i <= n; i ++) {
		p[i] = i;
		for (int j = 1; j <= 10; j ++) to[j][i] = i;
	}
	
	auto merge = [&con](vector<int> &p, int u, int v, int op) -> void {
		auto find = [&](auto self, int x) -> int {
			if (p[x] != x) p[x] = self(self, p[x]);
			return p[x];
		};
		int pu = find(find, u), pv = find(find, v);
		if (pu != pv) p[pu] = pv, con -= op;
	};
	while (m -- ) {
		int a, d, k;
		cin >> a >> d >> k;
		
		int x = to[d][a];
		while (x + d <= a + k * d) {
			merge(p, x, x + d, 1), merge(to[d], x, x + d, 0);
			x = to[d][x];
		}
	}
	
	cout << con << endl;
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);
    
    int dt;
    cin >> dt;
    while (dt -- ) solve();

	return 0;
}

E. Expected Power

Problem Statement

You are given an array of n n n integers a 1 , a 2 , … , a n a_1,a_2,\ldots,a_n a1,a2,,an. You are also given an array p 1 , p 2 , … , p n p_1, p_2, \ldots, p_n p1,p2,,pn.

Let S S S denote the random multiset (i. e., it may contain equal elements) constructed as follows:

  • Initially, S S S is empty.
  • For each i i i from 1 1 1 to n n n, insert a i a_i ai into S S S with probability p i 1 0 4 \frac{p_i}{10^4} 104pi. Note that each element is inserted independently.

Denote f ( S ) f(S) f(S) as the bitwise XOR of all elements of S S S. Please calculate the expected value of ( f ( S ) ) 2 (f(S))^2 (f(S))2. Output the answer modulo 1 0 9 + 7 10^9 + 7 109+7.

Formally, let M = 1 0 9 + 7 M = 10^9 + 7 M=109+7. It can be shown that the answer can be expressed as an irreducible fraction p q \frac{p}{q} qp, where p p p and q q q are integers and q ≢ 0 ( m o d M ) q \not \equiv 0 \pmod{M} q0(modM). Output the integer equal to p ⋅ q − 1   m o d   M p \cdot q^{-1} \bmod M pq1modM. In other words, output such an integer x x x that 0 ≤ x < M 0 \le x < M 0x<M and x ⋅ q ≡ p ( m o d M ) x \cdot q \equiv p \pmod{M} xqp(modM).

Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 1 0 4 1 \le t \le 10^4 1t104). The description of the test cases follows.

The first line of each test case contains a single integer n n n ( 1 ≤ n ≤ 2 ⋅ 1 0 5 1 \le n \le 2 \cdot 10^5 1n2105).

The second line of each test case contains n n n integers a 1 , a 2 , … , a n a_1,a_2,\ldots,a_n a1,a2,,an ( 1 ≤ a i ≤ 1023 1 \le a_i \le 1023 1ai1023).

The third line of each test case contains n n n integers p 1 , p 2 , … , p n p_1,p_2,\ldots,p_n p1,p2,,pn ( 1 ≤ p i ≤ 1 0 4 1 \le p_i \le 10^4 1pi104).

It is guaranteed that the sum of n n n over all test cases does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105.

Output

For each test case, output the expected value of ( f ( S ) ) 2 (f(S))^2 (f(S))2, modulo 1 0 9 + 7 10^9 + 7 109+7.

Example

input
4
2
1 2
5000 5000
2
1 1
1000 2000
6
343 624 675 451 902 820
6536 5326 7648 2165 9430 5428
1
1
10000
output
500000007
820000006
280120536
1

Note

In the first test case, a = [ 1 , 2 ] a = [1, 2] a=[1,2] and each element is inserted into S S S with probability 1 2 \frac{1}{2} 21, since p 1 = p 2 = 5000 p_1 = p_2 = 5000 p1=p2=5000 and p i 1 0 4 = 1 2 \frac{p_i}{10^4} = \frac{1}{2} 104pi=21. Thus, there are 4 4 4 outcomes for S S S, each happening with the same probability of 1 4 \frac{1}{4} 41:

  • S = ∅ S = \varnothing S=. In this case, f ( S ) = 0 f(S) = 0 f(S)=0, ( f ( S ) ) 2 = 0 (f(S))^2 = 0 (f(S))2=0.
  • S = { 1 } S = \{1\} S={1}. In this case, f ( S ) = 1 f(S) = 1 f(S)=1, ( f ( S ) ) 2 = 1 (f(S))^2 = 1 (f(S))2=1.
  • S = { 2 } S = \{2\} S={2}. In this case, f ( S ) = 2 f(S) = 2 f(S)=2, ( f ( S ) ) 2 = 4 (f(S))^2 = 4 (f(S))2=4.
  • S = { 1 , 2 } S = \{1,2\} S={1,2}. In this case, f ( S ) = 1 ⊕ 2 = 3 f(S) = 1 \oplus 2 = 3 f(S)=12=3, ( f ( S ) ) 2 = 9 (f(S))^2 = 9 (f(S))2=9.

Hence, the answer is 0 ⋅ 1 4 + 1 ⋅ 1 4 + 4 ⋅ 1 4 + 9 ⋅ 1 4 = 14 4 = 7 2 ≡ 500   000   007 ( m o d 1 0 9 + 7 ) 0 \cdot \frac{1}{4} + 1 \cdot \frac{1}{4} + 4\cdot \frac{1}{4} + 9 \cdot \frac{1}{4} = \frac{14}{4} = \frac{7}{2} \equiv 500\,000\,007 \pmod{10^9 + 7} 041+141+441+941=414=27500000007(mod109+7).

In the second test case, a = [ 1 , 1 ] a = [1, 1] a=[1,1], a 1 a_1 a1 is inserted into S S S with probability 0.1 0.1 0.1, while a 2 a_2 a2 is inserted into S S S with probability 0.2 0.2 0.2. There are 3 3 3 outcomes for S S S:

  • S = ∅ S = \varnothing S=. In this case, f ( S ) = 0 f(S) = 0 f(S)=0, ( f ( S ) ) 2 = 0 (f(S))^2 = 0 (f(S))2=0. This happens with probability ( 1 − 0.1 ) ⋅ ( 1 − 0.2 ) = 0.72 (1-0.1) \cdot (1-0.2) = 0.72 (10.1)(10.2)=0.72.
  • S = { 1 } S = \{1\} S={1}. In this case, f ( S ) = 1 f(S) = 1 f(S)=1, ( f ( S ) ) 2 = 1 (f(S))^2 = 1 (f(S))2=1. This happens with probability ( 1 − 0.1 ) ⋅ 0.2 + 0.1 ⋅ ( 1 − 0.2 ) = 0.26 (1-0.1) \cdot 0.2 + 0.1 \cdot (1-0.2) = 0.26 (10.1)0.2+0.1(10.2)=0.26.
  • S = { 1 , 1 } S = \{1, 1\} S={1,1}. In this case, f ( S ) = 0 f(S) = 0 f(S)=0, ( f ( S ) ) 2 = 0 (f(S))^2 = 0 (f(S))2=0. This happens with probability 0.1 ⋅ 0.2 = 0.02 0.1 \cdot 0.2 = 0.02 0.10.2=0.02.

Hence, the answer is 0 ⋅ 0.72 + 1 ⋅ 0.26 + 0 ⋅ 0.02 = 0.26 = 26 100 ≡ 820   000   006 ( m o d 1 0 9 + 7 ) 0 \cdot 0.72 + 1 \cdot 0.26 + 0 \cdot 0.02 = 0.26 = \frac{26}{100} \equiv 820\,000\,006 \pmod{10^9 + 7} 00.72+10.26+00.02=0.26=10026820000006(mod109+7).

Solution

具体见文后视频。


Code

#include <bits/stdc++.h>
#define int long long
#define fi first
#define se second

using namespace std;

void solve() {
	int n;
	cin >> n;
	const int mod = 1e9 + 7;
	auto inv = [&](int x) -> int {
		int b = mod - 2, res = 1;
		while (b) {
			if (b & 1) res = res * x % mod;
			x = x * x % mod;
			b >>= 1;
		}
		return res;
	};
	vector<int> a(n + 1), p(n + 1);
	vector<vector<int>> dp(2, vector<int>(1024, 0));
	for (int i = 1; i <= n; i ++)
		cin >> a[i];
	for (int i = 1; i <= n; i ++)
		cin >> p[i], p[i] = p[i] * inv(10000) % mod;
	
	dp[0][0] = 1;
	for (int i = 1; i <= n; i ++) {
		for (int j = 0; j < 1024; j ++) dp[i & 1][j] = 0;
		for (int j = 0; j < 1024; j ++) {
			dp[i & 1][j ^ a[i]] += dp[(i - 1) & 1][j] * p[i] % mod, dp[i & 1][j ^ a[i]] %= mod;
			dp[i & 1][j] += dp[(i - 1) & 1][j] * (mod + 1 - p[i]) % mod, dp[i & 1][j] %= mod;
		}
	}
	
	int res = 0;
	for (int i = 0; i < 1024; i ++)
		res += dp[n & 1][i] * i % mod * i % mod, res %= mod;
	
	cout << res << endl; 
}

signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(0);

	int dt;
	cin >> dt;
	while (dt -- )
		solve();

	return 0;
}

视频讲解

Codeforces Round 976 (Div. 2)(A ~ E 题讲解)


最后祝大家早日在这里插入图片描述

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

计算机的错误计算(一百一十)

摘要 计算机的错误计算&#xff08;四十五&#xff09;探讨了&#xff08;二&#xff09;中一个循环迭代案例的错误计算原因。本节分析&#xff08;二&#xff09;中例1循环迭代错误计算的原因。 例1. 已知 计算 在 的错数&#xff0c;并用实例分析计算过程中的错误数…

【Python报错已解决】error: subprocess-exited-with-error

&#x1f3ac; 鸽芷咕&#xff1a;个人主页 &#x1f525; 个人专栏: 《C干货基地》《粉丝福利》 ⛺️生活的理想&#xff0c;就是为了理想的生活! 专栏介绍 在软件开发和日常使用中&#xff0c;BUG是不可避免的。本专栏致力于为广大开发者和技术爱好者提供一个关于BUG解决的经…

课设实验-数据结构-线性表-手机销售

题目&#xff1a; 代码&#xff1a; #include<stdio.h> #include<string.h> #define MaxSize 10 //定义顺序表最大长度 //定义手机结构体类型 typedef struct {char PMod[10];//手机型号int PPri;//价格int PNum;//库存量 }PhoType; //手机类型 //记录手机的顺序…

Ceph RocksDB 深度调优

介绍 调优 Ceph 可能是一项艰巨的挑战。在 Ceph、RocksDB 和 Linux 内核之间&#xff0c;实际上有数以千计的选项可以进行调整以提高存储性能和效率。由于涉及的复杂性&#xff0c;比较优的配置通常分散在博客文章或邮件列表中&#xff0c;但是往往都没有说明这些设置的实际作…

插槽slot在vue中的使用

介绍 在 Vue.js 中&#xff0c;插槽&#xff08;slot&#xff09;是一种用于实现组件内容分发的功能。通过插槽&#xff0c;可以让父组件在使用子组件时自定义子组件内部的内容。插槽提供了一种灵活的方式来组合和复用组件。 项目中有很多地方需要调用一个组件&#xff0c;比…

SemiDesgin中后台组件库,字节跳动出品,能否火,有待检验。

2021年字节跳动SemiDesgin中后台组件库发布。 SemiDesgin官方解释&#xff1a;SemiDesgin由是字节跳动抖音前端与UED团队设计、开发并维护&#xff0c;包含设计语言、React 组件、主题等开箱即用的中后台解决方案&#xff0c;帮助设计师与开发者打造高质量产品。 SemiDesgin&a…

Python画笔案例-072 绘制弹跳扇子

1、绘制弹跳扇子 通过 python 的turtle 库绘制 弹跳扇子,如下图: 2、实现代码 绘制弹跳扇子,以下为实现代码: """弹跳扇子.py """ import time import turtleturtle.speed(0) turtle.left(

【Windows】如何取消显示Windows聚焦在桌面上生成的“了解此图片”图标

如下图所示&#xff0c;在更换Windows聚焦显示的时候&#xff0c;会在桌面多出一个“了解此图片”的图标&#xff0c;看着很烦&#xff0c;但又因为Windows聚焦自带的壁纸比其他主题的壁纸好看很多。 下面是消除办法&#xff1a; 打开注册表&#xff08;按WindowsR&#xff0…

网络编程套接字TCP

前集回顾 上一篇博客中我们写了一个UDP的echo server&#xff0c;是一个回显服务器&#xff1a;请求是啥&#xff0c;响应就是啥 一个正常的服务器&#xff0c;要做三个事情&#xff1a; 读取请求并解析根据请求&#xff0c;计算响应把响应写回到客户端 DatagramPacket res…

车辆重识别(2021NIPS在图像合成方面,扩散模型打败了gans网络)论文阅读2024/10/01

本文在架构方面的创新&#xff1a; ①增加注意头数量&#xff1a; 使用32⇥32、16⇥16和8⇥8分辨率的注意力&#xff0c;而不是只使用16⇥16 ②使用BigGAN残差块 使用Big GAN残差块对激活进行上采样和下采样 ③自适应组归一化层 将经过组归一化操作后的时间步和类嵌入到每…

十三、减少磁盘延迟时间的方法

1.交替编号 让逻辑上相邻的扇区在物理上不相邻&#xff1b; 原因&#xff1a;由于磁头在读取完一个扇区之后需要等待一段时间才能再次读入下一个扇区&#xff0c;如果逻辑上相邻的扇区在物理上相邻的话&#xff0c;需要等待磁盘转完一圈才能读取到。 2.错位命名 让相邻盘面上…

观测云对接 SkyWalking 最佳实践

简介 SkyWalking 是一个开源的 APM&#xff08;应用性能监控&#xff09;和可观测性分析平台&#xff0c;专为微服务、云原生架构和基于容器的架构设计。它提供了分布式追踪、服务网格遥测分析、度量聚合和可视化一体化的解决方案。如果您的应用中正在使用SkyWalking &#xf…

opencv实战项目二十八:基于Shi-Tomasi算法的箱子角点检测

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 前言一、角点检测方法概述二、Shi-Tomasi角点检测法 前言 随着科技的飞速发展&#xff0c;计算机视觉技术在我们的日常生活中扮演着越来越重要的角色。从无人驾驶汽…

Oracle exadata存储节点更换内存操作及报错处理

1.报错信息 在进行Oracle exadata巡检时&#xff0c;发现cell节点有一根内存报错&#xff0c;报错信息如下&#xff1a; 报错内存位置为&#xff1a;CPU1 P1/D2槽位 报错内存信息&#xff1a; 根据报错信息确认内存PN号、大小等息&#xff0c;并将信息反馈公司&#xff0c;及…

git初级使用学习(图文)

以后工作少不了使用git&#xff0c;记录一下今天的学习&#xff0c;防止忘记 Git 是一个分布式版本控制系统&#xff0c;常用于代码管理和团队协作 首先新建一个文件夹&#xff0c;作为本地仓库 mkdir git-practice 初始化仓库 git init 新建个test1.cpp文件&#xff0c;…

CSS中字体图标的使用

引言&#xff1a; 在网页设计当中&#xff0c;会有很多很简洁的图标&#xff0c;比如箭头&#xff0c;照相机&#xff0c;放大镜等 这些大概率都是使用字体图标来完成的&#xff0c;因为字体图标比较简洁高效&#xff0c;不会像图片一样需要向浏览器请求数据。那么字体图标该…

第七篇:重定向和管道相关知识总结

续第六篇&#xff1a;Linux进程的相关知识总结&#xff08;2&#xff09;-CSDN博客 目录 第五章&#xff1a;管道和重定向 5.1重定向 5.1.1产生重定向的原因 5.1.2重定向的应用 5.1.3查看现有的进程号、文件描述符 5.1.3.1文件描述符&#xff08;FD、文件句柄&#xff0…

Redis介绍及整合Spring

目录 Redis介绍 Spring与Redis集成 Redis介绍 Redis是内存数据库&#xff0c;Key-value型NOSQL数据库&#xff0c;项目上经常将一些不经常变化并且反复查询的数据放入Redis缓存&#xff0c;由于数据放在内存中&#xff0c;所以查询、维护的速度远远快于硬盘方式操作数据&#…

Vortex GPGPU的github流程跑通与功能模块波形探索

文章目录 前言一、跟着官方文档走一遍二、cache子模块的波形仿真2.1 必要的文件内容解释2.2 cache子模块波形仿真——目前环境没啥问题了&#xff0c;就vcd因为配置问题出不来 总结 前言 看了那么久的verilog代码和文档&#xff0c;但还是没怎么接触过Vortex GPGPU全流程跑通与…

Vscode、小皮面板安装

Vscode下载官网&#xff1a;Visual Studio Code - Code Editing. Redefined 小皮面板官网&#xff1a;小皮面板-好用、安全、稳定的Linux服务器面板&#xff01; (xp.cn) 一、进入vscode官网下载 后面就是一通无脑下一步下一步 安装好后的界面如下图 二、下载小皮&#xff0…