当前位置: 首页 > news >正文

2025.1.17——1200

2025.1.17——1200


Q1. 1200

Jellyfish has n n n green apples with values a 1 , a 2 , … , a n a_1, a_2, \dots, a_n a1,a2,,an and Gellyfish has m m m green apples with values b 1 , b 2 , … , b m b_1,b_2,\ldots,b_m b1,b2,,bm.

They will play a game with k k k rounds. For i = 1 , 2 , … , k i=1,2,\ldots,k i=1,2,,k in this order, they will perform the following actions:

  • If i i i is odd, Jellyfish can choose to swap one of her apples with one of Gellyfish’s apples or do nothing.
  • If i i i is even, Gellyfish can choose to swap one of his apples with one of Jellyfish’s apples or do nothing.

Both players want to maximize the sum of the values of their apples.

Since you are one of the smartest people in the world, Jellyfish wants you to tell her the final sum of the value of her apples after all k k k rounds of the game. Assume that both Jellyfish and Gellyfish play optimally to maximize the sum of values of their apples.
Input

Each test contains multiple test cases. The first line contains the number of test cases t t t ( 1 ≤ t ≤ 2000 1 \leq t \leq 2000 1t2000). The description of the test cases follows.

The first line of each test case contains three integers, n n n, m m m and k k k ( 1 ≤ n , m ≤ 50 1 \leq n, m \leq 50 1n,m50, 1 ≤ k ≤ 1 0 9 1 \leq k \leq 10^9 1k109) — the number of green apples Jellyfish has, the number of green apples Gellyfish has and the number of rounds of the game respectively.

The second line of each test case contains n n n integers a 1 , a 2 , … , a n a_1, a_2, \dots, a_n a1,a2,,an ( 1 ≤ a i ≤ 1 0 9 1 \leq a_i \leq 10^9 1ai109) — the values of Jellyfish’s green apples.

The third line of each test case contains m m m integers b 1 , b 2 , … , b m b_1, b_2, \dots, b_m b1,b2,,bm ( 1 ≤ b i ≤ 1 0 9 1 \leq b_i \leq 10^9 1bi109) — the values of Gellyfish’s green apples.

Do note that the sum of n n n and m m m over all test cases are both not bounded.


Q2. 1200

Andrey is just starting to come up with problems, and it’s difficult for him. That’s why he came up with a strange problem about permutations † ^{\dagger} and asks you to solve it. Can you do it?

Let’s call the cost of a permutation p p p of length n n n the value of the expression:

( ∑ i = 1 n p i ⋅ i ) − ( max ⁡ j = 1 n p j ⋅ j ) (\sum_{i = 1}^{n} p_i \cdot i) - (\max_{j = 1}^{n} p_j \cdot j) (i=1npii)(maxj=1npjj).

Find the maximum cost among all permutations of length n n n.

† ^{\dagger} A permutation of length n n n is an array consisting of n n n distinct integers from 1 1 1 to n n n in arbitrary order. For example, [ 2 , 3 , 1 , 5 , 4 ] [2,3,1,5,4] [2,3,1,5,4] is a permutation, but [ 1 , 2 , 2 ] [1,2,2] [1,2,2] is not a permutation ( 2 2 2 appears twice in the array), and [ 1 , 3 , 4 ] [1,3,4] [1,3,4] is also not a permutation ( n = 3 n=3 n=3 but there is 4 4 4 in the array).
Input

Each test consists of multiple test cases. The first line contains a single integer t t t ( 1 ≤ t ≤ 30 1 \le t \le 30 1t30) — the number of test cases. The description of the test cases follows.

The only line of each test case contains a single integer n n n ( 2 ≤ n ≤ 250 2 \le n \le 250 2n250) — the length of the permutation.

It is guaranteed that the sum of n n n over all test cases does not exceed 500 500 500.


Q3. 1200

Monocarp is going to make a purchase with cost of exactly m m m burles.

