Codeforces Round 867 (Div. 3) (E-G)

news/2024/5/7 14:11:20/文章来源:https://blog.csdn.net/scanner___yw/article/details/130376928

Problem - E - Codeforces

        (1)题目大意        

                给你一个字符串,问你让字符串每一对相对应位置都不同的最小操作数是多少?(A[i]和A[n - i],A[i + 1]和A[n - i - 1])

         (2)解题思路

                1.首先字符串为奇数一定不可以

                2.其次如果字符串中某个字母的个数>n/2,则也不可以

                3.答案的构成,不会证明。

                考虑主元素法,答案要么就是最大的相同对的字母或者是总共的相同对的总数/2,这两个取个max就行了。

         (3)代码实现

#include<bits/stdc++.h>
#define sz(x) (int) x.size()
#define rep(i,z,n) for(int i = z;i <= n; i++)
#define per(i,n,z) for(int i = n;i >= z; i--)
#define PII pair<int,int>
#define fi first
#define se second
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
const int N = 5e5 + 10;void solve(){int n;cin >> n;string s;cin >> s;vector <int> cnt(26);if(n & 1) {cout << -1 << endl;return;}for(auto x : s) cnt[x - 'a'] ++;int mx = 0;for(int i = 0;i < 26;i ++) {if(cnt[i] > n / 2) {cout << -1 << endl;return;}}int l = 0,r = n - 1,ans = 0;for(int i = 0;i < 26;i ++) cnt[i] = 0;while(l < r) {if(s[l] == s[r]) cnt[s[l] - 'a'] ++,ans ++;l ++,r --;}for(int i = 0;i < 26;i ++) mx = max(mx,cnt[i]);cout << max((ans + 1) / 2,mx) << endl;
}int main()
{ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);int T = 1;cin >> T;while(T --) solve();
}

Problem - F - Codeforces

        (1)题目大意

         (2)解题思路

                考虑找到最长的那条链,做两次dfs即可,或者考虑换根dp,我的做法是两次dfs,首先从1跑一遍dfs记录一下深度,然后从最远的那个点再跑一次dfs即可。

                记第一次dfs处理的数组为dp1,第二次的数组为dp2,则有两种情况

                        1.需要进行操作:ans = max(ans,dp2[i] * k - dp1[i] * c);

                        2.不需要进行操作: ans = max(ans,dp1[i]*k);

         (3)代码实现

#include<bits/stdc++.h>
#define sz(x) (int) x.size()
#define rep(i,z,n) for(int i = z;i <= n; i++)
#define per(i,n,z) for(int i = n;i >= z; i--)
#define PII pair<int,int>
#define fi first
#define se second
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
const int N = 3e5 + 10;
vector <int> g[N];
int dp1[N],dp2[N];
void dfs1(int u,int f)
{for(auto v : g[u]) {if(v == f) continue;dp1[v] = dp1[u] + 1;dfs1(v,u);}
}void dfs2(int u,int f)
{for(auto v : g[u]) {if(v == f) continue;dp2[v] = dp2[u] + 1;dfs2(v,u);}
}
void solve(){int n,k,c;cin >> n >> k >> c;for(int i = 1;i <= n;i ++) g[i].clear();for(int i = 1;i <= n - 1;i ++) {int u,v;cin >> u >> v;g[u].pb(v),g[v].pb(u);}dp1[1] = 0;dfs1(1,0);int rt = 1;for(int i = 1;i <= n;i ++) {if(dp1[i] > dp1[rt]) rt = i;}dp2[rt] = 0;dfs2(rt,0);ll ans = 0;for(int i = 1;i <= n;i ++) {ans = max(ans,1ll * dp1[i] * k);ans = max(ans,1ll * dp2[i] * k - 1ll * dp1[i] * c);}cout << ans << endl;
}int main()
{ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);int T = 1;cin >> T;while(T --) solve();
}

Problem - G2 - Codeforces

        (1)题目大意

                给你一个长度为n的序列,让你找到i,j,k的对数,满足a[j] = b * a[i],a[k] = b * a[j]。

         (2)解题思路

                G1我们直接枚举暴力即可,但是G2发现a[i]有1e9,因此我们考虑使用PollardRho暴力分解质因子,然后根据质数平方因子处理出两个数组出来,再根据这些因子计算答案即可。

         (3)代码实现

