byl太强了,学弟们太强了~全程被吊打,嘤嘤嘤~

A题  Connecting Vertices

http://codeforces.com/problemset/problem/888/F

不会

B题 Local Extrema

http://codeforces.com/problemset/problem/888/A

给一列数字,判断一个数它的左右是否同时比它大,或者同时比它小,若满足的话那么count++,得到最后的count值,那么很明显,直接暴力的遍历一遍就可以了。

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int a[maxn];
12 int main(int argc, char const *argv[])
13 {
14 #ifndef ONLINE_JUDGE
15 freopen("in.txt", "r", stdin);
16 freopen("out.txt", "w", stdout);
17 srand((unsigned int)time(NULL));
18 #endif
19 ios::sync_with_stdio(false);
20 cin.tie(0);
21 int n;
22 cin>>n;
23 for(int i=1;i<=n;i++)
24 cin>>a[i];
25 int ans=0;
26 for(int i=2;i<n;i++)
27 {
28 if(a[i]<a[i-1]&&a[i]<a[i+1])
29 ans++;
30 if(a[i]>a[i-1]&&a[i]>a[i+1])
31 ans++;
32 }
33 cout<<ans<<endl;
34 #ifndef ONLINE_JUDGE
35 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
36 #endif
37 return 0;
38 }

C题 Xor-MST

http://codeforces.com/problemset/problem/888/G

不会

D题 Buggy Robot

http://codeforces.com/problemset/problem/888/B

机器人有四种指令,找出在给出的一大串指令中,最多有多少指令是正确的

找到LR和UD有多少对,乘以2就行了

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int main(int argc, char const *argv[])
12 {
13 #ifndef ONLINE_JUDGE
14 freopen("in.txt", "r", stdin);
15 freopen("out.txt", "w", stdout);
16 srand((unsigned int)time(NULL));
17 #endif
18 ios::sync_with_stdio(false);
19 cin.tie(0);
20 int n;
21 cin>>n;
22 string s;
23 cin>>s;
24 map<char,int>mp;
25 for(int i=0;i<n;i++)
26 mp[s[i]]++;
27 int ans=0;
28 ans+=min(mp['L'],mp['R']);
29 ans+=min(mp['U'],mp['D']);
30 cout<<ans*2<<endl;
31 #ifndef ONLINE_JUDGE
32 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
33 #endif
34 return 0;
35 }

E题 K-Dominant Character

http://codeforces.com/problemset/problem/888/C

给出一个字符串,找出一个最小的长度k,使得每个长度为k的子串中都包含一个相同的字符记录下来每个字符的位置,找两个相同字符的最大距离,对这个最大距离取最小值

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int main(int argc, char const *argv[])
12 {
13 #ifndef ONLINE_JUDGE
14 freopen("in.txt", "r", stdin);
15 freopen("out.txt", "w", stdout);
16 srand((unsigned int)time(NULL));
17 #endif
18 ios::sync_with_stdio(false);
19 cin.tie(0);
20 string s;
21 cin>>s;
22 int l=s.length();
23 vector<int>ve[30];
24 for(int i=0;i<26;i++)
25 ve[i].push_back(-1);
26 for(int i=0;i<l;i++)
27 ve[s[i]-'a'].push_back(i);
28 for(int i=0;i<26;i++)
29 ve[i].push_back(l);
30 int ans=inf;
31 for(int i=0;i<26;i++)
32 {
33 int res=0;
34 int sz=ve[i].size();
35 for(int j=1;j<sz-1;j++)
36 res=max(res,max(ve[i][j]-ve[i][j-1],ve[i][j+1]-ve[i][j]));
37 if(res==0)
38 continue;
39 ans=min(ans,res);
40 }
41 cout<<ans<<endl;
42 #ifndef ONLINE_JUDGE
43 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
44 #endif
45 return 0;
46 }

F题 Maximum Subsequence

http://codeforces.com/problemset/problem/888/E

给出n个数,从这n个数中选出几个数(可以不选),使得这些数的和对m取余后的值最大

