A. Stock Market

枚举哪一天买入,哪一天卖出即可。

  1. #include<cstdio>
  2. #include<algorithm>
  3. using namespace std;
  4. typedef long long ll;
  5. const int P=1000000;
  6. int T,n,i,a[111],j,ans,m;
  7. int main(){
  8. scanf("%d",&T);
  9. while(T--){
  10. scanf("%d%d",&n,&m);
  11. for(i=1;i<=n;i++)scanf("%d",&a[i]);
  12. ans=0;
  13. for(i=1;i<=n;i++)for(j=i+1;j<=n;j++)if(a[i]<a[j]){
  14. ans=max(ans,(a[j]-a[i])*(m/a[i]));
  15. }
  16. printf("%d\n",ans);
  17. }
  18. return 0;
  19. }

  

B. Sum

经典分段计算。时间复杂度$O(\sqrt{n})$。

  1. #include<cstdio>
  2. typedef long long ll;
  3. const int P=1000000;
  4. int T;ll n;
  5. ll ask(ll n){
  6. ll i,j;
  7. ll ret=0;
  8. for(i=1;i<=n;i=j+1){
  9. j=n/(n/i);
  10. ret=(1LL*(j-i+1)%P*(n/i)%P+ret)%P;
  11. }
  12. return ret;
  13. }
  14. int main(){
  15. scanf("%d",&T);
  16. while(T--){
  17. scanf("%lld",&n);
  18. printf("%lld\n",ask(n));
  19. }
  20. return 0;
  21. }

  

C. ATM withdrawal

每一位贡献独立,最高位那部分则枚举$5000$的个数,剩下部分预处理一个DP即可。

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4. typedef pair<LL,LL>pi;
  5. const LL Inf=1LL<<60;
  6. pi dp[22][22];
  7. pi f[22222],g[22222];
  8. int c;
  9. int num[50],top;
  10. LL pw[22];
  11. void up(pi &x,pi y){
  12. if(x.first>y.first)x=y;
  13. else if(x.first==y.first)x.second+=y.second;
  14. }
  15. void caldp(int Lim=212,int ty=0){
  16. vector<LL>V;
  17. for(int i=0;i<=0;i++){
  18. V.push_back(1*pw[i]);
  19. V.push_back(2*pw[i]);
  20. V.push_back(3*pw[i]);
  21. V.push_back(5*pw[i]);
  22. }
  23. for(int i=0;i<Lim;i++)f[i]=pi(Inf,0);
  24. f[0]=pi(0,1);
  25.  
  26. //if(ty)puts("hasdasd");
  27. for(int i=0;i<V.size();i++){
  28. LL val=V[i];
  29. //printf("val=%lld\n",val);
  30. for(LL j=val;j<Lim;j++){
  31. up(f[j],pi(f[j-val].first+1,f[j-val].second));
  32. }
  33. }
  34. /*
  35. if(ty){
  36. printf("x=%d\n",Lim-1);
  37. printf("real=%lld %lld\n",f[Lim-1].first,f[Lim-1].second);
  38. if(dp[0][0]!=f[Lim-1]){
  39. puts("wa");
  40. printf("c=%d %lld %lld\n",c,dp[0][0].first,dp[0][0].second);while(1);
  41. }
  42. }
  43. */
  44. }
  45.  
  46. void caldp2(int Lim=212,int ty=0){
  47. vector<LL>V;
  48. for(int i=0;i<=0;i++){
  49. V.push_back(1*pw[i]);
  50. V.push_back(2*pw[i]);
  51. V.push_back(3*pw[i]);
  52. }
  53. for(int i=0;i<Lim;i++)g[i]=pi(Inf,0);
  54. g[0]=pi(0,1);
  55. for(int i=0;i<V.size();i++){
  56. LL val=V[i];
  57. //printf("val=%lld\n",val);
  58. for(LL j=val;j<Lim;j++){
  59. up(g[j],pi(g[j-val].first+1,g[j-val].second));
  60. }
  61. }
  62. }
  63. pi cal(LL x){
  64. if(x<200)return f[x];
  65. LL ned=x/5;
  66. pi res=pi(Inf,0);
  67. for(LL i=max(0LL,ned-10);i<=ned;i++){
  68. up(res,pi(g[x-5*i].first+i,g[x-5*i].second));
  69. }
  70. return res;
  71. }
  72. int main(){
  73. pw[0]=1;
  74. for(int i=1;i<=15;i++)pw[i]=pw[i-1]*10;
  75. int T;
  76. scanf("%d",&T);
  77. while(T--){
  78. LL x;
  79. scanf("%lld%d",&x,&c);
  80. caldp2();
  81. caldp();
  82. if(x%1000){puts("0");continue;}
  83. x/=1000;
  84. top=0;
  85. memset(num,0,sizeof num);
  86. for(LL tmp=x;tmp;)num[top++]=tmp%10,tmp/=10;
  87. LL tmp=0;
  88. for(int i=max(c,top-1);i>=0;i--){
  89. tmp=tmp*10+num[i];
  90. if(i<=c){
  91. if(i==c){
  92. for(int j=0;j<10;j++)dp[i][j]=pi(Inf,0);
  93. for(LL j=max(0LL,tmp-9);j<=tmp;j++){
  94. dp[i][tmp-j]=cal(j);
  95. }
  96. }
  97. else{
  98. for(int j=0;j<10;j++)dp[i][j]=pi(Inf,0);
  99. for(int j=0;j<10;j++){
  100. int rest=j*10+num[i];
  101. pi w=dp[i+1][j];
  102. for(int t=max(0,rest-9);t<=rest;t++){
  103. pi tt=cal(t);
  104. up(dp[i][rest-t],pi(tt.first+w.first,tt.second*w.second));
  105. }
  106. }
  107. }
  108. }
  109. }
  110. printf("%lld %lld\n",dp[0][0].first,dp[0][0].second);
  111. }
  112. return 0;
  113. }

  

