Codeforces Round 954 (Div. 3) A B C D

A. X Axis

time limit per test: 2 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

You are given three points with integer coordinates x 1 x_1 x1, x 2 x_2 x2, and x 3 x_3 x3 on the X X X axis ( 1 ≤ x i ≤ 10 1 \leq x_i \leq 10 1xi10). You can choose any point with an integer coordinate a a a on the X X X axis. Note that the point a a a may coincide with x 1 x_1 x1, x 2 x_2 x2, or x 3 x_3 x3. Let f ( a ) f(a) f(a) be the total distance from the given points to the point a a a. Find the smallest value of f ( a ) f(a) f(a).

The distance between points a a a and b b b is equal to ∣ a − b ∣ |a - b| ab. For example, the distance between points a = 5 a = 5 a=5 and b = 2 b = 2 b=2 is 3 3 3.

Input

Each test consists of multiple test cases. The first line contains a single integer t t t ( 1 ≤ t ≤ 1 0 3 1 \leq t \leq 10^3 1t103) — the number of test cases. Then follows their descriptions.

The single line of each test case contains three integers x 1 x_1 x1, x 2 x_2 x2, and x 3 x_3 x3 ( 1 ≤ x i ≤ 10 1 \leq x_i \leq 10 1xi10) — the coordinates of the points.

Output

For each test case, output the smallest value of f ( a ) f(a) f(a).

Example

i n p u t \tt input input
8
1 1 1
1 5 9
8 2 8
10 9 3
2 1 1
2 4 1
7 3 5
1 9 4
o u t p u t \tt output output
0
8
6
7
1
3
4
8

Note

In the first test case, the smallest value of f ( a ) f(a) f(a) is achieved when a = 1 a = 1 a=1: f ( 1 ) = ∣ 1 − 1 ∣ + ∣ 1 − 1 ∣ + ∣ 1 − 1 ∣ = 0 f(1) = |1 - 1| + |1 - 1| + |1 - 1| = 0 f(1)=∣11∣+∣11∣+∣11∣=0.

In the second test case, the smallest value of f ( a ) f(a) f(a) is achieved when a = 5 a = 5 a=5: f ( 5 ) = ∣ 1 − 5 ∣ + ∣ 5 − 5 ∣ + ∣ 9 − 5 ∣ = 8 f(5) = |1 - 5| + |5 - 5| + |9 - 5| = 8 f(5)=∣15∣+∣55∣+∣95∣=8.

In the third test case, the smallest value of f ( a ) f(a) f(a) is achieved when a = 8 a = 8 a=8: f ( 8 ) = ∣ 8 − 8 ∣ + ∣ 2 − 8 ∣ + ∣ 8 − 8 ∣ = 6 f(8) = |8 - 8| + |2 - 8| + |8 - 8| = 6 f(8)=∣88∣+∣28∣+∣88∣=6.

In the fourth test case, the smallest value of f ( a ) f(a) f(a) is achieved when a = 9 a = 9 a=9: f ( 10 ) = ∣ 10 − 9 ∣ + ∣ 9 − 9 ∣ + ∣ 3 − 9 ∣ = 7 f(10) = |10 - 9| + |9 - 9| + |3 - 9| = 7 f(10)=∣109∣+∣99∣+∣39∣=7.

Tutorial

易得只要找到的点在其最大值和最小值中间即可

此解法时间复杂度为 O ( n ) \mathcal O(n) O(n),即找最大值和最小值的复杂度

Solution

for _ in range(int(input())):
    a = list(map(int, input().split()))
    print(max(a) - min(a))

B. Matrix Stabilization

time limit per test: 2 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

You are given a matrix of size n × m n \times m n×m, where the rows are numbered from 1 1 1 to n n n from top to bottom, and the columns are numbered from 1 1 1 to m m m from left to right. The element at the intersection of the i i i-th row and the j j j-th column is denoted by a i j a_{ij} aij.

Consider the algorithm for stabilizing matrix a a a:

  1. Find the cell ( i , j ) (i, j) (i,j) such that its value is strictly greater than the values of all its neighboring cells. If there is no such cell, terminate the algorithm. If there are multiple such cells, choose the cell with the smallest value of i i i, and if there are still multiple cells, choose the one with the smallest value of j j j.
  2. Set a i j = a i j − 1 a_{ij} = a_{ij} - 1 aij=aij1.
  3. Go to step 1 1 1.

