Codeforces Round #665 (Div. 2) 

A. Distance and Axis

如果\(B\)在\(O\)左边,那么只能是定值\(OA\)

如果\(B\)在\(OA\)中间,那么必然小于等于\(OA\)且奇偶性和\(OA\)相同

\(B\)在\(A\)右边的情况显然不如\(B\)和\(A\)重合

所以分\(k\le n\)和\(k>n\)分类讨论即可

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 2e5+7;
  21. void solve(){
  22. int n, k;
  23. sci(n); sci(k);
  24. if(k<=n){
  25. if((k&1)==(n&1)) cout << 0 << endl;
  26. else cout << 1 << endl;
  27. }else cout << k - n << endl;
  28. }
  29. int main(){
  30. #ifndef ONLINE_JUDGE
  31. freopen("Local.in","r",stdin);
  32. freopen("ans.out","w",stdout);
  33. #endif
  34. int tt; for(sci(tt); tt--; solve());
  35. return 0;
  36. }

B. Ternary Sequence

显然要拿\(A\)的\(2\)和\(B\)的\(1\)组合,尽量得到大的值,然后拿\(A\)的\(0\)和\(2\)去和\(B\)的\(2\)组合,尽量避免出现负数,如果\(A\)还有\(1\),\(B\)还有\(2\),那么没办法只能组合了,剩下的数怎么组合贡献都是\(0\)

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 2e5+7;
  21. void solve(){
  22. int x, y, z, a, b, c;
  23. sci(x); sci(y); sci(z); sci(a); sci(b); sci(c);
  24. int ret = min(z,b) * 2;
  25. z -= ret / 2; b -= ret / 2;
  26. int d = min(x,c);
  27. x -= d; c -= d;
  28. d = min(z,c);
  29. z -= d; c -= d;
  30. ret -= c * 2;
  31. cout << ret << endl;
  32. }
  33. int main(){
  34. #ifndef ONLINE_JUDGE
  35. freopen("Local.in","r",stdin);
  36. freopen("ans.out","w",stdout);
  37. #endif
  38. int tt; for(sci(tt); tt--; solve());
  39. return 0;
  40. }

C. Mere Array

考虑三个数\(a,b,c\),\(a\)是数列中最小的数,$b ≡ 0 \mod a \(且\)c≡0\mod a\(,那么通过\)a\(可以使得\)a,b,c$任意排序

所以考虑把原序列排序,找出那些和原序列值不同的位置,如果这些位置上的值都能被最小值整除,那么就可以得到排序后的序列

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 2e5+7;
  21. void solve(){
  22. int n; sci(n);
  23. vi A(n); for(int &x : A) sci(x);
  24. int x = *min_element(all(A));
  25. vi B(A);
  26. sort(all(B));
  27. for(int i = 0; i < n; i++){
  28. if(A[i]==B[i]) continue;
  29. if(A[i]%x!=0){
  30. cout << "NO" << endl;
  31. return;
  32. }
  33. }
  34. cout << "YES" << endl;
  35. }
  36. int main(){
  37. #ifndef ONLINE_JUDGE
  38. freopen("Local.in","r",stdin);
  39. freopen("ans.out","w",stdout);
  40. #endif
  41. int tt; for(sci(tt); tt--; solve());
  42. return 0;
  43. }

D. Maximum Distributed Tree

考虑计算每条边的贡献,可以发现每条边对\(sz_v\cdot (n-sz_v)\)个点对距离有贡献,其中\(v\)为边对应的子节点

