【分層圖 虛擬節點】 P11327 [NOISG 2022 Finals] Voting Cities|普及+

本文涉及知識點

C++圖論

P11327 [NOISG 2022 Finals] Voting Cities

題目描述

你所在的國家的國家主席 L o r d P o o t y \bf{Lord\ Pooty} Lord?Pooty 將要退休了!他希望選擇他的一個兒子作為他的繼承人,出于各方面因素的考慮,他決定進行一次投票!他所在的國家中共有 N N N 個國家,編號從 0 0 0 N ? 1 N-1 N?1,其中 K K K 個城市是可以投票的,第 i i i 個可以投票的城市編號為 T i T_i Ti?

你認為,投票是你作為公民應該做的義務。于是你決定去某一個能投票的城市參與投票!所有城市之間有 E E E 條公路,第 j j j 條公路單向從城市 U j U_j Uj? 通往城市 V j V_j Vj?,通過這條公路需要交過路稅 C j C_j Cj?。幸運的是,為了更好的完成投票,國家頒布了一系列過路稅優惠政策。

具體的來說,你有 5 5 5 種優惠券可以購買,使用第 x x x 種優惠券通過一條過路稅為 y y y 的公路時,只需要付 y × ( 10 x ) % y \times (10x)\% y×(10x)%。但是,由于很多人都想投票,需要使用優惠券,所以每一種優惠券你最多只能買 1 1 1 張。

你是個大忙人,你既不知道從哪個城市出發,也不知道每種優惠券的價格。你現在設想了 Q Q Q 種情況,包括出發城市 S S S 和優惠券價格 P 1 , P 2 , P 3 , P 4 P_1,P_2,P_3,P_4 P1?,P2?,P3?,P4? P 5 P_5 P5?在有些情況下某些優惠券甚至已經被搶光了,你不能購買它們,此時這些無法購買的優惠券的價格將被表示為 ? 1 -1 ?1

現在你需要分別對這 Q Q Q 種情況,輸出到達某一個投票城市的最小花費。請注意,你不一定總是能通過公路到達某一個投票城市,如果不能到達,你應該輸出 ? 1 -1 ?1

輸入格式

第一行,三個整數 N , E , K N,E,K N,E,K

第二行, K K K 個整數,表示 T i T_i Ti?

接下來 E E E 行,每行三個整數 U j , V j , C j U_j,V_j,C_j Uj?,Vj?,Cj?保證 C j C_j Cj? 10 10 10 的倍數。

接下來一行一個整數 Q Q Q

接下來 Q Q Q 行,每行 6 6 6 個整數 S , P 1 , P 2 , P 3 , P 4 , P 5 S,P_1,P_2,P_3,P_4,P_5 S,P1?,P2?,P3?,P4?,P5?

輸出格式

Q Q Q 行,每行一個整數表示答案。

輸入輸出樣例 #1

輸入 #1

3 2 1
2
0 1 100
1 2 200
1
0 10 20 1000 2000 -1

輸出 #1

280

輸入輸出樣例 #2

輸入 #2

2 0 1
1
1
0 -1 -1 -1 -1 -1

輸出 #2

-1

輸入輸出樣例 #3

輸入 #3

6 3 2
4 5
0 4 100
1 4 200
2 5 300
4
0 -1 -1 -1 -1 -1
1 20 40 10 100 4
2 1 2 3 4 0
3 0 -1 0 0 0

輸出 #3

100
104
150
-1

說明/提示

【樣例 #1 解釋】

該樣例滿足 S u b t a s k 4 , 5 , 7 , 8 \tt{Subtask\ 4,5,7,8} Subtask?4,5,7,8 的限制。

對于這種情況,最佳方案是在 1 → 2 1 \to 2 12 的道路上使用一張 2 2 2 類優惠券,在 0 → 1 0 \to 1 01 的道路上使用一張 1 1 1 類優惠券,花費為 200 × ( 1 ? 2 10 ) + 100 × ( 1 ? 1 10 ) % + 10 + 20 = 160 + 90 + 10 + 20 = 280 200 \times (1 - \frac{2}{10})+100 \times (1 - \frac{1}{10})\%+10+20=160+90+10+20=280 200×(1?102?)+100×(1?101?)%+10+20=160+90+10+20=280