In this problem, cells ( a , b ) (a, b) (a,b) and ( c , d ) (c, d) (c,d) are considered neighbors if they share a common side, i.e., ∣ a − c ∣ + ∣ b − d ∣ = 1 |a - c| + |b - d| = 1 ac+bd=1.

Your task is to output the matrix a a a after the stabilization algorithm has been executed. It can be shown that this algorithm cannot run for an infinite number of iterations.

Input

Each test consists of multiple sets of input data. The first line contains a single integer t t t ( 1 ≤ t ≤ 1 0 4 1 \leq t \leq 10^4 1t104) — the number of sets of input data. This is followed by their description.

The first line of each set of input data contains two integers n n n and m m m ( 1 ≤ n , m ≤ 100 , n ⋅ m > 1 1 \leq n, m \leq 100, n \cdot m > 1 1n,m100,nm>1) — the number of rows and columns of matrix a a a.

The next n n n lines describe the corresponding rows of the matrix. The i i i-th line contains m m m integers a i 1 , a i 2 , … , a i m a_{i1}, a_{i2}, \ldots, a_{im} ai1,ai2,,aim ( 1 ≤ a i j ≤ 1 0 9 1 \leq a_{ij} \leq 10^9 1aij109).

It is guaranteed that the sum of n ⋅ m n \cdot m nm over all sets of input data does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105.

Output

For each set of input data, output n n n lines with m m m numbers in each line — the values of the cells of matrix a a a after the stabilization algorithm.

Example

i n p u t \tt input input
6
1 2
3 1
2 1
1
1
2 2
1 2
3 4
2 3
7 4 5
1 8 10
5 4
92 74 31 74
74 92 17 7
31 17 92 3
74 7 3 92
7 31 1 1
3 3
1000000000 1 1000000000
1 1000000000 1
1000000000 1 1000000000
o u t p u t \tt output output
1 1
1
1
1 2
3 3
4 4 5
1 8 8
74 74 31 31
74 74 17 7
31 17 17 3
31 7 3 3
7 7 1 1
1 1 1
1 1 1
1 1 1

Note

In the first set of input data, the algorithm will select the cell ( 1 , 1 ) (1, 1) (1,1) twice in a row and then terminate.

In the second set of input data, there is no cell whose value is strictly greater than the values of all neighboring cells.

In the third set of input data, the algorithm will select the cell ( 2 , 2 ) (2, 2) (2,2) and then terminate.

In the fourth set of input data, the algorithm will select the cell ( 1 , 1 ) (1, 1) (1,1) three times and then the cell ( 2 , 3 ) (2, 3) (2,3) twice.

Tutorial

可以一次一次遍历所有元素,根据规则,如果有元素被更改,则进行下一次遍历,如果遍历一次根据都没有更改元素,那么说明矩阵都不能再改变了,即得到答案

此解法时间复杂度为 O ( n m ) \mathcal O(nm) O(nm)

Solution

dx = [0, 0, 1, -1]
dy = [1, -1, 0, 0]

def ok(x, y, n, m):
    return 0 <= x < n and 0 <= y < m

for _ in range(int(input())):
    n, m = map(int, input().split())
    g = [list(map(int, input().split())) for _ in range(n)]
    for i in range(n):
        for j in range(m):
            mx = 0
            for k in range(4):
                x, y = i + dx[k], j + dy[k]
                if ok(x, y, n, m):
                    mx = max(mx, g[x][y])
            g[i][j] = min(g[i][j], mx)
    for gi in g:
        print(*gi)

C. Update Queries

time limit per test: 2 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Let’s consider the following simple problem. You are given a string s s s of length n n n, consisting of lowercase Latin letters, as well as an array of indices i n d ind ind of length m m m ( 1 ≤ i n d i ≤ n 1 \leq ind_i \leq n 1indin) and a string c c c of length m m m, consisting of lowercase Latin letters. Then, in order, you perform the update operations, namely, during the i i i-th operation, you set s i n d i = c i s_{ind_i} = c_i sindi=ci. Note that you perform all m m m operations from the first to the last.