考虑把边按贡献数排序,因子也排序,贡献大的赋的值也要尽量大,如果\(m<=n-1\)的话就给前\(m\)大贡献的边赋值对应的因子,否则给后\(n-2\)条边赋值对应小的因子,然后剩下的乘积赋给贡献最大的边

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 2e5+7;
  21. const int MOD = 1e9+7;
  22. vi G[MAXN];
  23. int n, m, sz[MAXN];
  24. vl cont;
  25. void dfs(int u, int par){
  26. sz[u] = 1;
  27. for(int v : G[u]){
  28. if(v==par) continue;
  29. dfs(v,u);
  30. sz[u] += sz[v];
  31. cont << (1ll * sz[v] * (n - sz[v]));
  32. }
  33. }
  34. void solve(){
  35. sci(n);
  36. for(int i = 1; i <= n; i++) G[i].clear();
  37. for(int i = 1; i < n; i++){
  38. int u, v;
  39. sci(u); sci(v);
  40. G[u] << v; G[v] << u;
  41. }
  42. sci(m);
  43. vi f(m);
  44. for(int &x : f) sci(x);
  45. sort(all(f),greater<int>());
  46. cont.clear();
  47. dfs(1,0);
  48. sort(all(cont),greater<LL>());
  49. LL ret = 0;
  50. if(m<=n-1){
  51. for(int i = 0; i < m; i++) ret = (ret + cont[i] % MOD * f[i]) % MOD;
  52. for(int i = m; i < n - 1; i++) ret = (ret + cont[i]) % MOD;
  53. }else{
  54. LL prod = 1;
  55. for(int i = 0; i < m - n + 2; i++) prod = prod * f[i] % MOD;
  56. for(int i = m - n + 2; i < m; i++) ret = (ret + cont[i-m+n-2+1] % MOD * f[i]) % MOD;
  57. ret = (ret + cont[0] % MOD * prod) % MOD;
  58. }
  59. cout << ret << endl;
  60. }
  61. int main(){
  62. #ifndef ONLINE_JUDGE
  63. freopen("Local.in","r",stdin);
  64. freopen("ans.out","w",stdout);
  65. #endif
  66. int tt; for(sci(tt); tt--; solve());
  67. return 0;
  68. }

E. Divide Square

考虑固定横向的边,初始正方形的块数是\(1\),竖着的边和横着的边每有一个交点,都会多分出来一块

所以问题转化为计算交点数量,这个用扫描线就完事了

注意联通正方形两端的边会多分割出一块来

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 1e6+7;
  21. const int lim = 1000000;
  22. struct SegmentTree{
  23. int sum[MAXN<<2], l[MAXN<<2], r[MAXN<<2];
  24. #define ls(rt) rt << 1
  25. #define rs(rt) rt << 1 | 1
  26. void build(int L, int R, int rt = 1){
  27. l[rt] = L, r[rt] = R;
  28. if(L + 1 == R) return;
  29. int mid = (L + R) >> 1;
  30. build(L,mid,ls(rt)); build(mid,R,rs(rt));
  31. }
  32. void modify(int pos, int x, int rt = 1){
  33. sum[rt] += x;
  34. if(l[rt] + 1 == r[rt]) return;
  35. int mid = (l[rt] + r[rt]) >> 1;
  36. if(pos<mid) modify(pos,x,ls(rt));
  37. else modify(pos,x,rs(rt));
  38. }
  39. int qsum(int L, int R, int rt = 1){
  40. if(L>=r[rt] or l[rt]>=R) return 0;
  41. if(L<=l[rt] and r[rt]<=R) return sum[rt];
  42. return qsum(L,R,ls(rt)) + qsum(L,R,rs(rt));
  43. }
  44. }ST;
  45. int n, m;
  46. pii line[MAXN];
  47. vector<pii> vec[MAXN];
  48. void solve(){
  49. sci(n); sci(m);
  50. for(int i = 1; i <= n; i++){
  51. int y; sci(y);
  52. sci(line[y].first), sci(line[y].second);
  53. }
  54. ST.build(0,lim+1);
  55. ST.modify(0,1); ST.modify(lim,1);
  56. LL ret = 1;
  57. for(int i = 1; i <= m; i++){
  58. int x; sci(x);
  59. int a, b; sci(a); sci(b);
  60. if(b-a==lim) ret++;
  61. if(!a){
  62. ST.modify(x,1);
  63. vec[b] << pii(x,-1);
  64. }else vec[a] << pii(x,1);
  65. }
  66. for(int i = 1; i <= lim; i++){
  67. for(auto &p : vec[i]) if(p.second==1) ST.modify(p.first,p.second);
  68. if(line[i].first + line[i].second) ret += ST.qsum(line[i].first,line[i].second+1) - 1;
  69. for(auto &p : vec[i]) if(p.second==-1) ST.modify(p.first,p.second);
  70. }
  71. cout << ret << endl;
  72. }
  73. int main(){
  74. #ifndef ONLINE_JUDGE
  75. freopen("Local.in","r",stdin);
  76. freopen("ans.out","w",stdout);
  77. #endif
  78. solve();
  79. return 0;
  80. }