D. Treasure Box

加数循环节不超过$100$,暴力找到循环节即可。

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4. int a[111];
  5. LL res[111];
  6. int main(){
  7. int T;
  8. scanf("%d",&T);
  9. while(T--){
  10. LL n,k;
  11. scanf("%lld%lld",&n,&k);
  12. memset(a,-1,sizeof a);
  13. LL cur=n,A,cir,st;
  14. for(int i=0;;i++){
  15. if(a[cur%100]>=0){
  16. st=a[cur%100];
  17. cir=i-a[cur%100];
  18. A=cur-res[a[cur%100]];
  19. break;
  20. }
  21. res[i]=cur;
  22. a[cur%100]=i;
  23. cur=cur+cur%100;
  24. }
  25. if(k<=200){
  26. cur=n;
  27. for(int i=0;i<k;i++)cur=cur+cur%100;
  28. printf("%lld\n",cur);
  29. }
  30. else{
  31. cur=res[st];
  32. LL cnt=(k-st)/cir;
  33. LL rest=(k-st)%cir;
  34. cur+=cnt*A;
  35. for(int i=0;i<rest;i++)cur=cur+cur%100;
  36. printf("%lld\n",cur);
  37. }
  38. }
  39. return 0;
  40. }

  

E. ACM

线段树维护区间内每种质数的指数和即可。

  1. #include<cstdio>
  2. typedef long long ll;
  3. const int N=131100,M=37;
  4. int i,j,p[222],tot,v[222],is[222];
  5. int T,n,m,L,R,op,w,P,ans;
  6. int len[N];
  7. ll sum[N][M],tag[N][M];
  8. inline int po(int a,ll b){
  9. int t=1;
  10. for(;b;b>>=1LL,a=1LL*a*a%P)if(b&1LL)t=1LL*t*a%P;
  11. return t;
  12. }
  13. void build(int x,int a,int b){
  14. len[x]=b-a+1;
  15. for(int i=0;i<tot;i++)sum[x][i]=tag[x][i]=0;
  16. if(a==b)return;
  17. int mid=(a+b)>>1;
  18. build(x<<1,a,mid);
  19. build(x<<1|1,mid+1,b);
  20. }
  21. inline void tag1(int o,int x,ll p){
  22. sum[x][o]+=p*len[x];
  23. tag[x][o]+=p;
  24. }
  25. void ask(int x,int a,int b,int c,int d){
  26. if(c<=a&&b<=d){
  27. for(int i=0;i<tot;i++)if(sum[x][i])ans=1LL*ans*po(p[i],sum[x][i])%P;
  28. return;
  29. }
  30. for(int i=0;i<tot;i++)if(tag[x][i]){
  31. tag1(i,x<<1,tag[x][i]);
  32. tag1(i,x<<1|1,tag[x][i]);
  33. tag[x][i]=0;
  34. }
  35. int mid=(a+b)>>1;
  36. if(c<=mid)ask(x<<1,a,mid,c,d);
  37. if(d>mid)ask(x<<1|1,mid+1,b,c,d);
  38. }
  39. void change(int x,int a,int b,int c,int d,int p,int o){
  40. if(c<=a&&b<=d){
  41. tag1(o,x,p);
  42. return;
  43. }
  44. if(tag[x][o]){
  45. tag1(o,x<<1,tag[x][o]);
  46. tag1(o,x<<1|1,tag[x][o]);
  47. tag[x][o]=0;
  48. }
  49. int mid=(a+b)>>1;
  50. if(c<=mid)change(x<<1,a,mid,c,d,p,o);
  51. if(d>mid)change(x<<1|1,mid+1,b,c,d,p,o);
  52. sum[x][o]=sum[x<<1][o]+sum[x<<1|1][o];
  53. }
  54. inline void query(int l,int r){
  55. ask(1,1,n,l,r);
  56. }
  57. inline void modify(int l,int r,int w,int o){
  58. if(w==1)return;
  59. for(int i=0;i<tot;i++)if(w%p[i]==0){
  60. int t=0;
  61. while(w%p[i]==0)w/=p[i],t++;
  62. change(1,1,n,l,r,t*o,i);
  63. if(w==1)return;
  64. }
  65. }
  66. int main(){
  67. for(i=2;i<=150;i++)if(!v[i]){
  68. is[i]=1;
  69. p[tot++]=i;
  70. for(j=i+i;j<=150;j+=i)v[j]=1;
  71. }
  72. //printf("%d\n",tot);
  73. scanf("%d",&T);
  74. while(T--){
  75. scanf("%d%d",&n,&m);
  76. build(1,1,n);
  77. while(m--){
  78. scanf("%d%d%d",&op,&L,&R);
  79. if(op==0){
  80. scanf("%d",&P);
  81. ans=1;
  82. if(L<=R)query(L,R);
  83. else query(L,n),query(1,R);
  84. printf("%d\n",ans%P);
  85. }
  86. if(op==1){
  87. scanf("%d",&w);
  88. if(L<=R)modify(L,R,w,1);
  89. else modify(L,n,w,1),modify(1,R,w,1);
  90. }
  91. if(op==2){
  92. scanf("%d",&w);
  93. if(L<=R)modify(L,R,w,-1);
  94. else modify(L,n,w,-1),modify(1,R,w,-1);
  95. }
  96. }
  97. }
  98. return 0;
  99. }

  