Of course, if you change the order of indices in the array i n d ind ind and/or the order of letters in the string c c c, you can get different results. Find the lexicographically smallest string s s s that can be obtained after m m m update operations, if you can rearrange the indices in the array i n d ind ind and the letters in the string c c c as you like.

A string a a a is lexicographically less than a string b b b if and only if one of the following conditions is met:

  • a a a is a prefix of b b b, but a ≠ b a \neq b a=b;
  • in the first position where a a a and b b b differ, the symbol in string a a a is earlier in the alphabet than the corresponding symbol in string b b b.

Input

Each test consists of several sets of input data. The first line contains a single integer t t t ( 1 ≤ t ≤ 1 0 4 1 \leq t \leq 10^4 1t104) — the number of sets of input data. Then follows their description.

The first line of each set of input data contains two integers n n n and m m m ( 1 ≤ n , m ≤ 1 0 5 1 \leq n, m \leq 10^5 1n,m105) — the length of the string s s s and the number of updates.

The second line of each set of input data contains a string s s s of length n n n, consisting of lowercase Latin letters.

The third line of each set of input data contains m m m integers i n d 1 , i n d 2 , … , i n d m ind_1, ind_2, \ldots, ind_m ind1,ind2,,indm ( 1 ≤ i n d i ≤ n 1 \leq ind_i \leq n 1indin) — the array of indices i n d ind ind.

The fourth line of each set of input data contains a string c c c of length m m m, consisting of lowercase Latin letters.

It is guaranteed that the sum of n n n over all sets of input data does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105. Similarly, the sum of m m m over all sets of input data does not exceed 2 ⋅ 1 0 5 2 \cdot 10^5 2105.

Output

For each set of input data, output the lexicographically smallest string s s s that can be obtained by rearranging the indices in the array i n d ind ind and the letters in the string c c c as you like.

Example

i n p u t \tt input input
4
1 2
a
1 1
cb
4 4
meow
1 2 1 4
zcwz
7 4
abacaba
1 3 5 7
damn
7 10
traktor
7 6 5 4 3 2 1 6 4 2
codeforces
o u t p u t \tt output output
b
cwoz
abdcmbn
ccdeefo

Note

In the first set of input data, you can leave the array i n d ind ind and the string c c c unchanged and simply perform all operations in that order.

In the second set of input data, you can set the array i n d = [ 1 , 1 , 4 , 2 ] ind = [1, 1, 4, 2] ind=[1,1,4,2] and c = c = c= “zczw”. Then the string s s s will change as follows: m e o w → z e o w → c e o w → c e o z → c w o z meow \rightarrow zeow \rightarrow ceow \rightarrow ceoz \rightarrow cwoz meowzeowceowceozcwoz.

In the third set of input data, you can leave the array i n d ind ind unchanged and set $c = $ “admn”. Then the string s s s will change as follows: a b a c a b a → a b a c a b a → a b d c a b a → a b d c m b a → a b d c m b n abacaba \rightarrow abacaba \rightarrow abdcaba \rightarrow abdcmba \rightarrow abdcmbn abacabaabacabaabdcabaabdcmbaabdcmbn.

Tutorial

由于只有最后一次修改会改变每个位置的值,所以只需要将每个靠前的位置的元素变为更小的字符即可

所以可以贪心地对所有可以更改的字符排序,将每个修改过的位置贪心选择更小的字符即可

此解法时间复杂度为 O ( n log ⁡ n ) \mathcal O(n \log n) O(nlogn)

Solution

for _ in range(int(input())):
    n, m = map(int, input().split())
    s = list(input())
    a = sorted(set(list(map(int, input().split()))))
    c = sorted(list(input()))
    idx = 0
    for ai in a:
        s[ai - 1] = c[idx]
        idx += 1
    print(''.join(s))

D. Mathematical Problem

time limit per test: 2 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

You are given a string s s s of length n > 1 n \gt 1 n>1, consisting of digits from 0 0 0 to 9 9 9. You must insert exactly n − 2 n - 2 n2 symbols + + + (addition) or × \times × (multiplication) into this string to form a valid arithmetic expression.