#include "bits/stdc++.h"
#include <cstdint>
#include <functional>
#include <random>
#include <cmath>
#include <cstdint>
#include <functional>
#include <memory>
#include <cassert>
#include <cstdint>
#include <functional>
#include <algorithm>
#include <cstdint>
#include <cassert>
#include <cstdint>
#include <initializer_list>
#define sz(x) (int) x.size()
#define rep(i,z,n) for(int i = z;i <= n; i++)
#define per(i,n,z) for(int i = n;i >= z; i--)
#define PII pair<int,int>
#define fi first
#define se second
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using pii = std::pair<int, int>;
using pll = std::pair<ll, ll>;
const int N = 1e6 + 10;
int a[N];
namespace OY {template <typename _ModType>struct Barrett {_ModType m_P;__uint128_t m_Pinv;constexpr Barrett() = default;constexpr explicit Barrett(_ModType __P) : m_P(__P), m_Pinv(-uint64_t(__P) / __P + 1) {}constexpr _ModType mod() const { return m_P; }constexpr _ModType mod(uint64_t __a) const {__a -= uint64_t(m_Pinv * __a >> 64) * m_P + m_P;if (__a >= m_P) __a += m_P;return __a;}constexpr _ModType multiply(uint64_t __a, uint64_t __b) const {if constexpr (std::is_same_v<_ModType, uint64_t>)return multiply_ld(__a, __b);elsereturn multiply_64(__a, __b);}constexpr _ModType multiply_64(uint64_t __a, uint64_t __b) const {// assert(__a * __b < 1ull << 64);return mod(__a * __b);}constexpr _ModType multiply_128(uint64_t __a, uint64_t __b) const {if (__builtin_clzll(__a) + __builtin_clzll(__b) >= 64) return multiply_64(__a, __b);return __uint128_t(__a) * __b % m_P;}constexpr _ModType multiply_ld(uint64_t __a, uint64_t __b) const {// assert(m_P < 1ull << 63 && __a < m_P && __b < m_P);if (__builtin_clzll(__a) + __builtin_clzll(__b) >= 64) return multiply_64(__a, __b);int64_t res = __a * __b - uint64_t(1.L / m_P * __a * __b) * m_P;if (res < 0)res += m_P;else if (res >= m_P)res -= m_P;return res;}constexpr _ModType pow(uint64_t __a, uint64_t __n) const {if constexpr (std::is_same_v<_ModType, uint64_t>)return pow_ld(__a, __n);elsereturn pow_64(__a, __n);}constexpr _ModType pow_64(uint64_t __a, uint64_t __n) const {// assert(m_P < 1ull << 32);_ModType res = 1, b = mod(__a);while (__n) {if (__n & 1) res = multiply_64(res, b);b = multiply_64(b, b);__n >>= 1;}return res;}constexpr _ModType pow_128(uint64_t __a, uint64_t __n) const {_ModType res = 1, b = mod(__a);while (__n) {if (__n & 1) res = multiply_128(res, b);b = multiply_128(b, b);__n >>= 1;}return res;}constexpr _ModType pow_ld(uint64_t __a, uint64_t __n) const {_ModType res = 1, b = mod(__a);while (__n) {if (__n & 1) res = multiply_ld(res, b);b = multiply_ld(b, b);__n >>= 1;}return res;}template <typename _Tp>constexpr _Tp divide(_Tp __a) const {if (__a < m_P) return 0;_Tp res = m_Pinv * __a >> 64;if (__a - res * m_P >= m_P) res++;return res;}template <typename _Tp>constexpr std::pair<_Tp, _Tp> divmod(_Tp __a) const {_Tp quo = (__a * m_Pinv) >> 64, rem = __a - quo * m_P;if (rem >= m_P) {quo++;rem -= m_P;}return {quo, rem};}};using Barrett32 = Barrett<uint32_t>;using Barrett64 = Barrett<uint64_t>;
}
namespace OY {template <typename _ModType>struct _MontgomeryTag;template <>struct _MontgomeryTag<uint32_t> {using long_type = uint64_t;static constexpr uint32_t limit = (1u << 30) - 1;static constexpr uint32_t inv_loop = 4;static constexpr uint32_t length = 32;};template <>struct _MontgomeryTag<uint64_t> {using long_type = __uint128_t;static constexpr uint64_t limit = (1ull << 63) - 1;static constexpr uint32_t inv_loop = 5;static constexpr uint32_t length = 64;};template <typename _ModType>struct Montgomery {using _FastType = _ModType;using _LongType = typename _MontgomeryTag<_ModType>::long_type;_ModType m_P;_ModType m_Pinv;_ModType m_Ninv;Barrett<_ModType> m_brt;constexpr Montgomery() = default;constexpr explicit Montgomery(_ModType __P) : m_P(__P), m_Pinv(__P), m_Ninv(-_LongType(__P) % __P), m_brt(__P) {// assert((__P & 1) && __P > 1 && __P <= _MontgomeryTag<_ModType>::limit);for (int i = 0; i < _MontgomeryTag<_ModType>::inv_loop; i++) m_Pinv *= _ModType(2) - __P * m_Pinv;}constexpr _ModType mod() const { return m_brt.mod(); }constexpr _ModType mod(uint64_t __a) const { return m_brt.mod(__a); }constexpr _FastType init(uint64_t __a) const { return reduce(_LongType(mod(__a)) * m_Ninv); }constexpr _FastType raw_init(uint64_t __a) const { return reduce(_LongType(__a) * m_Ninv); }constexpr _FastType reduce(_LongType __a) const {_FastType res = (__a >> _MontgomeryTag<_ModType>::length) - _ModType(_LongType(_ModType(__a) * m_Pinv) * m_P >> _MontgomeryTag<_ModType>::length);if (res >= mod()) res += mod();return res;}constexpr _ModType reduce(_FastType __a) const {_ModType res = -_ModType(_LongType(__a * m_Pinv) * m_P >> _MontgomeryTag<_ModType>::length);if (res >= mod()) res += mod();return res;}constexpr _FastType multiply(_FastType __a, _FastType __b) const { return reduce(_LongType(__a) * __b); }constexpr _FastType pow(_FastType __a, uint64_t __n) const {_FastType res = reduce(_LongType(1) * m_Ninv);while (__n) {if (__n & 1) res = multiply(res, __a);__a = multiply(__a, __a);__n >>= 1;}return res;}template <typename _Tp>constexpr _Tp divide(_Tp __a) const { return m_brt.divide(__a); }template <typename _Tp>constexpr std::pair<_Tp, _Tp> divmod(_Tp __a) const { return m_brt.divmod(__a); }};using Montgomery32 = Montgomery<uint32_t>;using Montgomery64 = Montgomery<uint64_t>;
}
namespace OY {template <typename _Elem>constexpr bool isPrime(_Elem n) {if (std::is_same_v<_Elem, uint32_t> || n <= UINT32_MAX) {if (n <= 1) return false;if (n == 2 || n == 7 || n == 61) return true;if (n % 2 == 0) return false;Barrett32 brt(n);uint32_t d = (n - 1) >> __builtin_ctz(n - 1);for (auto &&a : {2, 7, 61}) {uint32_t s = d, y = brt.pow_64(a, s);while (s != n - 1 && y != 1 && y != n - 1) {y = brt.multiply_64(y, y);s <<= 1;}if (y != n - 1 && s % 2 == 0) return false;}return true;} else {// assert(n < 1ull < 63);if (n % 2 == 0) return false;Montgomery64 mg(n);uint64_t d = (n - 1) >> __builtin_ctzll(n - 1), one = mg.init(1);for (auto &&a : {2, 325, 9375, 28178, 450775, 9780504, 1795265022}) {uint64_t s = d, y = mg.pow(mg.init(a), s), t = mg.init(n - 1);while (s != n - 1 && y != one && y != t) {y = mg.multiply(y, y);s <<= 1;}if (y != t && s % 2 == 0) return false;}return true;}}constexpr auto isPrime32 = isPrime<uint32_t>;constexpr auto isPrime64 = isPrime<uint64_t>;
}
namespace OY {template <typename _Elem>constexpr _Elem gcd(_Elem a, _Elem b) {if (!a || !b) return a | b;int i = std::__countr_zero(a), j = std::__countr_zero(b), k = std::min(i, j);a >>= i;b >>= j;while (true) {if (a < b) std::swap(a, b);if (!(a -= b)) break;a >>= std::__countr_zero(a);}return b << k;}template <typename _Elem>constexpr _Elem lcm(_Elem a, _Elem b) { return a && b ? a / gcd<_Elem>(a, b) * b : 0; }constexpr auto gcd32 = gcd<uint32_t>;constexpr auto gcd64 = gcd<uint64_t>;constexpr auto lcm32 = lcm<uint32_t>;constexpr auto lcm64 = lcm<uint64_t>;
}
namespace OY {struct Pollard_Rho {static constexpr uint64_t batch = 128;static inline std::mt19937_64 s_rander;template <typename _Elem>static _Elem pick(_Elem __n) {// assert(!isPrime<_Elem>(__n));if (__n % 2 == 0) return 2;static Montgomery<_Elem> mg;if (mg.mod() != __n) mg = Montgomery<_Elem>(__n);std::uniform_int_distribution<_Elem> distribute(2, __n - 1);_Elem v0, v1 = mg.init(distribute(s_rander)), prod = mg.init(1), c = mg.init(distribute(s_rander));for (int i = 1; i < batch; i <<= 1) {v0 = v1;for (int j = 0; j < i; j++) v1 = mg.multiply(v1, v1) + c;for (int j = 0; j < i; j++) {v1 = mg.multiply(v1, v1) + c;prod = mg.multiply(prod, v0 > v1 ? v0 - v1 : v1 - v0);if (!prod) return pick(__n);}if (_Elem g = gcd<_Elem>(prod, __n); g > 1) return g;}for (int i = batch;; i <<= 1) {v0 = v1;for (int j = 0; j < i; j++) v1 = mg.multiply(v1, v1) + c;for (int j = 0; j < i; j += batch) {for (int k = 0; k < batch; k++) {v1 = mg.multiply(v1, v1) + c;prod = mg.multiply(prod, v0 > v1 ? v0 - v1 : v1 - v0);if (!prod) return pick(__n);}if (_Elem g = gcd<_Elem>(prod, __n); g > 1) return g;}}return __n;}template <typename _Elem>static auto decomposite(_Elem __n) {struct node {_Elem prime;uint32_t count;};std::vector<node> res;auto dfs = [&](auto self, _Elem cur) -> void {if (!OY::isPrime<_Elem>(cur)) {_Elem a = pick<_Elem>(cur);self(self, a);self(self, cur / a);} else {auto find = std::find_if(res.begin(), res.end(), [cur](auto x) { return x.prime == cur; });if (find == res.end())res.push_back({cur, 1u});elsefind->count++;}};if (__n % 2 == 0) {res.push_back({2, uint32_t(std::__countr_zero(__n))});__n >>= std::__countr_zero(__n);}if (__n > 1) dfs(dfs, __n);std::sort(res.begin(), res.end(), [](auto &x, auto &y) { return x.prime < y.prime; });return res;}template <typename _Elem>static std::vector<_Elem> getFactors(_Elem __n) {auto pf = decomposite(__n);std::vector<_Elem> res;_Elem count = 1;for (auto [p, c] : pf) count *= c + 1;res.reserve(count);auto dfs = [&](auto self, int i, _Elem prod) -> void {if (i == pf.size())res.push_back(prod);else {auto [p, c] = pf[i];self(self, i + 1, prod);while (c--) self(self, i + 1, prod *= p);}};dfs(dfs, 0, 1);std::sort(res.begin(), res.end());return res;}template <typename _Elem>static _Elem EulerPhi(_Elem __n) {for (auto [p, c] : decomposite(__n)) __n = __n / p * (p - 1);return __n;}};
}
void solve(){int n;cin >> n;map <ll,int> cnt1,cnt2;rep(i,1,n) {cin >> a[i];cnt1[a[i]] ++;}ll ans = 0;for(auto [x,c] : cnt1) {auto fac = OY::Pollard_Rho::decomposite<uint32_t>(x);vector <int> v1,v2;v1.pb(1),v2.pb(1);if(c >= 3) ans += 1ll * c * (c - 1) * (c - 2);for(auto [y,cc] : fac) {for(int i = 1;i + 1 <= cc;i += 2) {int ssz = sz(v1);for(int j = 0;j < ssz;j ++) {v1.pb(v1[j] * y);v2.pb(v2[j] * y * y);}}}sort(all(v1));sort(all(v2));v1.erase(unique(all(v1)),v1.end());v2.erase(unique(all(v2)),v2.end());for(int i = 0;i < sz(v1);i ++) {if(v1[i] == 1 || v2[i] == 1) continue;if(cnt2.count(x / v1[i]) && cnt2.count(x / v2[i])) {ans += 1ll * c * cnt2[x / v1[i]] * cnt2[x / v2[i]];}}cnt2[x] = c;}cout << ans << '\n';
}int main()
{ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);int T = 1;cin >> T;while(T --) solve();
}

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

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

相关文章

十三、51单片机之EEPROM(I2C)

1、EEPROM简介 (1)存储设备类型&#xff1a;ROM、RAM、PROM(可编程ROM)、EPROM(可擦除ROM)、EEPROM(电可擦除ROM)。 (2)为什么需要EEPROM&#xff1f; 某些数据内容我们需要掉电不丢失且在程序运行中可以修改这些数据内容&#xff0c;这就需要用到EEPROM。 (3)EEPROM和flas…

毕业-单片机-嵌入式~三年经历回顾

入行嵌入式软件开发 20年6月疫情第一次缓和、实操51单片机&#xff1b;20年9月郑州实习、温湿度采集类低功耗产品、初次接触ARM Cortex M0/M3 单片机&#xff1b;21年5月毕业来到杭州、不懂应届生的宝贵青春&#xff01;匆匆忙忙进厂&#xff5e;人生中第一个项目&#xff1a;…

简单理解内存分页机制

文章目录 1.CPU寻址方式2.段式内存访问的缺点3.80386两级页表4.PAE三级页表5.x64四级页表6.虚拟内存 思考一个问题&#xff1a;如果没有这样的分页机制时应用程序是怎么访问物理内存地址&#xff1f; 1.CPU寻址方式 Effective Address Base (Index * Scale) Displacement …

CAD DLL 15 crack增加了对SLDASM、FSAT

CAD DLL 15 crack增加了对SLDASM、FSAT 改进的3D&#xff1a; 提高了打开三维文件的速度。 提高了SAT、STEP、SLDPRT、X_T、X_B、OBJ格式的阅读能力。 增加了对SLDASM、FSAT、SAB、SMT、IPT、IFC格式的支持。 增加了导出为SAT、SAB、STL、OBJ格式的功能。 改进了SAT、STE…

在f1tenth仿真中如何实现更快速的跑圈-曲线分析篇

本文使用蓝桥云课&#xff0c;即开即用&#xff0c;如果配置第三方课程资源&#xff0c;通常也在10分钟内完成。 效果如下&#xff1a; 全部参考资料如下&#xff1a; 蓝桥ROS之f1tenth案例学习与调试&#xff08;失败&#xff09; 蓝桥ROS之f1tenth案例学习与调试&#xff…

Salesforce官方_中文学习、考证资源

Salesforce将Trailhead描述为学习热门技能的有趣且免费的平台。该平台有助于缩小技能差距&#xff0c;是所有Salesforce用户的宝藏资源。 Trailhead适合所有学习者。它涵盖了适用于Salesforce任何角色的主题和学习模块&#xff0c;从管理员、开发人员、销售主管到最终用户。学…

第7章 “字典”

1.字典简介 字典是什么&#xff1f; 解答&#xff1a;与集合类似&#xff0c;也是一种存储唯一值的数据结构&#xff0c;但它是以键值对的形式来存储。(键值对是最重要的特性)在Es6中新增了字典&#xff0c;名为Map字典的常用操作&#xff1a;增删改查 const map new Map()/…

免费ChatGPT接入网站-网站加入CHATGPT自动生成关键词文章排名

网站怎么接入chatGPT 要将ChatGPT集成到您的网站中&#xff0c;需要进行以下步骤&#xff1a; 注册一个OpenAI账户&#xff1a;访问OpenAI网站并创建一个账户。这将提供访问API密钥所需的身份验证凭据。 获取API密钥&#xff1a;在您的OpenAI控制台中&#xff0c;您可以找到您…

OSCP-Nickel(爆破pdf、本地http提权)

目录 扫描 HTTP 提权 扫描 FileZilla不接受匿名FTP登录。 端口21上的SSH和3389上的RDP很少是初始入口点,但是如果遇到一些凭据,可以记住这一点。 HTTP 打开Web浏览器并导航到端口8089和3333,用于的HTTP服务器。端口8089似乎是某种类型的开发环境。 单击一个按钮重定向到…

Tomcat 配置与部署

http 协议就是 http 客户端和 http 服务器之间通信的协议 , 而Tomcat 就是 java 圈子中最广泛使用的 http 服务器. 下载Tomcat Tomcat官网 Tomcat 的版本 , 和后续的 servlet 版本是强相关的 , 此处使用 tomcat 8 , 对应的 servlet 就是 3.1 下载一个 zip 压缩包解压缩即可 T…

输入 jupyter notebook 报错 ModuleNotFoundError: No module named ‘pysqlite2‘ 解决方案

今天在cmd命令行中输入jupyter notebook想要打开jupyter时&#xff0c;出现了以下问题&#xff1a;即找不到模块‘pysqlite2’。 找到出问题的文件“sessionmanager.py”&#xff0c;发现出问题的地方在于&#xff1a;尝试导入sqlite3没有导致失败 因此&#xff0c;以下是解决…

java反转字符串的方法

1、首先我们定义一个方法&#xff0c;用来反转字符串。用 public static void &#xff08;String&#xff09;方法初始化一个对象&#xff0c;然后使用 private static &#xff08;&#xff09;方法对该对象进行初始化&#xff0c;并检查是否有某个字符串和字符串本身相同&am…

复现Nginx 解析漏洞

目录 漏洞原理 漏洞复现 编译环境 制作图片马 一&#xff1a;随便弄一张图片 二&#xff1a;准备写一个.php文件&#xff0c;写上木马 三&#xff1a;合成图片马 上传图片马 修复漏洞 漏洞原理 1、 由于nginx.conf的如下配置导致nginx把以’.php’结尾的文件交给fast…

科大讯飞版ChatGPT开始内测《讯飞星火》

科大讯飞版ChatGPT产品&#xff0c;提前交卷了&#xff01; 就在昨夜&#xff0c;讯飞骤然向开发者提供了内测通道&#xff0c;取名为讯飞星火认知大模型对外开启内测。 还有个神奇的英文名字Spark Desk&#xff0c;据说有“火花桌面智能助手”的意思。 申请的过程很简单。用…

leetcode21 - - 合并两个有序链表

文章目录 1.题目描述2.解题思路方法1&#xff1a;方法2&#xff1a; 1.题目描述 题目链接&#xff1a;力扣21&#xff0c;合并两个有序链表 将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。 2.解题思路 方法1&#xff1a;…

Docker安装mysql8.0文档

第一步需要安装Docker基础环境&#xff0c;具体可以看看这篇 docker基础篇 第二步&#xff0c;拉取mysql8.0的镜像 docker pull mysql:8.0 第三步&#xff0c;镜像启动和文件挂载 复制下面命令执行&#xff0c;33006是对外访问暴露的端口&#xff0c;当然你也可以设置为3306…

这个假期有这些游戏就不怕无聊了

1、塞尔达传说旷野之息 Switch端的优秀游戏体验不容错过&#xff01; 人气王《塞尔达传说》&#xff01; 被玩家誉为“唯一让人长大后有种回到童年的感觉的作品”。 豆瓣网友写道&#xff1a;“在雨夜&#xff0c;我在寺庙里看到了一条白龙划过天空&#xff0c;在岩壁上看到了…

SpringBoot拦截器的使用

Hi I’m Shendi SpringBoot拦截器的使用 简介 最近要实现一个全局对象的传递&#xff0c;在接口中直接通过增加函数参数来直接使用的这种方式 之前一直使用的是过滤器&#xff0c;但这种需求过滤器是没有办法实现的&#xff0c;过滤器可以给请求注入字符串&#xff0c;但不能…

JavaEE初阶学习:初识网络

1.网络发展史 1.独立模式 独立模式:计算机之间相互独立&#xff1b; 2.网络互连 随着时代的发展&#xff0c;越来越需要计算机之间互相通信&#xff0c;共享软件和数据&#xff0c;即以多个计算机协同工作来完成业务&#xff0c;就有了网络互连。 网络互连&#xff1a;将多…

yolov5半自动打标签(opencv版本),识别目标画框并将坐标信息保存在xml中

文章目录 1.yolov5预训练模型推理2. opencv边缘检测结果展示 yolov5训练数据集时&#xff0c;需要对数据进行打标签&#xff0c;可以通过两种方法进行半自动化打标签。 1.yolov5预训练模型推理 yolov5预训练模型&#xff1a;将待打标签的图片输入预训练模型中进行推理&#xf…