题解链接:https://www.cnblogs.com/Friends-A/p/11569017.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int a[maxn];
12 int Left[maxn];
13 int Right[maxn];
14 int cntl,cntr;
15 int n,m;
16 int main(int argc, char const *argv[])
17 {
18 #ifndef ONLINE_JUDGE
19 freopen("in.txt", "r", stdin);
20 freopen("out.txt", "w", stdout);
21 srand((unsigned int)time(NULL));
22 #endif
23 ios::sync_with_stdio(false);
24 cin.tie(0);
25 cin>>n>>m;
26 for(int i=0;i<n;i++)
27 cin>>a[i],a[i]%=m;
28 int res=0;
29 int l,r;
30 l=r=n/2;
31 for(int i=0;i<(1<<r);i++)
32 {
33 res=0;
34 for(int j=0;j<r;j++)
35 if(i>>j&1)
36 res+=a[j],res%=m;
37 Left[cntl++]=res;
38 }
39 res=0;
40 r=n;
41 int num=r-l+1;
42 for(int i=0;i<(1<<num);i++)
43 {
44 res=0;
45 for(int j=0;j<num;j++)
46 if(i>>j&1)
47 res+=a[l+j],res%=m;
48 Right[cntr++]=res;
49 }
50 Left[cntl++]=0;
51 Right[cntr++]=0;
52 sort(Left,Left+cntl);
53 sort(Right,Right+cntr);
54 cntl=unique(Left,Left+cntl)-Left;
55 cntr=unique(Right,Right+cntr)-Right;
56 int ans=0;
57 for(int i=0;i<cntl;i++)
58 {
59 int res=m-Left[i]-1;
60 int pos=upper_bound(Right,Right+cntr,res)-Right;
61 int num=Right[pos-1];
62 ans=max(ans%m,(num+Left[i])%m);
63 }
64 cout<<ans<<endl;
65 #ifndef ONLINE_JUDGE
66 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
67 #endif
68 return 0;
69 }

G题 Almost Identity Permutations

http://codeforces.com/problemset/problem/888/D

给出n的全排列,求有多少种排列,满足至少n−k个位置上的数和下标相同(下标从1开始)

错排公式+组合数

题解链接:https://www.cnblogs.com/Friends-A/p/11569153.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 ll C(int n,int m)
12 {
13 ll fenmu=1LL;
14 ll fenzi=1LL;
15 for(int i=1;i<=m;i++)
16 {
17 fenmu=1LL*fenmu*(n-i+1);
18 fenzi=1LL*fenzi*i;
19 }
20 return fenmu/fenzi;
21 }
22 int main(int argc, char const *argv[])
23 {
24 #ifndef ONLINE_JUDGE
25 freopen("in.txt", "r", stdin);
26 freopen("out.txt", "w", stdout);
27 srand((unsigned int)time(NULL));
28 #endif
29 ios::sync_with_stdio(false);
30 cin.tie(0);
31 int n,k;
32 cin>>n>>k;
33 ll ans=0;
34 if(k>=1)
35 ans+=1;
36 if(k>=2)
37 ans+=(n*(n-1)/2);
38 if(k>=3)
39 ans+=2*C(n,3);
40 if(k>=4)
41 ans+=9*C(n,4);
42 cout<<ans<<endl;
43 #ifndef ONLINE_JUDGE
44 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
45 #endif
46 return 0;
47 }

H题 Alyona and Spreadsheet

http://codeforces.com/problemset/problem/777/C

给出一个n×m的矩阵,判断第l行~第r行中是否有一列是非递减的

预处理每一行能往上延伸到的位置,注意矩阵的存法

题解链接:https://www.cnblogs.com/Friends-A/p/11569247.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 vector<int>ve[maxn];
12 // 当前行能往上延伸的最高位置
13 int can[maxn];
14 // 当前列能往上的最高位置
15 int line[maxn];
16 int main(int argc, char const *argv[])
17 {
18 #ifndef ONLINE_JUDGE
19 freopen("in.txt", "r", stdin);
20 freopen("out.txt", "w", stdout);
21 srand((unsigned int)time(NULL));
22 #endif
23 ios::sync_with_stdio(false);
24 cin.tie(0);
25 int n,m;
26 cin>>n>>m;
27 int x;
28 for(int i=0;i<m;i++)
29 ve[0].push_back(0);
30 for(int i=1;i<=n;i++)
31 for(int j=0;j<m;j++)
32 cin>>x,ve[i].push_back(x);
33 for(int i=1;i<=n;i++)
34 {
35 can[i]=i;
36 for(int j=0;j<m;j++)
37 {
38 int now_num=ve[i][j];
39 int up_num=ve[i-1][j];
40 if(now_num<up_num)
41 line[j]=i;
42 can[i]=min(can[i],line[j]);
43 }
44 }
45 int t;
46 cin>>t;
47 while(t--)
48 {
49 int l,r;
50 cin>>l>>r;
51 if(can[r]>l)
52 cout<<"No\n";
53 else
54 cout<<"Yes\n";
55 }
56 #ifndef ONLINE_JUDGE
57 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
58 #endif
59 return 0;
60 }