In this problem, the symbols cannot be placed before the first or after the last character of the string s s s, and two symbols cannot be written consecutively. Also, note that the order of the digits in the string cannot be changed. Let’s consider s = 987009 s = 987009 s=987009:

  • From this string, the following arithmetic expressions can be obtained: 9 × 8 + 70 × 0 + 9 = 81 9 \times 8 + 70 \times 0 + 9 = 81 9×8+70×0+9=81, 98 × 7 × 0 + 0 × 9 = 0 98 \times 7 \times 0 + 0 \times 9 = 0 98×7×0+0×9=0, 9 + 8 + 7 + 0 + 09 = 9 + 8 + 7 + 0 + 9 = 33 9 + 8 + 7 + 0 + 09 = 9 + 8 + 7 + 0 + 9 = 33 9+8+7+0+09=9+8+7+0+9=33. Note that the number 09 09 09 is considered valid and is simply transformed into 9 9 9.
  • From this string, the following arithmetic expressions cannot be obtained: + 9 × 8 × 70 + 09 +9 \times 8 \times 70 + 09 +9×8×70+09 (symbols should only be placed between digits), 98 × 70 + 0 + 9 98 \times 70 + 0 + 9 98×70+0+9 (since there are 6 6 6 digits, there must be exactly 4 4 4 symbols).

The result of the arithmetic expression is calculated according to the rules of mathematics — first all multiplication operations are performed, then addition. You need to find the minimum result that can be obtained by inserting exactly n − 2 n - 2 n2 addition or multiplication symbols into the given string s s s.

Input

Each test consists of multiple test cases. The first line contains a single integer t t t ( 1 ≤ t ≤ 1 0 4 1 \leq t \leq 10^4 1t104) — the number of test cases. Then follows their description.

The first line of each test case contains a single integer n n n ( 2 ≤ n ≤ 20 2 \leq n \leq 20 2n20) — the length of the string s s s.

The second line of each test case contains a string s s s of length n n n, consisting of digits from 0 0 0 to 9 9 9.

Output

For each test case, output the minimum result of the arithmetic expression that can be obtained by inserting exactly n − 2 n - 2 n2 addition or multiplication symbols into the given string.

Example

i n p u t \tt input input
18
2
10
2
74
2
00
2
01
3
901
3
101
5
23311
6
987009
7
1111111
20
99999999999999999999
20
00000000000000000000
4
0212
18
057235283621345395
4
1112
20
19811678487321784121
4
1121
4
2221
3
011
o u t p u t \tt output output
10
74
0
1
9
1
19
0
11
261
0
0
0
12
93
12
24
0

Note

In the first four test cases, we cannot add symbols, so the answer will be the original number.

In the fifth test case, the optimal answer looks as follows: 9 × 01 = 9 × 1 = 9 9 \times 01 = 9 \times 1 = 9 9×01=9×1=9.

In the sixth test case, the optimal answer looks as follows: 1 × 01 = 1 × 1 = 1 1 \times 01 = 1 \times 1 = 1 1×01=1×1=1.

In the seventh test case, the optimal answer looks as follows: 2 + 3 + 3 + 11 = 19 2 + 3 + 3 + 11 = 19 2+3+3+11=19.

In the eighth test case, one of the optimal answers looks as follows: 98 × 7 × 0 + 0 × 9 = 0 98 \times 7 \times 0 + 0 \times 9 = 0 98×7×0+0×9=0.

Tutorial

由于需要刚好插入 n − 2 n - 2 n2 个符号,所以其中被运算的若干数字中,有且仅有一个数字是两位数,其余数字均为个位数,所以可以枚举这个两位数,其余均为一位数

然后对这些数字进行计算,如果其中有 0,那么就可以乘以 0,最终答案即为 0 0 0,如果遇到 1,则直接乘以 1,此时数字不变,如果遇到的数字大于 1,那么直接加上这个数即可(如果乘以这个数那么必定比加上这个数大)

此解法时间复杂度为 O ( n 2 ) \mathcal O(n ^ 2) O(n2)

Solution

def f(a):
    if a.count(0):
        return 0
    cnt = 0
    for ai in a:
        if ai > 1:
            cnt += ai
    return max(cnt, 1)

for _ in range(int(input())):
    n = int(input())
    s = list(input())
    ans = 270
    for i in range(n - 1):
        a = []
        for j in range(n):
            if i == j:
                a.append(int(s[j] + s[j + 1]))
            elif j != i + 1:
                a.append(int(s[j]))
        ans = min(ans, f(a))
    print(ans)

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

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