【樣例 #2 解釋】

該樣例滿足所有 S u b t a s k \tt{Subtask} Subtask 的限制。

沒有道路可以從出發城市到達一個投票城市,所以輸出 ? 1 -1 ?1

【樣例 #3 解釋】

該樣例滿足 S u b t a s k 7 , 8 \tt{Subtask\ 7,8} Subtask?7,8 的限制。


【數據范圍】

S u b t a s k \tt{Subtask} Subtask分值特殊性質
1 1 1 5 5 5對于所有 i i i P i = ? 1 P_i=-1 Pi?=?1。換句話說,沒有可用的優惠券。 Q = 1 , K = 1 Q=1,K=1 Q=1,K=1
2 2 2 5 5 5對于所有 i i i P i = ? 1 P_i=-1 Pi?=?1。換句話說,沒有可用的優惠券。 K = 1 K=1 K=1
3 3 3 5 5 5對于所有 i i i P i = ? 1 P_i=-1 Pi?=?1。換句話說,沒有可用的優惠券。
4 4 4 5 5 5 Q = 1 , K = 1 Q=1,K=1 Q=1,K=1
5 5 5 5 5 5 K = 1 K=1 K=1
6 6 6 10 10 10對于每種情況,最多有 1 1 1 張優惠券可用。
7 7 7 15 15 15 1 ≤ N ≤ 100 , 1 ≤ E ≤ 1000 1 \le N \le 100,1 \le E \le 1000 1N100,1E1000
8 8 8 50 50 50

對于 100 % 100\% 100% 的數據, 1 ≤ N ≤ 5000 , 0 ≤ E ≤ 10000 , 1 ≤ Q ≤ 100 , 0 ≤ K ≤ N , 0 ≤ T i < N , 1 ≤ C i ≤ 1 0 9 , ? 1 ≤ P i ≤ 1 0 9 1 \le N \le 5000,0 \le E \le 10000,1 \le Q \le 100,0 \le K \le N,0 \le T_i < N,1 \le C_i \le 10^9,-1 \le P_i \le 10^9 1N5000,0E10000,1Q100,0KN,0Ti?<N,1Ci?109,?1Pi?109,且對于所有 1 ≤ i < j ≤ K 1 \le i < j \le K 1i<jK,有 T i =? T j T_i \not = T_j Ti?=Tj?;對于所有 1 ≤ i ≤ E 1 \le i \le E 1iE,保證 C i C_i Ci? 10 10 10 的倍數, 0 ≤ U i , V i < N , U i =? V i 0 \le U_i,V_i < N,U_i\not=V_i 0Ui?,Vi?<N,Ui?=Vi?

分層圖

32層的分層圖。
層內都是沒有優惠的邊。
第0層到第 2 i 2^i 2i層的邊,邊權都是按 P i + 1 P_{i+1} Pi+1?優惠;
第m層,如果 m 位與 ( 1 < < i ) 不成立 m 位與(1<<i)不成立 m位與(1<<i)不成立,則有邊連向 m ∣ ( 1 < < i ) m|(1<<i) m(1<<i)邊權,邊權都是按 P i + 1 P_{i+1} Pi+1?優惠。否則無邊。
性質一:任意0層到m層的路徑,都包括且僅包括一條按P_{i+1}優化的邊,(1<<i)&m成立$

時間復雜度

32層邊數大約M= 1 0 6 10^6 106
如果每個查詢都用迪氏堆優化跑最短路,則時間復雜度:O(QMlogM) 超時。

超級終點