I题 Shell Game

http://codeforces.com/problemset/problem/777/A

现在一共有三个小盒子,其中有一个盒子中有小球.一共进行了n次操作,操作规律有:

①奇数次操作,交换第一个和中间的盒子。

②偶数次操作,交换第三个和中间的盒子。

现在已知操作了n次之后小球在x号盒子中(0,1,2),问初始的时候小球在哪里

循环节,每六个数字一个循环

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int main(int argc, char const *argv[])
12 {
13 #ifndef ONLINE_JUDGE
14 freopen("in.txt", "r", stdin);
15 freopen("out.txt", "w", stdout);
16 srand((unsigned int)time(NULL));
17 #endif
18 ios::sync_with_stdio(false);
19 cin.tie(0);
20 int a[6][3]={{0,1,2},{1,0,2},{1,2,0},{2,1,0},{2,0,1},{0,2,1}};
21 int n,x;
22 cin>>n>>x;
23 n%=6;
24 cout<<a[n][x]<<endl;
25 #ifndef ONLINE_JUDGE
26 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
27 #endif
28 return 0;
29 }

J题 Hanoi Factory

http://codeforces.com/problemset/problem/777/E

有n个空心圆柱体,第i个圆柱体的内径、外径、高分别为:ai,bi,hi。将这些圆柱体堆起来,要求:从上到下,外径非递减,并且上面的外径小于下面的内径。问最高能堆多高

贪心,用栈维护

题解链接:https://www.cnblogs.com/Friends-A/p/11571769.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 struct wzy
12 {
13 int a,b,h;
14 }p[maxn];
15 bool cmp(wzy u,wzy v)
16 {
17 if(u.b==v.b)
18 {
19 if(u.a==v.a)
20 return u.h>v.h;
21 return u.a>v.a;
22 }
23 return u.b>v.b;
24 }
25 int main(int argc, char const *argv[])
26 {
27 #ifndef ONLINE_JUDGE
28 freopen("/home/wzy/in.txt", "r", stdin);
29 freopen("/home/wzy/out.txt", "w", stdout);
30 srand((unsigned int)time(NULL));
31 #endif
32 ios::sync_with_stdio(false);
33 cin.tie(0);
34 int n;
35 cin>>n;
36 for(int i=1;i<=n;i++)
37 cin>>p[i].a>>p[i].b>>p[i].h;
38 sort(p+1,p+1+n,cmp);
39 ll ans=1LL*p[1].h;
40 ll sum=1LL*p[1].h;
41 stack<wzy>st;
42 st.push(p[1]);
43 for(int i=2;i<=n;i++)
44 {
45 while(!st.empty()&&(st.top().a>=p[i].b||st.top().b<p[i].b))
46 {
47 sum-=1LL*st.top().h;
48 st.pop();
49 }
50 sum+=1LL*p[i].h;
51 st.push(p[i]);
52 ans=max(ans,sum);
53 }
54 cout<<ans<<endl;
55 #ifndef ONLINE_JUDGE
56 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
57 #endif
58 return 0;
59 }

K题 Cloud of Hashtags

http://codeforces.com/contest/777/problem/D

n个字符串,要求不改变位置,删除最少的字符串的后缀,使这些字符串按照字典序非递减的顺序排列

暴力即可