相关文章

fiddler使用

1、设置抓取HTTPS的请求 先选中浏览器Browser---Chrome 默认是不抓https的数据包的 有时我们抓取的的包是https的&#xff0c;不是http的&#xff0c;就要做一些设置 Tools---Options 勾选Capture HTTPS CONNECTs 勾选Decrypt HTTPS traffic 勾选 Ignore server certificat…

视频融合共享平台LntonCVS统一视频接入平台智慧安防应用方案

安防视频监控平台LntonCVS是一款拥有强大拓展性和灵活部署能力的综合管理平台。它支持多种主流标准协议&#xff0c;包括国标GB28181、RTSP/Onvif、RTMP等&#xff0c;同时兼容各厂家的私有协议和SDK&#xff0c;如海康Ehome、海大宇等。LntonCVS不仅具备传统安防视频监控功能&…

Github Page 使用手册(保姆级教程!)

搭建个人网站&#xff1f;没有服务器&#xff1f;那不如尝试一下 Github Page &#xff01; 最近我正好在搭建个人网站&#xff0c;于是就写一篇博客来详细介绍 Github Page 的使用、部署方式吧&#xff01; 一、进入 Github 访问&#xff1a;github.com 如果你没有 github…

动手学深度学习(Pytorch版)代码实践 -卷积神经网络-24深度卷积神经网络AlexNet

24深度卷积神经网络AlexNet import torch from torch import nn import liliPytorch as lp import liliPytorch as lp import matplotlib.pyplot as pltdropout1 0.5 #Alexnet架构 net nn.Sequential(nn.Conv2d(1, 96, kernel_size11, stride4, padding1),nn.ReLU(),nn.MaxPo…

操作系统之混淆知识

提示&#xff1a;文章写完后&#xff0c;目录可以自动生成&#xff0c;如何生成可参考右边的帮助文档 文章目录 一、前言&#x1f680;&#x1f680;&#x1f680;二、正文☀️☀️☀️1.页面大小和页内偏移量之间的关系是什么&#xff1f; 三、总结&#x1f353;&#x1f353;…

如何在写代码中找到乐趣

平时我们写代码呢&#xff0c;多数情况都是流水线式写代码&#xff0c;基本就可以实现业务逻辑了。 如何在写代码中找到乐趣呢&#xff0c;我觉得&#xff0c;最好的方式就是&#xff1a;使用设计模式优化自己的业务代码。 参考资料&#xff1a; 实战&#xff01;工作中常用到…

RAID0、RAID1、RAID5、RAID10、软RAID

硬盘 连续空间 无法 扩容 每个raid对应每个raid卡&#xff0c;没有阵列卡就不能用raid lvm 非连续空间 可以动态扩容 raid 备份&#xff0c; 提高读写性能&#xff0c;不能扩容 raid 是磁盘的集合&#xff0c;按照排列组合的方法不 一&#xff0c;给 raid 去了不同的名字…

操作系统-文件的物理结构(文件分配方式)

文章目录 总览文件块和磁盘块连续分配顺序访问直接访问&#xff08;随机访问&#xff09;为什么连续分配同时支持这两种访问模式&#xff1f; 链接分配隐式链接显示链接小结索引分配链接方案多层索引混合索引小结 总结 总览 文件数据存放在外存中 文件块和磁盘块 文件内通过逻…

ASUS华硕A豆14笔记本电脑I421EAYB,I421EQYB_ADOL14EA工厂模式原厂Win11系统安装包下载

适用型号&#xff1a;ADOL14EA笔记本I421EAYB、I421EQYB 链接&#xff1a;https://pan.baidu.com/s/1krU8m_lbApyUfZQo5E4cCQ?pwd0ewl 提取码&#xff1a;0ewl 华硕原装WIN11系统工厂安装包&#xff0c;带有MyASUS WinRE RECOVERY恢复功能、自带所有驱动、出厂主题壁纸、系…

k8s token加新节点

在 master 节点执行 kubeadm token create --print-join-command得到token和cert&#xff0c;这两个参数在2个小时内可以重复使用&#xff0c;超过以后就得再次生成 kubeadm join apiserver.k8s.com --token mpfjma.4vjjg8flqihor4vt --discovery-token-ca-cert-hash sha…