F. Reverse and Swap

建一棵线段树,显然线段树是满二叉树

考虑\(reverse(k)\)操作,我们可以先打懒标记,然后不断下传,直到遇到线段树上某个节点\(rt\)且\(r_{rt}-l_{rt}=2^k\)的时候,我们可以把\(reverse(k)\)这个操作变为交换两个儿子,然后分别再对两个儿子进行\(reverse(k-1)\)

\(swap(k)\)这个操作也可以打懒标记,然后遇到节点\(rt\)满足\(r_{rt}-l_{rt}=2^{k+1}\)的时候,我们交换两个儿子即可

可以发现两个\(reverse(k)\)可以抵消,两个\(swap(k)\)也可以抵消,所以考虑用二进制来存懒标记,然后用异或来打标记

然后合在一起考虑的时候就分类讨论一下即可

  • 如果只有\(reverse(k)\),直接交换两个儿子,然后分别加上\(reverse(k-1)\)的标记

  • 如果只有\(swap(k-1)\)标记,交换两个儿子就好了

  • 都有的情况,那就不用交换儿子,直接给两个儿子分别加上\(reverse(k-1)\)标记即可

注意要把标记全部下传然后清空

view code
  1. #pragma GCC optimize("O3")
  2. #pragma GCC optimize("Ofast,no-stack-protector")
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. #define INF 0x3f3f3f3f
  6. #define LL long long int
  7. #define vi vector<int>
  8. #define vl vector<LL>
  9. #define all(V) V.begin(),V.end()
  10. #define sci(x) scanf("%d",&x)
  11. #define scl(x) scanf("%I64d",&x)
  12. #define pii pair<int,int>
  13. #define pll pair<LL,LL>
  14. #define cmax(a,b) ((a) = (a) > (b) ? (a) : (b))
  15. #define cmin(a,b) ((a) = (a) < (b) ? (a) : (b))
  16. #define debug(x) cerr << #x << " = " << x << endl
  17. function<void(void)> ____ = [](){ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);};
  18. template <typename T> void operator << (vector<T> &__container, T x){ __container.push_back(x); }
  19. template <typename T> ostream& operator << (ostream &out, vector<T> &__container){ for(T _ : __container) out << _ << ' '; }
  20. const int MAXN = 1e6+7;
  21. int n, q, A[MAXN];
  22. struct SegmentTree{
  23. int ls[MAXN<<2], rs[MAXN<<2], tot, root;
  24. LL sum[MAXN];
  25. int swp[MAXN<<2], rev[MAXN<<2];
  26. #define pushup(rt) sum[rt] = sum[ls[rt]] + sum[rs[rt]]
  27. void build(int L, int R, int &rt){
  28. rt = ++tot;
  29. if(L + 1 == R){
  30. sum[rt] = A[L];
  31. return;
  32. }
  33. int mid = (L + R) >> 1;
  34. build(L,mid,ls[rt]); build(mid,R,rs[rt]);
  35. pushup(rt);
  36. }
  37. void pushdown(int rt, int l, int r){
  38. int len = r - l;
  39. int bit = __builtin_ctz(len);
  40. if(rev[rt]>>bit&1){
  41. if(swp[rt]>>(bit-1)&1){
  42. rev[rt] ^= (1 << bit) ^ (1 << (bit - 1));
  43. swp[rt] ^= (1 << (bit - 1));
  44. }else{
  45. rev[rt] ^= (1 << bit) ^ (1 << (bit - 1));
  46. std::swap(ls[rt],rs[rt]);
  47. }
  48. }else if(swp[rt]>>(bit-1)&1){
  49. swp[rt] ^= (1 << (bit - 1));
  50. std::swap(ls[rt],rs[rt]);
  51. }
  52. rev[ls[rt]] ^= rev[rt]; rev[rs[rt]] ^= rev[rt];
  53. swp[ls[rt]] ^= swp[rt]; swp[rs[rt]] ^= swp[rt];
  54. rev[rt] = swp[rt] = 0;
  55. }
  56. void swap(int k){ swp[root] ^= (1 << k); }
  57. void reverse(int k){ rev[root] ^= (1 << k); }
  58. void modify(int pos, int x, int l, int r, int rt){
  59. if(l + 1 == r){
  60. sum[rt] = x;
  61. return;
  62. }
  63. pushdown(rt,l,r);
  64. int mid = (l + r) >> 1;
  65. if(pos < mid) modify(pos,x,l,mid,ls[rt]);
  66. else modify(pos,x,mid,r,rs[rt]);
  67. pushup(rt);
  68. }
  69. LL qsum(int L, int R, int l, int r, int rt){
  70. if(l>=R or L>=r) return 0;
  71. if(L<=l and r<=R) return sum[rt];
  72. pushdown(rt,l,r);
  73. int mid = (l + r) >> 1;
  74. return qsum(L,R,l,mid,ls[rt]) + qsum(L,R,mid,r,rs[rt]);
  75. }
  76. }ST;
  77. void solve(){
  78. sci(n); sci(q);
  79. for(int i = 0; i < (1 << n); i++) sci(A[i]);
  80. ST.build(0,1<<n,ST.root);
  81. while(q--){
  82. int type; sci(type);
  83. if(type==1){
  84. int x, k; sci(x), sci(k);
  85. ST.modify(x-1,k,0,1<<n,ST.root);
  86. }else if(type==2){
  87. int k; sci(k);
  88. ST.reverse(k);
  89. }else if(type==3){
  90. int k; sci(k);
  91. ST.swap(k);
  92. }else{
  93. int l, r; sci(l); sci(r);
  94. printf("%I64d\n",ST.qsum(l-1,r,0,1<<n,ST.root));
  95. }
  96. }
  97. }
  98. int main(){
  99. #ifndef ONLINE_JUDGE
  100. freopen("Local.in","r",stdin);
  101. freopen("ans.out","w",stdout);
  102. #endif
  103. solve();
  104. return 0;
  105. }