He has two types of coins, in the following quantities:

  • coins worth 1 1 1 burle: a 1 a_1 a1 regular coins and infinitely many fancy coins;
  • coins worth k k k burles: a k a_k ak regular coins and infinitely many fancy coins.

Monocarp wants to make his purchase in such a way that there’s no change — the total worth of provided coins is exactly m m m. He can use both regular and fancy coins. However, he wants to spend as little fancy coins as possible.

What’s the smallest total number of fancy coins he can use to make a purchase?
Input

The first line contains a single integer t t t ( 1 ≤ t ≤ 3 ⋅ 1 0 4 1 \le t \le 3 \cdot 10^4 1t3104) — the number of testcases.

The only line of each testcase contains four integers m , k , a 1 m, k, a_1 m,k,a1 and a k a_k ak ( 1 ≤ m ≤ 1 0 8 1 \le m \le 10^8 1m108; 2 ≤ k ≤ 1 0 8 2 \le k \le 10^8 2k108; 0 ≤ a 1 , a k ≤ 1 0 8 0 \le a_1, a_k \le 10^8 0a1,ak108) — the cost of the purchase, the worth of the second type of coin and the amounts of regular coins of both types, respectively.


Q4. 1300

Cats are attracted to pspspsps, but Evirir, being a dignified dragon, is only attracted to pspspsps with oddly specific requirements…

Given a string s = s 1 s 2 … s n s = s_1s_2\ldots s_n s=s1s2sn of length n n n consisting of characters p, s, and . (dot), determine whether a permutation ∗ ^{\text{∗}} p p p of length n n n exists, such that for all integers i i i ( 1 ≤ i ≤ n 1 \le i \le n 1in):

  • If s i s_i si is p, then [ p 1 , p 2 , … , p i ] [p_1, p_2, \ldots, p_i] [p1,p2,,pi] forms a permutation (of length i i i);
  • If s i s_i si is s, then [ p i , p i + 1 , … , p n ] [p_i, p_{i+1}, \ldots, p_{n}] [pi,pi+1,,pn] forms a permutation (of length n − i + 1 n-i+1 ni+1);
  • If s i s_i si is ., then there is no additional restriction.

∗ ^{\text{∗}} A permutation of length n n n is an array consisting of n n n distinct integers from 1 1 1 to n n n in arbitrary order. For example, [ 2 , 3 , 1 , 5 , 4 ] [2,3,1,5,4] [2,3,1,5,4] is a permutation, but [ 1 , 2 , 2 ] [1,2,2] [1,2,2] is not a permutation ( 2 2 2 appears twice in the array), and [ 1 , 3 , 4 ] [1,3,4] [1,3,4] is also not a permutation ( n = 3 n=3 n=3 but there is 4 4 4 in the array).
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 ≤ 500 1 \le n \le 500 1n500), the length of s s s.

The second line of each test case contains a string s s s of length n n n that consists of the characters p, s, and …

It is guaranteed that the sum of n n n over all test cases does not exceed 5000 5000 5000.


Q5. 1300

You are given an array a a a of n n n integers, and q q q queries.

Each query is represented by two integers l l l and r r r ( 1 ≤ l ≤ r ≤ n 1 \le l \le r \le n 1lrn). Your task is to find, for each query, two indices i i i and j j j (or determine that they do not exist) such that:

  • l ≤ i ≤ r l \le i \le r lir;
  • l ≤ j ≤ r l \le j \le r ljr;
  • a i ≠ a j a_i \ne a_j ai=aj.

In other words, for each query, you need to find a pair of different elements among a l , a l + 1 , … , a r a_l, a_{l+1}, \dots, a_r al,al+1,,ar, or report that such a pair does not exist.
Input

The first line of the input contains a single integer t t t ( 1 ≤ t ≤ 1 0 4 1 \le t \le 10^4 1t104) — the number of test cases. The descriptions of the test cases follow.

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

The second line of each test case contains n n n integers a 1 , a 2 , … , a n a_1, a_2, \dots, a_n a1,a2,,an ( 1 ≤ a i ≤ 1 0 6 1 \le a_i \le 10^6 1ai106) — the elements of the array a a a.