题解链接:https://www.cnblogs.com/Friends-A/p/11569328.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 vector<string>ve;
12 vector<string>ans;
13 int get_place(string s1,string s2)
14 {
15 int l1=s1.length();
16 int l2=s2.length();
17 int i;
18 for(i=0;i<min(l2,l1);i++)
19 {
20 if(s1[i]<s2[i])
21 return l1;
22 if(s1[i]==s2[i])
23 continue;
24 if(s1[i]>s2[i])
25 return i;
26 }
27 if(i==l2)
28 {
29 if(l1>l2)
30 {
31 if(s1[i-1]==s2[i-1])
32 return l2;
33 else
34 return l1;
35 }
36 }
37 return l1;
38 }
39 int main(int argc, char const *argv[])
40 {
41 #ifndef ONLINE_JUDGE
42 freopen("in.txt", "r", stdin);
43 freopen("out.txt", "w", stdout);
44 srand((unsigned int)time(NULL));
45 #endif
46 ios::sync_with_stdio(false);
47 cin.tie(0);
48 int n;
49 cin>>n;
50 string s;
51 for(int i=0;i<n;i++)
52 {
53 cin>>s;
54 ve.push_back(s);
55 }
56 string s1,s2;
57 ans.push_back(ve[n-1]);
58 for(int i=n-2;i>=0;i--)
59 {
60 s1=ve[i];
61 s2=ans[n-(i+2)];
62 int pos=get_place(s1,s2);
63 string ss;
64 ss=s1.substr(0,pos);
65 ans.push_back(ss);
66 }
67 for(int i=n-1;i>0;i--)
68 cout<<ans[i]<<endl;
69 cout<<ve[n-1]<<endl;
70 #ifndef ONLINE_JUDGE
71 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
72 #endif
73 return 0;
74 }

L题 Game of Credit Cards

http://codeforces.com/contest/777/problem/B

Sherlock和Moriarty有n张卡片,每个卡片上有一个数字,现在有Sherlock和Moriarty 两个人在比较这些卡片上的数字大小,小的数字需要接受惩罚,Sherlock的卡片顺序是固定的,Moriarty的卡片顺序可以随意变动,求Moriarty的最小接受惩罚次数是多少,Sherlock最大惩罚对方的次数是多少

排序比较即可

题解链接:https://www.cnblogs.com/Friends-A/p/11569436.html

 1 #include <bits/stdc++.h>
2 #define ll long long
3 #define ull unsigned long long
4 #define ms(a,b) memset(a,b,sizeof(a))
5 const int inf=0x3f3f3f3f;
6 const ll INF=0x3f3f3f3f3f3f3f3f;
7 const int maxn=1e6+10;
8 const int mod=1e9+7;
9 const int maxm=1e3+10;
10 using namespace std;
11 int s[maxn],m[maxn];
12 int nums[100],numm[100];
13 int main(int argc, char const *argv[])
14 {
15 #ifndef ONLINE_JUDGE
16 freopen("in.txt", "r", stdin);
17 freopen("out.txt", "w", stdout);
18 srand((unsigned int)time(NULL));
19 #endif
20 ios::sync_with_stdio(false);
21 cin.tie(0);
22 int n;
23 string s1,s2;
24 cin>>n;
25 cin>>s1>>s2;
26 for(int i=0;i<n;i++)
27 s[i]=s1[i]-'0',m[i]=s2[i]-'0';
28 sort(s,s+n);
29 sort(m,m+n);
30 int pos1=0;
31 int pos2=0;
32 int res1=0;
33 int res2=0;
34 for(int i=0;i<n;i++)
35 {
36 if(pos1>=n&&pos2>=n)
37 break;
38 while(pos1<n&&m[pos1]<s[i])
39 pos1++;
40 while(pos2<n&&m[pos2]<=s[i])
41 pos2++;
42 if(pos1<n)
43 res1++,pos1++;
44 if(pos2<n)
45 res2++,pos2++;
46 }
47 cout<<n-res1<<endl;
48 cout<<res2<<endl;
49 #ifndef ONLINE_JUDGE
50 cerr<<"Time elapsed: "<<1.0*clock()/CLOCKS_PER_SEC<<" s."<<endl;
51 #endif
52 return 0;
53 }

 