UML建模笔记

5个视图 设计。类&#xff0c;接口&#xff0c;对象如何协作。实现。组件&#xff0c;运行程序&#xff0c;文档关系。用例。用户功能期望。进程。并发与同步相关进程&#xff0c;线程。部署。部署到计算机。 建模目的 和客户共创追踪需求变更协同开发进度控制持续迭代测试生…

java用pdf.js在线预览pdf文件(jeecg框架)

最近在jeecg框架的后台要做一个pdf在线预览的页面功能&#xff0c;可是每次点预览都是下载&#xff0c;所以就要解决这个问题&#xff0c;现在解决了&#xff0c;记录一下&#xff0c;防止后面踩坑。 先放代码&#xff1a; 下面是点“预览”按钮的点击事件&#xff0c;代码放…

自定义一个MyBaits脱敏插件

自定义一个MyBaits脱敏插件 用于对查询结果中的敏感数据进行脱敏处理。这个插件将拦截ResultSetHandler对象的处理结果&#xff0c;对某些敏感字段进行脱敏。 插件实现步骤 创建脱敏插件类。注册插件。 1. 创建脱敏插件类 首先&#xff0c;我们创建一个自定义插件类 DataM…

Unity面试八股文之寻路算法BFS广度优先搜索

文章目录 广度优先搜索&#xff08;Breadth-First Search, BFS&#xff09;算法 广度优先搜索&#xff08;Breadth-First Search, BFS&#xff09;算法 BFS算法是一种用于图或树的遍历算法。它逐层扩展节点&#xff0c;从起始节点开始&#xff0c;首先访问其所有邻居节点&…

如何从0构建一款类似pytest的工具

Pytest主要模块 Pytest 是一个强大且灵活的测试框架&#xff0c;它通过一系列步骤来发现和运行测试。其核心工作原理包括以下几个方面&#xff1a;测试发现&#xff1a;Pytest 会遍历指定目录下的所有文件&#xff0c;找到以 test_ 开头或 _test.py 结尾的文件&#xff0c;并且…

全网唯一免费无水印AI视频工具!

最近Morph Studio开始免费公测&#xff01;支持高清画质&#xff0c;可以上传语音&#xff0c;同步口型&#xff0c;最重要的是生成的视频没有水印&#xff01; Morph Studio国内就可以访问&#xff0c;可以使用国内邮箱注册&#xff08;我用的163邮箱&#xff09;&#xff0c;…

基于协同过滤的电影推荐与大数据分析的可视化系统

基于协同过滤的电影推荐与大数据分析的可视化系统 在大数据时代&#xff0c;数据分析和可视化是从大量数据中提取有价值信息的关键步骤。本文将介绍如何使用Python进行数据爬取&#xff0c;Hive进行数据分析&#xff0c;ECharts进行数据可视化&#xff0c;以及基于协同过滤算法…

【FFmpeg】avformat_write_header函数

FFmpeg相关记录&#xff1a; 示例工程&#xff1a; 【FFmpeg】调用ffmpeg库实现264软编 【FFmpeg】调用ffmpeg库实现264软解 【FFmpeg】调用ffmpeg库进行RTMP推流和拉流 【FFmpeg】调用ffmpeg库进行SDL2解码后渲染 流程分析&#xff1a; 【FFmpeg】编码链路上主要函数的简单分…

LeetCode 207. 课程表

思路&#xff1a;这是一道拓扑排序问题&#xff0c;拓扑排序听起来可能有点复杂&#xff0c;但实际上它是个相当直观的概念。想象一下&#xff0c;你有很多事情要做&#xff0c;但有些事情必须在另一些事情完成之后才能开始&#xff0c;就像你得先穿上袜子再穿鞋子 拓扑排序就…

【UML用户指南】-23-对高级行为建模-状态机

目录 1、概述 2、状态 2.1、状态的组成 3、转移 3.1、转移的组成 4、高级状态和转移 4.1、进入效应和退出效应 4.2、内部转移 4.3、do活动 4.4、延迟事件 4.5、子状态机 5、子状态 5.1、非正交子状态 5.2、历史状态 5.3、正交子状态 6、分叉与汇合 7、主动对象…