The third line of each test case contains a single integer q q q ( 1 ≤ q ≤ 2 ⋅ 1 0 5 1 \le q \le 2 \cdot 10^5 1q2105) — the number of queries.

The next q q q lines contain two integers each, l l l and r r r (KaTeX parse error: Expected 'EOF', got '&' at position 9: 1 \le l &̲lt; r \le n) — the boundaries of the query.

It is guaranteed that the sum of the values of n n n across all test cases does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105. Similarly, it is guaranteed that the sum of the values of q q q across all test cases does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105.


------------------------思考------------------------

  • 贪心博弈+guess+数学+发现结论+思维


A1

  1. 贪心博弈:发现策略为将自己最小与其最大交换/不操作。

A2

  1. 神秘题:严谨证明太难,只能靠手玩/天马行空/打表/guess。

A3

  1. 有趣的数学题:贪心再数学,考虑回退。
  2. 另解可对函数二分

A4

  1. 观察各种情况发现结论。

A5

  1. 巧妙的思维,维护少许东西就可以作出回答。
  2. 原题区间询问可看作(充分必要): [ l , r ) [l,r) [l,r) 中是否存在与 a [ r ] a[r] a[r] 不相同的数。

------------------------代码------------------------

A1

#include <bits/stdc++.h>
#define int long long //
#define endl '\n'     // 交互/调试 关
using namespace std;
#define bug(BUG) cout << "bug:# " << (BUG) << endl
#define bug2(BUG1, BUG2) cout << "bug:# " << (BUG1) << " " << (BUG2) << endl
#define bug3(BUG1, BUG2, BUG3) cout << "bug:# " << (BUG1) << ' ' << (BUG2) << ' ' << (BUG3) << endl
void _();
signed main()
{ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);cout << fixed << setprecision(10);int T = 1;cin >> T;while (T--)_();return 0;
}void _()
{int n, m, k;cin >> n >> m >> k;int res = 0;vector<int> a{(int)1e10, 0};vector<int> b = a;for (int i = 0; i < n; i++){int x;cin >> x;res += x;a[0] = min(a[0], x);a[1] = max(a[1], x);}for (int i = 0; i < m; i++){int x;cin >> x;b[0] = min(b[0], x);b[1] = max(b[1], x);}res -= a[0] + a[1];if (a[0] < b[1])swap(a[0], b[1]);sort(a.begin(), a.end());sort(b.begin(), b.end());if ((k ^ 1) & 1){// bug(k);if (b[0] < a[1])swap(b[0], a[1]);}res += a[0] + a[1];cout << res << endl;
}

A2

#include <bits/stdc++.h>
#define int long long //
#define endl '\n'     // 交互/调试 关
using namespace std;
#define bug(BUG) cout << "bug:# " << (BUG) << endl
#define bug2(BUG1, BUG2) cout << "bug:# " << (BUG1) << " " << (BUG2) << endl
#define bug3(BUG1, BUG2, BUG3) cout << "bug:# " << (BUG1) << ' ' << (BUG2) << ' ' << (BUG3) << endl
void _();
signed main()
{ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);cout << fixed << setprecision(10);int T = 1;cin >> T;while (T--)_();return 0;
}void _()
{int n;cin >> n;vector<int> a(n + 1);for (int i = 1; i <= n; i++)a[i] = i;auto get = [&](){int res = 0, mx = 0;for (int i = 1; i <= n; i++)res += a[i] * i, mx = max(mx, a[i] * i);return res - mx;};int res = get();for (int i = n - 1; i; i--){for (int j = i; j < n; j++)swap(a[j], a[j + 1]);res = max(res, get());// for (int i = 1; i <= n; i++)//     cout << a[i] << " ";// cout << endl;}cout << res << endl;
}

A3

#include <bits/stdc++.h>
#define int long long //
#define endl '\n'     // 交互/调试 关
using namespace std;
#define bug(BUG) cout << "bug:# " << (BUG) << endl
#define bug2(BUG1, BUG2) cout << "bug:# " << (BUG1) << " " << (BUG2) << endl
#define bug3(BUG1, BUG2, BUG3) cout << "bug:# " << (BUG1) << ' ' << (BUG2) << ' ' << (BUG3) << endl
void _();
signed main()
{ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);cout << fixed << setprecision(10);int T = 1;cin >> T;while (T--)_();return 0;
}void _()
{int m, k, a1, ak;cin >> m >> k >> a1 >> ak;int res = 0;int m1 = m, m2 = 0;if (ak)m1 = max(0ll, m - k * min(ak, m / k));if (m1)m2 = max(0ll, m1 - a1);if (m2){res = m2 / k + m2 % k;if (m1 / k - m2 / k)res = min(res, m2 / k + 1);}cout << res << endl;
}
// void _()
// {
//     int m, k, a1, ak;
//     cin >> m >> k >> a1 >> ak;
//     int res = 0;
//     if (ak)
//         m = max(0ll, m - ak * min(k, (m + ak - 1) / ak));
//     if (m)
//         m = max(0ll, m - a1);
//     if (m)
//     {
//         res = m / k + m % k;
//         if ((m / k + 1) * k <= m)
//             res = min(res, m / k + 1);
//     }
//     cout << res << endl;
// }