2019HPU-ICPC-Training-1的更多相关文章

  1. sdut 2162:The Android University ACM Team Selection Contest(第二届山东省省赛原题,模拟题)

    The Android University ACM Team Selection Contest Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里 ...

  2. SPOJ VLATTICE Visible Lattice Points (莫比乌斯反演基础题)

    Visible Lattice Points Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at ...

  3. HDU 4251 The Famous ICPC Team Again 主席树

    The Famous ICPC Team Again Problem Description   When Mr. B, Mr. G and Mr. M were preparing for the ...

  4. HDOJ 4251 The Famous ICPC Team Again

    划分树水题..... The Famous ICPC Team Again Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 3276 ...

  5. Gym101889B. Buggy ICPC(打表)

    比赛链接:传送门 题目: Problem B – Buggy ICPC Author : Gabriel Poesia, Brasil Alan Curing is a famous sports p ...

  6. HDU 2018 Multi-University Training Contest 3 Problem A. Ascending Rating 【单调队列优化】

    任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6319 Problem A. Ascending Rating Time Limit: 10000/500 ...

  7. HDU 4251 The Famous ICPC Team Again(划分树)

    The Famous ICPC Team Again Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 32768/32768 K ( ...

  8. 2017 Multi-University Training Contest - Team 4

    日常绝望系列 Questionnaire HDU - 6075 In order to get better results in official ACM/ICPC contests, the te ...

  9. hdu 4251 The Famous ICPC Team Again划分树入门题

    The Famous ICPC Team Again Time Limit: 30000/15000 MS (Java/Others)    Memory Limit: 32768/32768 K ( ...

  10. 2015 Multi-University Training Contest 3 hdu 5326 Work

    Work Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

随机推荐

  1. springcloud - alibaba快速上手 - 更新完毕

    1.简单对比一下springcloud与springcloud-alibaba 2.准备知识 官网:https://nacos.io/zh-cn/ 查看cloud和springboot的对应关系 ht ...

  2. 日常Java 2021/10/1

    正则表达式 \cx匹配由x指明的控制字符.例如,lcM匹配一个Control-M或回车符.x的值必须为A-Z或a-z之一.否则,将c视为一个原义的'℃'字符.\f匹配--个换页符.等价于\xOc和\c ...

  3. 大数据学习day29-----spark09-------1. 练习: 统计店铺按月份的销售额和累计到该月的总销售额(SQL, DSL,RDD) 2. 分组topN的实现(row_number(), rank(), dense_rank()方法的区别)3. spark自定义函数-UDF

    1. 练习 数据: (1)需求1:统计有过连续3天以上销售的店铺有哪些,并且计算出连续三天以上的销售额 第一步:将每天的金额求和(同一天可能会有多个订单) SELECT sid,dt,SUM(mone ...

  4. 「译」 .NET 6 中 gRPC 的新功能

    gRPC是一个现代的.跨平台的.高性能的 RPC 框架.gRPC for .NET 构建在 ASP.NET Core 之上,是我们推荐的在 .NET 中构建 RPC 服务的方法. .NET 6 进一步 ...

  5. D3基础入门四-事件处理

    6.5.0版 .on("mouseover", function(e,d) e: {"isTrusted":true} 第二个参考才是数据,但这在不同的环境可能 ...

  6. OC-代理,字符串

    总结 编号 标题 内容 一 protocol protocol 基本概念/语法格式/protocol和继承区别/使用注意/基协议/@required和@optional关键字/类型限制 二 代理设计模 ...

  7. 京东消息中间件JMQ(转)

    http://blog.csdn.net/javahongxi/article/details/54411464 [京东技术]京东的MQ经历了JQ->AMQ->JMQ的发展,其中JQ的基于 ...

  8. Mycat的事务异常:Caused by: java.sql.SQLException: Transaction error, need to rollback.Distributed transaction is disabled!

    工作中踩到的一个坑 ,一个报错,导致整个服务不能用.工程部署四个节点,请求是按轮询机制分发的,所以请求四次报错,整个系统瘫痪.记录下 . 项目环境:spring +Mybaties +mycat +D ...

  9. 详解 Java I/O 与装饰者模式

    1.I/O分类与装饰者模式 基本java I/O包含两种类型的流,字节流(inputStream.outputStream)与字符流(Writer,Reader),关于I/O操作类的设计,用到了装饰者 ...

  10. 文件系统系列学习笔记 - inode/dentry/file/super(2)

    此篇文章主要介绍下linux 文件系统下的主要对象及他们之间的关系. 1 inode inode结构中主要包含对文件或者目录原信息的描述,原信息包括但不限于文件大小.文件在磁盘块中的位置信息.权限位. ...