增加一個虛擬終點 E = 32 N E=32N E=32N。所有邊反向,E只向0層的T,邊權為0。以E為起點求最短路。
各查詢的優惠券價格不一樣,如何處理?
建圖時,假定價格是0。
第m層的真實價格:建圖價格+ ∑ ( 1 < < i ) 位與 m ) P i + 1 的購買價格 \sum_{(1<<i)位與m)} P_{i+1}的購買價格 (1<<i)位與m)?Pi+1?的購買價格
時間復雜度降到 M l o g M MlogM MlogM

代碼

核心代碼

#include <iostream>
#include <sstream>
#include <vector>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<string>
#include<algorithm>
#include<functional>
#include<queue>
#include <stack>
#include<iomanip>
#include<numeric>
#include <math.h>
#include <climits>
#include<assert.h>
#include<cstring>
#include<list>
#include<array>#include <bitset>
#include <chrono>
using namespace std::chrono;
using namespace std;template<class T1, class T2>
std::istream& operator >> (std::istream& in, pair<T1, T2>& pr) {in >> pr.first >> pr.second;return in;
}template<class T1, class T2, class T3 >
std::istream& operator >> (std::istream& in, tuple<T1, T2, T3>& t) {in >> get<0>(t) >> get<1>(t) >> get<2>(t);return in;
}template<class T1, class T2, class T3, class T4 >
std::istream& operator >> (std::istream& in, tuple<T1, T2, T3, T4>& t) {in >> get<0>(t) >> get<1>(t) >> get<2>(t) >> get<3>(t);return in;
}template<class T1, class T2, class T3, class T4, class T5 >
std::istream& operator >> (std::istream& in, tuple<T1, T2, T3, T4, T5>& t) {in >> get<0>(t) >> get<1>(t) >> get<2>(t) >> get<3>(t) >> get<4>(t) ;return in;
}template<class T1, class T2, class T3, class T4, class T5, class T6 >
std::istream& operator >> (std::istream& in, tuple<T1, T2, T3, T4, T5, T6>& t) {in >> get<0>(t) >> get<1>(t) >> get<2>(t) >> get<3>(t) >> get<4>(t) >> get<5>(t) ;return in;
}template<class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
std::istream& operator >> (std::istream& in, tuple<T1, T2, T3, T4, T5, T6, T7>& t) {in >> get<0>(t) >> get<1>(t) >> get<2>(t) >> get<3>(t) >> get<4>(t) >> get<5>(t) >> get<6>(t);return in;
}template<class T = int>
vector<T> Read() {int n;cin >> n;vector<T> ret(n);for (int i = 0; i < n; i++) {cin >> ret[i];}return ret;
}
template<class T = int>
vector<T> ReadNotNum() {vector<T> ret;T tmp;while (cin >> tmp) {ret.emplace_back(tmp);if ('\n' == cin.get()) { break; }}return ret;
}template<class T = int>
vector<T> Read(int n) {vector<T> ret(n);for (int i = 0; i < n; i++) {cin >> ret[i];}return ret;
}template<int N = 1'000'000>
class COutBuff
{
public:COutBuff() {m_p = puffer;}template<class T>void write(T x) {int num[28], sp = 0;if (x < 0)*m_p++ = '-', x = -x;if (!x)*m_p++ = 48;while (x)num[++sp] = x % 10, x /= 10;while (sp)*m_p++ = num[sp--] + 48;AuotToFile();}void writestr(const char* sz) {strcpy(m_p, sz);m_p += strlen(sz);AuotToFile();}inline void write(char ch){*m_p++ = ch;AuotToFile();}inline void ToFile() {fwrite(puffer, 1, m_p - puffer, stdout);m_p = puffer;}~COutBuff() {ToFile();}
private:inline void AuotToFile() {if (m_p - puffer > N - 100) {ToFile();}}char  puffer[N], * m_p;
};template<int N = 1'000'000>
class CInBuff
{
public:inline CInBuff() {}inline CInBuff<N>& operator>>(char& ch) {FileToBuf();while (('\r' == *S) || ('\n' == *S) || (' ' == *S)) { S++; }//忽略空格和回車ch = *S++;return *this;}inline CInBuff<N>& operator>>(int& val) {FileToBuf();int x(0), f(0);while (!isdigit(*S))f |= (*S++ == '-');while (isdigit(*S))x = (x << 1) + (x << 3) + (*S++ ^ 48);val = f ? -x : x; S++;//忽略空格換行		return *this;}inline CInBuff& operator>>(long long& val) {FileToBuf();long long x(0); int f(0);while (!isdigit(*S))f |= (*S++ == '-');while (isdigit(*S))x = (x << 1) + (x << 3) + (*S++ ^ 48);val = f ? -x : x; S++;//忽略空格換行return *this;}template<class T1, class T2>inline CInBuff& operator>>(pair<T1, T2>& val) {*this >> val.first >> val.second;return *this;}template<class T1, class T2, class T3>inline CInBuff& operator>>(tuple<T1, T2, T3>& val) {*this >> get<0>(val) >> get<1>(val) >> get<2>(val);return *this;}template<class T1, class T2, class T3, class T4>inline CInBuff& operator>>(tuple<T1, T2, T3, T4>& val) {*this >> get<0>(val) >> get<1>(val) >> get<2>(val) >> get<3>(val);return *this;}template<class T = int>inline CInBuff& operator>>(vector<T>& val) {int n;*this >> n;val.resize(n);for (int i = 0; i < n; i++) {*this >> val[i];}return *this;}template<class T = int>vector<T> Read(int n) {vector<T> ret(n);for (int i = 0; i < n; i++) {*this >> ret[i];}return ret;}template<class T = int>vector<T> Read() {vector<T> ret;*this >> ret;return ret;}
private:inline void FileToBuf() {const int canRead = m_iWritePos - (S - buffer);if (canRead >= 100) { return; }if (m_bFinish) { return; }for (int i = 0; i < canRead; i++){buffer[i] = S[i];//memcpy出錯			}m_iWritePos = canRead;buffer[m_iWritePos] = 0;S = buffer;int readCnt = fread(buffer + m_iWritePos, 1, N - m_iWritePos, stdin);if (readCnt <= 0) { m_bFinish = true; return; }m_iWritePos += readCnt;buffer[m_iWritePos] = 0;S = buffer;}int m_iWritePos = 0; bool m_bFinish = false;char buffer[N + 10], * S = buffer;
};typedef pair<long long, int> PAIRLLI;
class  CHeapDis
{
public:CHeapDis(int n, long long llEmpty = LLONG_MAX / 10) :m_llEmpty(llEmpty){m_vDis.assign(n, m_llEmpty);}void Cal(int start, const vector<vector<pair<int, int>>>& vNeiB){std::priority_queue<PAIRLLI, vector<PAIRLLI>, greater<PAIRLLI>> minHeap;minHeap.emplace(0, start);while (minHeap.size()){const long long llDist = minHeap.top().first;const int iCur = minHeap.top().second;minHeap.pop();if (m_llEmpty != m_vDis[iCur]){continue;}m_vDis[iCur] = llDist;for (const auto& it : vNeiB[iCur]){minHeap.emplace(llDist + it.second, it.first);}}}vector<long long> m_vDis;const long long m_llEmpty;
};class Solution {
public:vector<long long> Ans(int N, vector<int>& T, vector<tuple<int, int, int>>& edge, vector<tuple<int, int, int, int, int, int>>& que) {//本題節點編號從0開始	const int NN = N * 32 + 1;CHeapDis dis(NN);vector <vector<pair<int, int>>> neiBo(NN);auto AddEdge = [&](int m, int m1, int p) {for (const auto& [u, v, c] : edge) {neiBo[N * m + v].emplace_back(N * m1 + u, c / 10 * (10 - p));}};for (int i = 0; i < 32; i++) {//層內邊AddEdge(i, i, 0);}for (int m = 0; m < 32; m++) {//層間邊for (int i = 0; i < 5; i++) {const int m1 = m | (1 << i);if (m1 == m) { continue; }AddEdge(m, m1, i + 1);}}for (const auto& i : T) {neiBo.back().emplace_back(i, 0);}dis.Cal(NN - 1, neiBo);vector<long long> ans;for (const auto& [s, p0, p1, p2, p3, p4] : que){if (dis.m_llEmpty == dis.m_vDis[s]) {ans.emplace_back(-1);continue;}vector<int> P = { p0,p1,p2,p3,p4 };long long cur = dis.m_llEmpty;for (int m = 0; m < 32; m++) {long long buy = 0;for (int j = 0; j < 5; j++) {if (m & (1 << j)) {buy += (-1 == P[j]) ? dis.m_llEmpty : P[j];}}cur = min(cur, dis.m_vDis[N * m + s] + buy);}ans.emplace_back((cur >= dis.m_llEmpty) ? -1 : cur);}return ans;}
};int main() {
#ifdef _DEBUGfreopen("a.in", "r", stdin);
#endif // DEBUG	ios::sync_with_stdio(0); cin.tie(nullptr);//CInBuff<> in; COutBuff<10'000'000> ob;int N,E,K;cin >> N >> E >> K ;vector<int> T = Read<int>(K);auto edge = Read<tuple<int, int, int>>(E);auto que = Read<tuple<int, int, int, int, int,int>>();#ifdef _DEBUG	printf("N=%d", N);Out(T, ",T=");Out(edge, ",edge=");Out(que, ",que=");
#endif // DEBUG		auto res = Solution().Ans(N,T,edge,que);for(const auto& i : res ){cout << i << "\n";}return 0;
}

單元測試

	int N;vector<int> T;vector<tuple<int, int,int>> edge;vector<tuple<int, int, int, int, int,int>> que;TEST_METHOD(TestMethod11){N = 3, T = { 2 }, edge = { {0,1,100},{1,2,200} }, que = { {0,10,20,1000,2000,-1} };auto res = Solution().Ans(N, T, edge, que);AssertV({ 280 }, res);}TEST_METHOD(TestMethod12){N = 2, T = { 1 }, edge = {}, que = { {0,-1,-1,-1,-1,-1} };auto res = Solution().Ans(N, T, edge, que);AssertV({ -1 }, res);}TEST_METHOD(TestMethod13){N = 6, T = { 4,5 }, edge = { {0,4,100},{1,4,200},{2,5,300} }, que = { {0,-1,-1,-1,-1,-1},{1,20,40,10,100,4},{2,1,2,3,4,0},{3,0,-1,0,0,0} };auto res = Solution().Ans(N, T, edge, que);AssertV({100,104,150,-1 }, res);}

擴展閱讀

我想對大家說的話
工作中遇到的問題,可以按類別查閱鄙人的算法文章,請點擊《算法與數據匯總》。
學習算法:按章節學習《喜缺全書算法冊》,大量的題目和測試用例,打包下載。重視操作
有效學習:明確的目標 及時的反饋 拉伸區(難度合適) 專注
聞缺陷則喜(喜缺)是一個美好的愿望,早發現問題,早修改問題,給老板節約錢。
子墨子言之:事無終始,無務多業。也就是我們常說的專業的人做專業的事。
如果程序是一條龍,那算法就是他的是睛
失敗+反思=成功 成功+反思=成功

視頻課程

先學簡單的課程,請移步CSDN學院,聽白銀講師(也就是鄙人)的講解。
https://edu.csdn.net/course/detail/38771
如何你想快速形成戰斗了,為老板分憂,請學習C#入職培訓、C++入職培訓等課程
https://edu.csdn.net/lecturer/6176

測試環境

操作系統:win7 開發環境: VS2019 C++17
或者 操作系統:win10 開發環境: VS2022 C++17
如無特殊說明,本算法用**C++**實現。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/87320.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/87320.shtml
英文地址,請注明出處:http://en.pswp.cn/web/87320.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Web3云服務商安全性怎么選

Web3安全之錨&#xff1a;為何阿里云是企業級應用的首選? 隨著Web3、去中心化金融&#xff08;DeFi&#xff09;和數字資產的浪潮席卷全球&#xff0c;無數開發者和企業涌入這個充滿機遇的新賽道。然而&#xff0c;機遇背后是同樣巨大的安全挑戰。從智能合約漏洞到大規模DDoS…

uniapp加上全局水印

文章目錄 一、效果圖二、創建watermark.js文件三、在main.js中引入四、運行 前言&#xff1a;uniapp頁面加水印你還在傻乎乎的一個個頁面加嗎&#xff0c;今天教你一招&#xff0c;一步到位 一、效果圖 未登錄效果 登錄后效果 二、創建watermark.js文件 這里的水印因為我…

thinkphp8.0七牛云直傳圖片

環境&#xff1a;tp8\php8.3; 服務器&#xff1a;centOS Stream 9; 場景&#xff1a;通過html頁面直傳七牛云服務器&#xff0c;速度更快&#xff1b; <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta na…

Godot x openKylin 全國開發大賽正式啟動

從2023年開始&#xff0c;Godot Hub 每年舉辦一次 Godot Hub Festival 開發大賽&#xff0c;現已成為國內 Godot 社區規模最大的開發比賽。本屆 Godot Hub Festival 2025將與 OpenAtom openKylin 開源社區合作舉辦&#xff0c;定名為 Godot x openKylin 全國開發大賽&#xff0…

工控機Linux修改網口

修改Ip:sudo nmcli connection modify net1-static ipv4.addresses 192.168.200.225/24 修改dns:sudo nmcli connection modify net1-static ipv4.dns 114.114.114.114 修改網關:sudo nmcli connection modify net1-static ipv4.gateway 192.168.200.1 IP生效&#xff1a;nm…

CRMEB Pro版v3.3源碼全開源+PC端+Uniapp前端+搭建教程

一.介紹 crmeb Pro版 v3.3版本正式發布&#xff0c;全新UI重磅上線&#xff0c;煥然一新&#xff0c;不負期待&#xff01;頁面DIY設計功能全面升級&#xff0c;組件更豐富&#xff0c;樣式設計更全面&#xff1b;移動端商家管理&#xff0c;讓商城管理更便捷&#xff0c;還從…

【python】OOP:Object-Oriented Programming

文章目錄 1. 面向對象編程的核心概念1.1 類與對象的關系1.2 封裝&#xff08;Encapsulation&#xff09; 2. 繼承與多態2.1 繼承機制2.2 多重繼承2.3 多態性 3. 特殊方法與運算符重載4. 抽象類與接口4.1 抽象基類 5. 組合與聚合6. 屬性管理6.1 使用property裝飾器6.2 描述符協議…

蒙特卡洛方法:隨機抽樣的藝術與科學

本文由「大千AI助手」原創發布&#xff0c;專注用真話講AI&#xff0c;回歸技術本質。拒絕神話或妖魔化。搜索「大千AI助手」關注我&#xff0c;一起撕掉過度包裝&#xff0c;學習真實的AI技術&#xff01; 蒙特卡洛算法&#xff08;Monte Carlo Method&#xff09;是一類基于隨…

Linux基礎 -- UBI(**Unsorted Block Images**)

UBI&#xff08;Unsorted Block Images&#xff09;是 Linux 中為原始 NAND Flash 設計的一種 邏輯卷管理層&#xff0c;其核心作用是&#xff1a;在 NAND 閃存設備上提供 壞塊管理、擦寫均衡&#xff08;wear leveling&#xff09;和邏輯到物理地址映射等機制&#xff0c;為上…

線程相關函數

思維導圖 1. 創建一個分支線程&#xff0c;在主線程中拷貝文件的前一部分&#xff0c;主線程拷貝后一部分。 2.解讀代碼 info1 from child process_1 info1 from parent process3.解讀代碼&#xff0c;-打印多少次 14次

SeaTunnel 社區月報(5-6 月):全新功能上線、Bug 大掃除、Merge 之星是誰?

在 5 月和 6 月&#xff0c;SeaTunnel 社區迎來了一輪密集更新&#xff1a;2.3.11 正式發布&#xff0c;新增對 Databend、Elasticsearch 向量、HTTP 批量寫入、ClickHouse 多表寫入等多個連接器能力&#xff0c;全面提升了數據同步靈活性。同時&#xff0c;近 100 個修復與優化…

數學建模_非線性規劃

matlab求解調用示例 第二道例題建模 matlab求解 1.matlab只能處理min問題&#xff1a; max兩邊取負號變成min 2. > > >號變成 < < <&#xff1a;兩邊取負號 調用示例 第二道例題建模 目標函數取平方而不取絕對值 后面省略

【BurpSuite 2025最新版插件開發】基礎篇7:數據的持久化存儲

1 前言 歷史章節&#xff1a; 【BurpSuite 2025最新版插件開發】基礎篇1&#xff1a;環境搭建 【BurpSuite 2025最新版插件開發】基礎篇2&#xff1a;插件生命周期與核心接口 【BurpSuite 2025最新版插件開發】基礎篇3&#xff1a;請求攔截和修改簡單示例 【BurpSuite 202…

GPT-4 Turbo集成智能工作流,開啟自動化研究與知識管理新篇章!

目錄 一、系統架構設計二、核心模塊實現1. 智能數據采集引擎2. 自動化研究引擎3. 知識管理系統 三、智能工作流引擎四、關鍵技術實現1. 動態工作流引擎2. 知識圖譜構建 五、企業級部署方案1. 云原生架構2. Docker部署腳本 六、應用案例&#xff1a;藥物研發項目七、性能優化策略…

告別SQL卡頓與混亂!AI如何賦能實時計算?

在當今數據驅動的商業環境中&#xff0c;SQL作為與數據庫交互的核心語言&#xff0c;其編寫效率和質量直接影響著企業的數據決策速度和系統性能。然而&#xff0c;我們在長期的企業服務實踐中發現&#xff0c;數據庫開發人員普遍面臨以下痛點&#xff1a; SQL性能問題頻發&…

LeetCode算法(和中等打的有來有回)——盛最多水的容器

文章目錄 leetcode第11題&#xff1a;盛最多水的容器二次循環代碼 雙指針優化解析代碼 leetcode第11題&#xff1a;盛最多水的容器 二次循環 這道題比較容易想到的就是通過二次循環遍歷所有能盛的水的體積。 代碼 class Solution {public int maxArea(int[] height) {// 記錄…

Karmada 多集群服務發現

一、背景介紹 多集群架構下&#xff0c;不同 Kubernetes 集群間的服務如何互通是核心挑戰。Karmada 支持 Kubernetes Multi?cluster Service APIs&#xff08;MCS&#xff09;&#xff0c;通過 ServiceExport 和 ServiceImport 實現跨集群服務發現與調用&#xff0c;幫助多集…

macOS 26正式發布,全新Liquid Glass設計語言亮相

在全球科技愛好者翹首以盼的WWDC 2025開發者大會上&#xff0c;蘋果公司正式揭開了macOS 26系統的神秘面紗。此次系統更新最令人矚目的&#xff0c;當屬其采用的全新Liquid Glass設計語言&#xff0c;該設計不僅重塑了Mac的視覺風格&#xff0c;更為用戶帶來了一場前所未有的操…

網絡基礎(3)

網絡基礎&#xff08;3&#xff09; 有關進程 1&#xff09;進程是人在系統中的代表&#xff0c;只要把數據給進程&#xff0c;人就相當于拿到了數據 2&#xff09;數據傳輸到主機不是目的&#xff0c;而是手段。到達主機內部&#xff0c;再交給主機內的進程才是目的 上網的…

C語言專題:17.邏輯運算與三目運算符(按位邏輯運算、條件運算符)

? C語言中的邏輯運算符和三目運算符&#xff08;條件運算符&#xff09;是非常常見且基礎的操作符&#xff0c;它們分別用于布爾邏輯運算和簡化條件判斷的表達式。通過合理使用這些運算符&#xff0c;可以使代碼更加簡潔、清晰。本文將重點介紹邏輯運算符、三目運算符和按位邏…