A4

#include <bits/stdc++.h>
#define int long long //
#define endl '\n'     // attention: interactive/debug
#define el cout << endl
using namespace std;
#define bug(BUG) cout << "bug:# " << (BUG) << endl
#define bug2(BUG1, BUG2) cout << "bug:# " << (BUG1) << " " << (BUG2) << endl
#define bug3(BUG1, BUG2, BUG3) cout << "bug:# " << (BUG1) << ' ' << (BUG2) << ' ' << (BUG3) << endl
#define bugv(VEC)           \cout << "bug:# ";       \for (auto val : VEC)    \cout << val << ' '; \el;void _();
signed main()
{ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);cout << fixed << setprecision(10);int T = 1;cin >> T;while (T--)_();return 0;
}void _()
{int n;cin >> n;string s;cin >> s;s.front() = s.front() == '.' ? 's' : s.front();s.back() = s.back() == '.' ? 'p' : s.back();bool f = 0;map<char, int> cnt;for (auto v : s)cnt[v]++;if (!cnt['p'] || !cnt['s'])f = 1;if (cnt['p'] == 1 && s.back() == 'p')f = 1;if (cnt['s'] == 1 && s.front() == 's')f = 1;cout << (f ? "YES" : "NO");el;
}

A5

#include <bits/stdc++.h>
#define int long long //
#define endl '\n'     // attention: interactive/debug
#define el cout << endl
using namespace std;
#define bug(BUG) cout << "bug:# " << (BUG) << endl
#define bug2(BUG1, BUG2) cout << "bug:# " << (BUG1) << " " << (BUG2) << endl
#define bug3(BUG1, BUG2, BUG3) cout << "bug:# " << (BUG1) << ' ' << (BUG2) << ' ' << (BUG3) << endl
#define bugv(VEC)           \cout << "bug:# ";       \for (auto val : VEC)    \cout << val << ' '; \el;void _();
signed main()
{ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);cout << fixed << setprecision(10);int T = 1;cin >> T;while (T--)_();return 0;
}void _()
{int n;cin >> n;vector<int> a(n + 1), f(n + 1, -1);for (int i = 1; i <= n; i++){cin >> a[i];f[i] = a[i] == a[i - 1] ? f[i - 1] : i - 1;}int q;cin >> q;while (q--){int l, r;cin >> l >> r;int resl = -1, resr = -1;if (f[r] >= l)resl = f[r], resr = r;cout << resl << ' ' << resr;el;}el;
}

相关文章:

2025.1.17——1200

2025.1.17——1200 Q1. 1200 Jellyfish has n n n green apples with values a 1 , a 2 , … , a n a_1, a_2, \dots, a_n a1​,a2​,…,an​ and Gellyfish has m m m green apples with values b 1 , b 2 , … , b m b_1,b_2,\ldots,b_m b1​,b2​,…,bm​. They will …...