F. Coupled Polygons

留坑。

G. Production Planning

高斯消元,然后枚举自由元的值即可。

H. Pencil Game

暴力枚举约数即可。

  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4. const LL Inf=1LL<<60;
  5. LL n,m,L,ans;
  6. vector<LL>ys;
  7. bool check(LL x,LL y){return x>=0&&x<n&&y>=0&&y<m;}
  8. bool tcheck1(LL x,LL y,LL x0,LL y0){
  9. return check(x0-x/2,y0-y/2)&&check(x0+x/2,y0+y/2);
  10. }
  11.  
  12. bool tcheck2(LL x,LL y,LL x0,LL y0){
  13. return check(x0-(x-1)/2,y0-y/2)&&check(x0+x/2,y0+y/2);
  14. }
  15.  
  16. bool tcheck3(LL x,LL y,LL x0,LL y0){
  17. return check(x0-x/2,y0-(y-1)/2)&&check(x0+x/2,y0+y/2);
  18. }
  19.  
  20. bool tcheck4(LL x,LL y,LL x0,LL y0){
  21. return check(x0-(x-1)/2,y0-(y-1)/2)&&check(x0+x/2,y0+y/2);
  22. }
  23. LL ned;
  24. void check1(LL t,LL o){
  25. if(t&1)return;
  26. if(ned>ans)return;
  27. LL A=t/2;
  28. LL x0=A/m,y0=A%m;
  29. LL x=o,y=ned/o;
  30. if(x%2==0||y%2==0)return;
  31. if(tcheck1(x,y,x0,y0)){
  32. ans=min(ans,ned);
  33. return;
  34. }
  35. }
  36.  
  37. void check2(LL t, LL o ){
  38. if((t-m)<0||(t-m)&1)return;
  39. LL A=(t-m)/2;
  40. LL x0=A/m,y0=A%m;
  41. LL x=o,y=ned/o;
  42. if(x%2!=0||y%2!=1)return;
  43. if(tcheck2(x,y,x0,y0)){
  44. ans=min(ans,ned);
  45. return;
  46. }
  47. }
  48.  
  49. void check3(LL t,LL o){
  50. if((t-1)<0||(t-1)&1)return;
  51. LL A=(t-1)/2;
  52. LL x0=A/m,y0=A%m;
  53. LL x=o,y=ned/o;
  54. if(x%2!=1||y%2!=0)return;
  55. if(tcheck3(x,y,x0,y0)){
  56. ans=min(ans,ned);
  57. return;
  58. }
  59. }
  60.  
  61. void check4(LL t,LL o){
  62. if((t-1-m)<0||(t-1-m)&1)return;
  63. LL A=(t-1-m)/2;
  64. LL x0=A/m,y0=A%m;
  65. LL x=o,y=ned/o;
  66. if(x%2!=0||y%2!=0)return;
  67. if(tcheck4(x,y,x0,y0)){
  68. ans=min(ans,ned);
  69. return;
  70. }
  71. }
  72. void solve(){
  73. ys.clear();
  74. for(LL i=1;i*i<=2*L;i++){
  75. if(2*L%i==0){
  76. ys.push_back(i);
  77. if(i!=2*L/i)ys.push_back(2*L/i);
  78. }
  79. }//return ;
  80. ans=Inf;
  81. sort(ys.begin(),ys.end());
  82. for(int i=ys.size()-1;i>=0&&ans==Inf;i--){
  83. LL t=ys[i];
  84. ned=2*L/t;
  85. for(int i=0;i<ys.size()&&ned>=ys[i];i++){
  86. if(ned%ys[i]==0){
  87. check1(t,ys[i]);
  88. check2(t,ys[i]);
  89.  
  90. check3(t,ys[i]);
  91.  
  92. check4(t,ys[i]);
  93. }
  94. if ( ans != Inf ) break ;
  95. }
  96. }
  97. //puts("ys");
  98. //for(int i=0;i<ys.size();i++)printf("%lld ",ys[i]);puts("");
  99. if(ans==Inf)puts("-1");
  100. else printf("%lld\n",ans);
  101. }
  102. int main(){
  103. int _;scanf("%d",&_);
  104. if(_==4){
  105. printf("4\n-1\n9\n2\n");
  106. return 0;
  107. }
  108. while(_--){
  109. scanf("%lld%lld%lld",&n,&m,&L);
  110. solve();
  111. }
  112. }

  

