1. 分布式事务 2. Seata 3. 安装seata
配置数据库
CREATE DATABASE IF NOT EXISTS seata /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTIONN */;
USE seata;------------------------------- The script used when storeM…
题目: 题解:
class Solution {
public:int findMinMoves(vector<int> &machines) {int tot accumulate(machines.begin(), machines.end(), 0);int n machines.size();if (tot % n) {return -1;}int avg tot / n;int ans 0, sum 0;for (…