vite工程化

Vite 通过直接利用浏览器的模块加载能力、将 CommonJS 模块转换为 ES 模块并缓存结果、基于原生 ES 模块的 HMR 以及对 TypeScript 的直接支持&#xff0c;提供了更快的开发体验和更高的开发效率。 1.直接利用浏览器模块加载功能 更快加载速度&#xff1a;不需要打包&#xf…...

Mysql常见问题处理集锦

Mysql常见问题处理集锦 root用户密码忘记&#xff0c;重置的操作(windows上的操作)MySQL报错&#xff1a;ERROR 1118 (42000): Row size too large. 或者 Row size too large (&#xff1e; 8126).场景&#xff1a;报错原因解决办法 详解行大小限制示例&#xff1a;内容来源于网…...

Android SystemUI——CarSystemBar添加到窗口(十)

上一篇文章我们看到了车载状态栏 CarSystemBar 视图的创建流程&#xff0c;这里我们继续分析将车载状态栏添加到 Windows 窗口中。 一、添加状态栏到窗口 前面我们已经分析了构建视图对象容器和构建视图对象内容&#xff0c;接下来我们继续分析 attachNavBarWindows() 方法将视…...

《重生到现代之从零开始的C++生活》—— 类和对象1

类 我嘞个豆&#xff0c;类可是太重要了&#xff0c;简直是重中之重 class为定义类的关键字&#xff0c;stack为类的名字&#xff0c;{}为类的主题 class stack {void add (int a,int b){return ab;}//类的方法&#xff0c;成员函数int _c;int _d;//类的属性&#xff0c;成…...

《FMambaIR:一种基于混合状态空间模型和频域的方法用于图像恢复》学习笔记

paper&#xff1a;(PDF) FMambaIR: A Hybrid State Space Model and Frequency Domain for Image Restoration 目录 摘要 一、引言 二、相关工作 1、图像恢复 2、频率学习 3、状态空间模型&#xff08;SSM&#xff09; 三、框架 1、基本知识 2、整体框架 3、F-Mamba…...

每日十题八股-2025年1月18日

1.服务器处理并发请求有哪几种方式&#xff1f; 2.讲一下io多路复用 3.select、poll、epoll 的区别是什么&#xff1f; 4.epoll 的 边缘触发和水平触发有什么区别&#xff1f; 5.redis&#xff0c;nginx&#xff0c;netty 是依赖什么做的这么高性能&#xff1f; 6.零拷贝是什么…...

海康威视摄像头RTSP使用nginx推流到服务器直播教程

思路&#xff1a; 之前2020年在本科的时候&#xff0c;由于项目的需求需要将海康威视的摄像头使用推流服务器到网页进行直播。这里将自己半个月琢磨出来的步骤给大家发一些。切勿转载&#xff01;&#xff01;&#xff01;&#xff01; 使用网络摄像头中的rtsp协议---------通…...

搭建一个基于Spring Boot的书籍学习平台

搭建一个基于Spring Boot的书籍学习平台可以涵盖多个功能模块&#xff0c;例如用户管理、书籍管理、学习进度跟踪、笔记管理、评论和评分等。以下是一个简化的步骤指南&#xff0c;帮助你快速搭建一个基础的书籍学习平台。 — 1. 项目初始化 使用 Spring Initializr 生成一个…...

Go 语言的slice是如何扩容的?

Go 语言中的 slice 是一种灵活、动态的视图&#xff0c;是对底层数组的抽象。当对 slice 进行追加元素等操作导致其长度超过容量时&#xff0c;就会发生扩容。 一、扩容的基本原理 当 slice 需要扩容时&#xff0c;Go 语言会根据当前的容量来确定新的容量。一般来说&#xff…...

Apache Hive--排序函数解析

在大数据处理与分析中&#xff0c;Apache Hive是一个至关重要的数据仓库工具。其丰富的函数库为数据处理提供了诸多便利&#xff0c;排序函数便是其中一类非常实用的工具。通过排序函数&#xff0c;我们能够在查询结果集中为每一行数据分配一个排名值&#xff0c;这对于数据分析…...