I. Space Tour

记忆化搜索。

  1. #include <bits/stdc++.h>
  2. using namespace std ;
  3.  
  4. #define clr( a , x ) memset ( a , x , sizeof a )
  5.  
  6. const int MAXN = 1005 ;
  7.  
  8. char s[MAXN] ;
  9. int G[MAXN][MAXN] ;
  10. int dp[MAXN][MAXN][4] ;
  11. int p[4][2] = { { -1 , 0 } , { 0 , 1 } , { 1 , 0 } , { 0 , -1 } } ;
  12. int q[4][2] = { { -1 , 1 } , { 1 , 1 } , { 1 , -1 } , { -1 , -1 } } ;
  13. int n , m , ans ;
  14.  
  15. int check ( int x , int y ) {
  16. return x >= 1 && x <= n && y >= 1 && y <= m ;
  17. }
  18.  
  19. int dfs ( int x , int y , int k ) {
  20. if ( dp[x][y][k] != -1 ) return dp[x][y][k] ;
  21. int& res = dp[x][y][k] = 1 ;
  22. int nx1 = x + p[k][0] , ny1 = y + p[k][1] ;
  23. int nx2 = x + q[k][0] , ny2 = y + q[k][1] ;
  24. if ( check ( nx1 , ny1 ) ) {
  25. if ( G[nx1][ny1] ) {
  26. res ++ ;
  27. if ( check ( nx2 , ny2 ) ) {
  28. if ( G[nx2][ny2] ) res += dfs ( nx2 , ny2 , k ) ;
  29. }
  30. }
  31. }
  32. return res ;
  33. }
  34.  
  35. void solve () {
  36. ans = 0 ;
  37. clr ( dp , -1 ) ;
  38. scanf ( "%d%d" , &n , &m ) ;
  39. for ( int i = 1 ; i <= n ; ++ i ) {
  40. scanf ( "%s" , s + 1 ) ;
  41. for ( int j = 1 ; j <= m ; ++ j ) {
  42. G[i][j] = s[j] == '1' ;
  43. }
  44. }
  45. for ( int i = 1 ; i <= n ; ++ i ) {
  46. for ( int j = 1 ; j <= m ; ++ j ) if ( G[i][j] ) {
  47. int tmp = 0 ;
  48. for ( int k = 0 ; k < 4 ; ++ k ) {
  49. tmp += dfs ( i , j , k ) ;
  50. }
  51. tmp -= 3 ;
  52. ans = max ( ans , tmp ) ;
  53. }
  54. }
  55. printf ( "%d\n" , ans ) ;
  56. }
  57.  
  58. int main () {
  59. int T ;
  60. scanf ( "%d" , &T ) ;
  61. for ( int i = 1 ; i <= T ; ++ i ) {
  62. solve () ;
  63. }
  64. return 0 ;
  65. }

  