Codeforces Round #665 (Div. 2)的更多相关文章

  1. Codeforces Round #665 (Div. 2) 题解

    Codeforces Round #665 (Div. 2) 题解 写得有点晚了,估计都官方题解看完切掉了,没人看我的了qaq. 目录 Codeforces Round #665 (Div. 2) 题 ...

  2. Codeforces Round #665 (Div. 2)A-C题解

    A. Distance and Axis 题目:http://codeforces.com/contest/1401/problem/A 题解:对于n来说分两种情况,一是奇数,二则是偶数 ①奇数:对于 ...

  3. Codeforces Round #665 (Div. 2) D. Maximum Distributed Tree 题解(贪心+易错)

    题目链接 题目大意 给你一课树,要你给每一条边分权值,每条边的权值大于0,他们的乘积等于k,而且要使得n-1条边1的数量尽可能少,定义 f(u,v)为u到v的边权和求 \(\max \sum_{i=1 ...

  4. Codeforces Round #665 (Div. 2) Distance and Axis、

    题目链接:Distance and Axis 题意:在ox轴上,给出点A的横坐标x,你可以向左或右移动点A(x+1/x-1),问你最小移动A的次数,以使得可以在ox轴上找到B点位置,B点满足从O到B的 ...

  5. Codeforces Round #665 (Div. 2) D - Maximum Distributed Tree dfs贡献记录

    题意: t组输入,每组数据中n个节点构成一棵树,然后给你n-1条边.给你一个m,然后给你m个k的素数因子,你需要给这n-1条边都赋一个权值,这n-1条边的权值之积应该等于k.如果k的素数因子数量小于n ...

  6. Codeforces Round #665 (Div. 2) D. Maximum Distributed Tree (dfs计数,树)

    题意:给你含有\(n\)个节点,\(n-1\)条边的树,以及\(m\)个质数和\(1\),你需要在这\(m\)个质数和一个\(1\)选择数(质数只能选一次,\(1\)可以多选)给\(n-1\)条边赋值 ...

  7. Codeforces Round 665 赛后解题报告(暂A-D)

    Codeforces Round 665 赛后解题报告 A. Distance and Axis 我们设 \(B\) 点 坐标为 \(x(x\leq n)\).由题意我们知道 \[\mid(n-x)- ...

  8. Codeforces Round #366 (Div. 2) ABC

    Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...

  9. Codeforces Round #354 (Div. 2) ABCD

    Codeforces Round #354 (Div. 2) Problems     # Name     A Nicholas and Permutation standard input/out ...

随机推荐

  1. 通过DNSLOG回显验证漏洞

    通过DNSLOG回显验证漏洞 前言 实际渗透测试中,有些漏洞因为没有回显导致无法准确判断漏洞是否存在,可能导致渗透测试人员浪费大量精力在一个并不存在的漏洞上,因此为了验证一些无回显漏洞,可结合DNSl ...

  2. keycloak集群化的思考

    目录 简介 keycloak中的集群 load balancing负载均衡 暴露客户端IP地址 sticky sessions 和 非sticky sessions shared databases ...

  3. LeetCode704 二分查找

    给定一个 n 个元素有序的(升序)整型数组 nums 和一个目标值 target  ,写一个函数搜索 nums 中的 target,如果目标值存在返回下标,否则返回 -1. 示例 1: 输入: num ...

  4. 基于 MPI 的快速排序算法的实现

    完整代码: #include <iostream> #include <cstdlib> #include <ctime> #include <algorit ...

  5. 【Oracle】DRM官方介绍

    DRM 简介 By:  Allen Gao 首先,我们对和DRM 相关的一些概念进行介绍. Buffer: 对于RAC 数据库,当一个数据块被读入到buffer cache后,我们就称其为buffer ...

  6. LeetCode617. 合并二叉树

    题目 1 class Solution { 2 public: 3 TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { 4 if(!t1 && ...

  7. windows下如何安装Python、pandas

    windows下如何安装Python.pandas 本篇主要涵盖以下三部分内容: Python.Pycharm的安装 使用Pycharm创建.运行Python程序 安装pandas 1.Python. ...

  8. 02--Docker配置阿里云镜像加速器

    1.登录阿里云控制台,在产品与服务中收索 "容器镜像服务" 2.点击镜像加速器,CentOS 3.在路径 /etc/docker/daemon.json 下配置加速器地址 4.重新 ...

  9. Py其他内置函数,文件修改

    其他内置函数 1.abs函数,取绝对值 print(abs(-1)) 2.all函数,判断可迭代对象是否全为真,有假直接假 假:0,'',None print(all([1,2,'1'])) prin ...

  10. (04)-Python3之--字典(dict)操作

    1.定义 字典的关键字:dict 字典由多个键和其对应的值构成的 键-值 对组成,每个键值对用冒号 : 分割,每个键值对之间用逗号 , 分割,整个字典包括在花括号 {} 中. {key1:value1 ...