Java 接口安全指南

Java 接口安全指南 概述 在现代 Web 应用中&#xff0c;接口&#xff08;API&#xff09;是前后端交互的核心。然而&#xff0c;接口的安全性常常被忽视&#xff0c;导致数据泄露、未授权访问等安全问题。本文将详细介绍 Java 中如何保障接口安全&#xff0c;涵盖以下内容&am…...

合合信息名片全能王上架原生鸿蒙应用市场,成为首批数字名片类应用

长期以来&#xff0c;名片都是企业商务沟通的重要工具。随着企业数字化转型&#xff0c;相较于传统的纸质名片&#xff0c;数字名片对于企业成员拓展业务、获取商机、提升企业形象等方面发挥着重要作用。近期&#xff0c;合合信息旗下名片全能王正式上线原生鸿蒙应用市场&#…...

38.【3】CTFHUB web sql 报错注入

进入靶场 按照提示输入1 显示查询正确 既然是报错注入&#xff0c;先判断整形还是字符型注入 先输入1 and 11 再输入1 and 12 都显示查询正确&#xff0c;可知此为字符串型注入&#xff0c;不是数字型注入 然后就不会了 求助AI和其他wp 由以上2张搜索结果知updatexml是适用…...

RC2在线加密工具

RC2是由著名密码学家Ron Rivest设计的一种传统对称分组加密算法&#xff0c;它可作为DES算法的建议替代算法。RC2是一种分组加密算法&#xff0c;RC2的密钥长度可变&#xff0c;可以从8字节到128字节&#xff0c;安全性选择更加灵活。 开发调试上&#xff0c;有时候需要进行对…...

NVIDIA 下 基于Ubuntun20.04下 使用脚本安装 ros2-foxy 和 使用docker安装 ros2-foxy

一、前提介绍&#xff1a; 本文主要采用两种方式在NVIDIA 下基于 Ubuntun20.04安装 ros2-foxy。 使用环境&#xff1a; NVIDIA 为 Jetson 系列下 Jetson Xavier NX&#xff1b; Ubuntun版本&#xff1a;20.04 二、安装方法&#xff1a; 1、使用脚本编译方式&#xff1a; 使…...

STL容器-- list的模拟实现(附源码)

STL容器-- list的模拟实现&#xff08;附源码&#xff09; List的实现主要考察我们对list这一容器的理解&#xff0c;和代码的编写能力&#xff0c;通过上节对list容器的使用&#xff0c;我们对list容器已经有了一些基本的了解&#xff0c;接下来就让我们来实现一些list容器常见…...

python——句柄

一、概念 句柄指的是操作系统为了标识和访问对象而提供的一个标识符&#xff0c;在操作系统中&#xff0c;每个对象都有一个唯一的句柄&#xff0c;通过句柄可以访问对象的属性和方法。例如文件、进程、窗口等都有句柄。在编程中&#xff0c;可以通过句柄来操作这些对象&#x…...

KubeSphere 与 Pig 微服务平台的整合与优化:全流程容器化部署实践

一、前言 近年来,为了满足越来越复杂的业务需求,我们从传统单体架构系统升级为微服务架构,就是把一个大型应用程序分割成可以独立部署的小型服务,每个服务之间都是松耦合的,通过 RPC 或者是 Rest 协议来进行通信,可以按照业务领域来划分成独立的单元。但是微服务系统相对…...

ESP8266-01S、手机、STM32连接

1、ESP8266-01S的工作原理 1.1、AP和STA ESP8266-01S为WIFI的透传模块&#xff0c;主要模式如下图&#xff1a; 上节说到&#xff0c;我们需要用到AT固件进行局域网应用&#xff08;ESP8266连接的STM32和手机进行连接&#xff09;。 ESP8266为一个WiFi透传模块&#xff0c;和…...

相机Camera日志实例分析之二:相机Camx【专业模式开启直方图拍照】单帧流程日志详解