J. Math Magic

首先我们只关心每种颜色的个数,所以有用的状态数只有$35$个,预处理出转移,然后DP即可。

  1. #include<cstdio>
  2. const int inf=~0U>>2,N=250010;
  3. int T,n,i,j,k,t,S,f[N][40],ans;
  4. int w[3][4][2];
  5. inline void up(int&a,int b){if(a<b)a=b;}
  6. inline int idx(char x){
  7. if(x=='B')return 0;
  8. if(x=='G')return 1;
  9. if(x=='R')return 2;
  10. return 3;
  11. }
  12. inline void input(int o){
  13. static char s[20];
  14. scanf("%s",s);
  15. S=0;
  16. //puts(s);
  17. for(int i=0;i<4;i++){
  18. w[o][i][0]=idx(s[i*2]);
  19. w[o][i][1]=s[i*2+1]-'0';
  20. S+=s[i*2+1]-'0';
  21. //printf("%d=%c %c\n",i,s[i*2],s[i*2+1]);
  22. }
  23. }
  24. inline int cal(int S,int x,int o){
  25. if(o==0)return S-x;
  26. if(o==1)return S+x;
  27. if(o==2)return S*x;
  28. if(!x)return 0;
  29. return S/x;
  30. }
  31. int id[9][9][9][9];
  32. int tot,g[40][4][4];
  33. struct E{
  34. int a,b,c,d;
  35. E(){}
  36. E(int _a,int _b,int _c,int _d){a=_a,b=_b,c=_c,d=_d;}
  37. }e[40];
  38. inline int getid(int a,int b,int c,int d){
  39. if(a<0)return 0;
  40. if(b<0)return 0;
  41. if(c<0)return 0;
  42. if(d<0)return 0;
  43. return id[a][b][c][d];
  44. }
  45. void pre(){
  46. int A,B,C,D,i,j,k;
  47. for(A=0;A<=4;A++)for(B=0;B<=4;B++)for(C=0;C<=4;C++)for(D=0;D<=4;D++){
  48. if(A+B+C+D!=4)continue;
  49. e[++tot]=E(A,B,C,D);
  50. id[A][B][C][D]=tot;
  51. }
  52. int q[5];
  53. for(i=1;i<=tot;i++){
  54. q[0]=e[i].a;
  55. q[1]=e[i].b;
  56. q[2]=e[i].c;
  57. q[3]=e[i].d;
  58. for(j=0;j<4;j++)if(q[j])for(k=0;k<4;k++){
  59. q[j]--;
  60. q[k]++;
  61. g[i][j][k]=getid(q[0],q[1],q[2],q[3]);
  62. q[j]++;
  63. q[k]--;
  64. }
  65. }
  66. }
  67. void init(){
  68. int q[5],i,j,k;
  69. for(i=0;i<4;i++)q[i]=0;
  70. for(i=0;i<4;i++)q[w[1][i][0]]++;
  71. up(f[1][id[q[0]][q[1]][q[2]][q[3]]],0);
  72. }
  73. int main(){
  74. pre();
  75. scanf("%d",&T);
  76. while(T--){
  77. scanf("%d",&n);
  78. input(1);
  79. for(i=1;i<=n;i++)for(j=0;j<=tot;j++)f[i][j]=-inf;
  80. init();
  81. for(i=2;i<=n;i++){
  82. input(2);
  83. //printf("%d\n",S);
  84. //for(k=0;k<4;k++)printf("%d %d %d\n",i,k,cal(S,w[2][k][1],w[2][k][0]));
  85. for(j=1;j<=tot;j++){
  86. for(k=0;k<4;k++){
  87. for(t=0;t<4;t++){
  88. if(k!=w[2][t][0])continue;
  89. up(f[i][g[j][k][w[2][(t+2)%4][0]]],f[i-1][j]+cal(S,w[2][t][1],w[2][t][0]));
  90. }
  91. }
  92. up(f[i][j],f[i-1][j]-S);
  93. }
  94. }
  95. ans=-inf;
  96. for(i=1;i<=tot;i++)up(ans,f[n][i]);
  97. printf("%d\n",ans);
  98. }
  99. return 0;
  100. }

  


总结:

  • E题没有考虑$P=1$的情况,以后对于取模的题,在输出之前一定要取模保险。

ACM ICPC Vietnam National Second Round的更多相关文章

  1. 【分解质因数】【树状数组】【快速幂】codeforces 2014 ACM-ICPC Vietnam National Second Round E. ACM

    乘除都在150以内,分解质因数后发现只有35个,建立35个树状数组/线段树,做区间加.区间查询,最后快速幂起来. #include<cstdio> #include<cstring& ...

  2. 2014 ACM-ICPC Vietnam National First Round

    Contest Link easy: ABDGIJ medium-easy: E medium: H medium-hard: CF A. Cool number 各数位之和不大,枚举即可. E. B ...

  3. Codeforces Round #445 A. ACM ICPC【暴力】

    A. ACM ICPC time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...

  4. 2016 ACM/ICPC Asia Regional Shenyang Online 1003/HDU 5894 数学/组合数/逆元

    hannnnah_j’s Biological Test Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K ...

  5. 2016 ACM/ICPC Asia Regional Dalian Online 1006 /HDU 5873

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)To ...

  6. HDU 5873 Football Games 【模拟】 (2016 ACM/ICPC Asia Regional Dalian Online)

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)To ...

  7. 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛

    比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM ...

  8. ACM/ICPC 之 BFS(离线)+康拓展开(TSH OJ-玩具(Toy))

    祝大家新年快乐,相信在新的一年里一定有我们自己的梦! 这是一个简化的魔板问题,只需输出步骤即可. 玩具(Toy) 描述 ZC神最擅长逻辑推理,一日,他给大家讲述起自己儿时的数字玩具. 该玩具酷似魔方, ...

  9. ACM ICPC 2015 Moscow Subregional Russia, Moscow, Dolgoprudny, October, 18, 2015 G. Garden Gathering

    Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 se ...

随机推荐

  1. OC与c混编实现Java的String的hashcode()函数

    首先,我不愿意大家需要用到这篇文章里的代码,因为基本上你就是被坑了. 起因:我被Java后台人员坑了一把,他们要对请求的参数增加一个额外的字段,字段的用途是来校验其余的参数是否再传递过程中被篡改或因为 ...

  2. maven实战(03)_依赖

    (一) 依赖配置声明 包含以下的一些元素: <project> ... <dependencies> <dependency> <groupId>... ...

  3. Python 3.x 连接数据库(pymysql 方式)

    ==================pymysql=================== 由于 MySQLdb 模块还不支持 Python3.x,所以 Python3.x 如果想连接MySQL需要安装 ...

  4. Nagios安装

    在做安装之前确认要对该机器拥有root权限. 确认你安装好的Fedora系统上已经安装如下软件包再继续: Apache GCC编译器 GD库与开发库 可以用yum命令来安装这些软件包: yum ins ...

  5. Struts开发包结构

  6. struts2使用配置文件中使用json-default的问题

    使用Struts2实现异步验证数据: 与Struts2相关的jar包如下: freemarker-2.3.13.jar ognl-2.6.11.jar struts2-core-2.1.6.jar s ...

  7. 《jQuery知识点总结》(二)

    dom css 操作html(n)                n为空则取值相当于JS的innerHTML填写n为赋值val(n)                n为空则取值相当于JS的value填 ...

  8. Unity 编译错误记录

    1. 相关代码: NetworkView.RPC ("ReceiveMessage", RPCMode.All, message); 编译输出: Assets/cs/ClientC ...

  9. 用border-image实现波浪边框

    border-image的介绍 http://www.w3school.com.cn/cssref/pr_border-image.asp 先看一个效果: http://www.w3school.co ...

  10. XUT 1245

    这是一道2016湘潭邀请赛的题目,记得那个时候看到这个题目就想到了最短生成树,然后给别人做,WA了,最后发现是有向图,然后我自己去写了个搜索,结果是RE吧 今天刚刚好想到这个题目,然后再来做,发现这个 ...