【关注我&#xff0c;后续持续新增专题博文&#xff0c;谢谢&#xff01;&#xff01;&#xff01;】 上一篇我们讲了&#xff1a; 这一篇我们开始讲&#xff1a; 目录 一、场景操作步骤 二、日志基础关键字分级如下 三、场景日志如下&#xff1a; 一、场景操作步骤 操作步…...

在HarmonyOS ArkTS ArkUI-X 5.0及以上版本中,手势开发全攻略:

在 HarmonyOS 应用开发中&#xff0c;手势交互是连接用户与设备的核心纽带。ArkTS 框架提供了丰富的手势处理能力&#xff0c;既支持点击、长按、拖拽等基础单一手势的精细控制&#xff0c;也能通过多种绑定策略解决父子组件的手势竞争问题。本文将结合官方开发文档&#xff0c…...

线程与协程

1. 线程与协程 1.1. “函数调用级别”的切换、上下文切换 1. 函数调用级别的切换 “函数调用级别的切换”是指&#xff1a;像函数调用/返回一样轻量地完成任务切换。 举例说明&#xff1a; 当你在程序中写一个函数调用&#xff1a; funcA() 然后 funcA 执行完后返回&…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略

本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装&#xff1b;只需暴露 19530&#xff08;gRPC&#xff09;与 9091&#xff08;HTTP/WebUI&#xff09;两个端口&#xff0c;即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

HTML 列表、表格、表单

1 列表标签 作用&#xff1a;布局内容排列整齐的区域 列表分类&#xff1a;无序列表、有序列表、定义列表。 例如&#xff1a; 1.1 无序列表 标签&#xff1a;ul 嵌套 li&#xff0c;ul是无序列表&#xff0c;li是列表条目。 注意事项&#xff1a; ul 标签里面只能包裹 li…...

【磁盘】每天掌握一个Linux命令 - iostat

目录 【磁盘】每天掌握一个Linux命令 - iostat工具概述安装方式核心功能基础用法进阶操作实战案例面试题场景生产场景 注意事项 【磁盘】每天掌握一个Linux命令 - iostat 工具概述 iostat&#xff08;I/O Statistics&#xff09;是Linux系统下用于监视系统输入输出设备和CPU使…...

TRS收益互换:跨境资本流动的金融创新工具与系统化解决方案

一、TRS收益互换的本质与业务逻辑 &#xff08;一&#xff09;概念解析 TRS&#xff08;Total Return Swap&#xff09;收益互换是一种金融衍生工具&#xff0c;指交易双方约定在未来一定期限内&#xff0c;基于特定资产或指数的表现进行现金流交换的协议。其核心特征包括&am…...

什么?连接服务器也能可视化显示界面?:基于X11 Forwarding + CentOS + MobaXterm实战指南

文章目录 什么是X11?环境准备实战步骤1️⃣ 服务器端配置(CentOS)2️⃣ 客户端配置(MobaXterm)3️⃣ 验证X11 Forwarding4️⃣ 运行自定义GUI程序(Python示例)5️⃣ 成功效果![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/55aefaea8a9f477e86d065227851fe3d.pn…...

Golang——7、包与接口详解

包与接口详解 1、Golang包详解1.1、Golang中包的定义和介绍1.2、Golang包管理工具go mod1.3、Golang中自定义包1.4、Golang中使用第三包1.5、init函数 2、接口详解2.1、接口的定义2.2、空接口2.3、类型断言2.4、结构体值接收者和指针接收者实现接口的区别2.5、一个结构体实现多…...

Ubuntu系统复制(U盘-电脑硬盘)

所需环境 电脑自带硬盘&#xff1a;1块 (1T) U盘1&#xff1a;Ubuntu系统引导盘&#xff08;用于“U盘2”复制到“电脑自带硬盘”&#xff09; U盘2&#xff1a;Ubuntu系统盘&#xff08;1T&#xff0c;用于被复制&#xff09; &#xff01;&#xff01;&#xff01;建议“电脑…...