// 深夜补水题,清早(雾)写水文

A. Automatic Door

题意

\(n(n\leq 1e9)\)个\(employee\)和\(m(m\leq 1e5)\)个\(client\)要进门,\(employee\)进门的时刻为\(a,2a,...,.na\),\(client\)进门的时间则由输入数据给定。

这个门很厉害,是个自动门。如果第\(k\)时刻有人要进门,那么它会在第\(k\)时刻打开,在第\(k+d\)时刻再关闭,在\([k,k+d]\)时刻要进门的人都能在这段期间进门。

问门会打开多少次。

思路

因为\(n\)太大了,所以显然不可能将\(n+m\)个数存下来再扫描,况且\(employee\)进门的时间还是有规律的。

所以可以考虑根据每个\(client\)进门的时间去算前一段时间内为了满足\(employee\)以及当前这个\(client\)进门的需求开了多少次门,以及这个门一直开到了什么时候。

维护当前门可以持续开到的时间\(last\)搞一搞即可。

假设上次处理到的时间为\(last\),当前\(client\)要进门的时间为\(t\).

如果\(last\geq t\),那么直接continue;

若存在\(k\)满足\(last\lt k_{min}a\lt ...\lt k_{max}a\leq t\),说明中间有\([min,max]个employee\)要进门。又根据\(a\)与\(d\)的关系知门每开一次能让\(k=d/a+1\)个\(employee\)进门,再讨论一下为最后一个\(employee\)开的门能否让当前的\(client\)也进门即可。这样就求出了这一整段的开门次数以及维护了当前的达到的\(last\)时间。

Code

  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4. int main() {
  5. LL n, m, a, d;
  6. scanf("%I64d%I64d%I64d%I64d", &n, &m, &a, &d);
  7. LL k = d/a+1, ans = 0, last = 0;
  8. for (int i = 0; i < m; ++i) {
  9. LL t;
  10. scanf("%I64d", &t);
  11. if (t <= last) continue;
  12. if (t < a) { last = t + d, ++ans; continue; }
  13. LL kmin = last/a+1, kmax = t/a;
  14. if (kmin <= kmax && kmin <= n) {
  15. kmax = min(kmax, n);
  16. LL delk = kmax-kmin+1;
  17. LL cnt = ceil(1.0*delk / k)-1;
  18. ans += cnt;
  19. kmin += cnt*k;
  20. if (kmin*a+d >= t) last = kmin*a+d, ++ans;
  21. else last = t+d, ans += 2;
  22. }
  23. else last = t + d, ++ans;
  24. }
  25. LL b = last / a + 1;
  26. if (b <= n) ans += ceil(1.0*(n-b+1) / k);
  27. printf("%I64d\n", ans);
  28. return 0;
  29. }

E. Field of Wonders

题意

规定游戏规则为:有一个未知字符串,玩家操作若干次,每次操作猜一个字母,如果这个字符串里面有这个字母,那么所有位置的该字符都会显示出来。

现在给定一个游戏进行到中途某一阶段时该字符串变成的样子(数据保证至少还有一个位置的字符没有被猜出来),再给定一个字符串的集合。问下一步玩家有多少种猜的选择,使得保证能使至少一个位置的字符再多显示出来。

思路

题意即为,问有多少个 还没猜过的 字符 在 所有与当前局面匹配的字符串中 全部出现过

直接统计即可。

注意

判断与当前局面匹配的字符串时,需要进行两个判断:

首先,很显然的,要求猜出来的显示出来的(即非*处对应的)字符是一样的。

其次,因为游戏规定,一旦猜中某个字符那么所有位置的该字符都会显示出来,所以未猜出来的(*处对应的)字符绝不可能与之前猜出来的(非*处对应的)字符相同。

// 感叹一句样例真心良心

Code

  1. #include <bits/stdc++.h>
  2. #define maxn 1010
  3. using namespace std;
  4. typedef long long LL;
  5. char s[maxn], rec[maxn];
  6. int blank[maxn], n, cnt[maxn];
  7. bool exist[maxn], exist2[maxn];
  8. bool match(const char* s1, const char* s2) {
  9. memset(exist2, 0, sizeof(exist2));
  10. for (int i = 0; i < n; ++i) {
  11. if (s2[i] != '*') exist2[s2[i]] = true;
  12. }
  13. for (int i = 0; i < n; ++i) {
  14. if (s2[i] == '*' && exist2[s1[i]]) return false;
  15. }
  16. for (int i = 0; i < n; ++i) {
  17. if (s2[i] == '*') continue;
  18. if (s1[i] != s2[i]) return false;
  19. }
  20. return true;
  21. }
  22. int main() {
  23. scanf("%d", &n);
  24. scanf("%s", s);
  25. int m, tot = 0;
  26. for (int i = 0; s[i]; ++i) if (s[i] == '*') blank[tot++] = i;
  27. scanf("%d", &m);
  28. int total = 0;
  29. for (int i = 0; i < m; ++i) {
  30. scanf("%s", rec);
  31. memset(exist, 0, sizeof(exist));
  32. if (match(rec, s)) {
  33. ++total;
  34. for (int j = 0; j < tot; ++j) {
  35. exist[rec[blank[j]]] = true;
  36. }
  37. for (int j = 'a'; j <= 'z'; ++j) {
  38. if (exist[j]) ++cnt[j];
  39. }
  40. }
  41. }
  42. int ans = 0;
  43. for (int i = 'a'; i <= 'z'; ++i) {
  44. if (cnt[i] >= total) ++ans;
  45. }
  46. printf("%d\n", ans);
  47. return 0;
  48. }

F. Lost in Transliteration

题意

用拉丁字母书写波兰姓名可能会有歧义,体现在两点上:

  1. \(kh\leftrightarrow h\)
  2. \(oo\leftrightarrow u\)

现给出一串名字,问有多少不同的名字。

注意,变化是有后续影响的,即可以接连变化的。

思路

最方便的做法是:

将所有的\(kkkk……kkh\)替换成\(h\),将所有的\(u\)替换成\(oo\).

前者显而易见,为什么后者是将所有的\(u\)替换成\(oo\),而不是反之呢?

如果反之,将\(oo\)都化成\(u\). 考虑奇数个\(o\)的情况,它事实上对应了\(n/2+1\)种串,每两个\(o\)一合并,最终多出来的那个\(u\)可能出现在第一个到最后一个之间的任意一个位置上。就不方便比较了。

// 再感叹一句样例真心良心

采用将所有的\(kkkk……kkh\)替换成\(h\),将所有的\(u\)替换成\(oo\),就保证了结果的唯一性

// 一个小注意点,\(u\)替换成\(oo\)后字符串的长度可能翻倍,数组要开两倍。

最后排个序数一数即可。

// 还学到了字符串数组特殊的排序技巧...。

Code

  1. #include <bits/stdc++.h>
  2. #define maxl 110
  3. #define maxn 410
  4. using namespace std;
  5. typedef long long LL;
  6. char s[maxl];
  7. struct Array {
  8. char data[maxl];
  9. char& operator [] (const int idx) { return data[idx]; }
  10. }ss[maxn];
  11. bool cmp(Array a, Array b) {
  12. return strcmp(a.data, b.data) < 0;
  13. }
  14. int main() {
  15. int n;
  16. scanf("%d", &n);
  17. for (int i = 0; i < n; ++i) {
  18. scanf("%s", s);
  19. int len = strlen(s), p = 0;
  20. while (p < len) {
  21. if (s[p] == 'k') {
  22. int j = p;
  23. while (j < len && s[j] == 'k') ++j;
  24. if (j == len || s[j] != 'h') {
  25. for (; p < j; ++p) ss[i][++ss[i][0]] = 'k';
  26. }
  27. else if (s[j] == 'h') ss[i][++ss[i][0]] = 'h', ++j;
  28. p = j;
  29. }
  30. else if (s[p] == 'u') {
  31. ss[i][++ss[i][0]] = 'o';
  32. ss[i][++ss[i][0]] = 'o';
  33. ++p;
  34. }
  35. else ss[i][++ss[i][0]] = s[p++];
  36. }
  37. ss[i][ss[i][0]+1] = '\0';
  38. }
  39. sort(ss, ss+n, cmp);
  40. int ans = 1;
  41. for (int i = 1; i < n; ++i) {
  42. if (cmp(ss[i-1], ss[i]) == 1) ++ans;
  43. }
  44. printf("%d\n", ans);
  45. return 0;
  46. }

G. Orientation of Edges

题意

给定一张图,\(n\)个点,\(m\)条边,若干条有向边,若干条无向边,且有重边。现要求给所有的无向边定向,使得从某个给定点\(s\)出发能够访问到的点的总数最大/最小。输出个数及方案。

思路

直接\(dfs\).

坑点在重边。有向边和无向边不能算作重边。并且最后输出边定向的时候要注意将所有的预处理时删去的重边定成和留下的那条同向。

Code

  1. #include <bits/stdc++.h>
  2. #define maxm 600010
  3. #define maxn 600010
  4. using namespace std;
  5. typedef long long LL;
  6. int n, m, s, tot, ne[maxn], id[maxn], ans[maxn], cnt;
  7. bool vis[maxn];
  8. struct node {
  9. int u, v, t;
  10. }a[maxm];
  11. bool cmp(int i, int j) {
  12. return a[i].u < a[j].u || (a[i].u==a[j].u && a[i].v<a[j].v) || (a[i].u==a[j].u && a[i].v==a[j].v && a[i].t<a[j].t);
  13. }
  14. struct Edge {
  15. int to, ne, type, dir, id;
  16. Edge(int _to=0, int _ne=0, int _type=0, int _id=0, int _dir=-1):
  17. to(_to), ne(_ne), type(_type), dir(_dir), id(_id) {}
  18. }edge[maxm];
  19. void add(int type, int u, int v, int id) {
  20. edge[tot] = Edge(v, ne[u], type, id);
  21. ne[u] = tot++;
  22. if (type==2) edge[tot] = Edge(u, ne[v], type, id), ne[v] = tot++;
  23. }
  24. void dfs1(int u) {
  25. ++cnt;
  26. vis[u] = true;
  27. for (int i = ne[u]; ~i; i = edge[i].ne) {
  28. int v = edge[i].to;
  29. if (vis[v]) continue;
  30. edge[i].dir = 1;
  31. dfs1(v);
  32. }
  33. }
  34. void dfs2(int u) {
  35. ++cnt;
  36. vis[u] = true;
  37. for (int i = ne[u]; ~i; i = edge[i].ne) {
  38. int v = edge[i].to;
  39. if (vis[v]) continue;
  40. if (edge[i].type == 1) dfs2(v);
  41. else edge[i].dir = 0;
  42. }
  43. }
  44. void out() {
  45. printf("%d\n", cnt);
  46. for (int i = 0; i < tot; ++i) {
  47. if (edge[i].dir!=-1) ans[edge[i].id] = edge[i].to == a[edge[i].id].v ? edge[i].dir : !edge[i].dir;
  48. }
  49. for (int i = 1; i < m; ++i) {
  50. if (a[id[i]].u == a[id[i-1]].u && a[id[i]].v==a[id[i-1]].v && a[id[i]].t==a[id[i-1]].t) ans[id[i]] = ans[id[i-1]];
  51. }
  52. for (int i = 0; i < m; ++i) {
  53. if (a[i].t == 2) putchar(ans[i]==1 ? '+' : '-');
  54. }
  55. puts("");
  56. }
  57. int main() {
  58. scanf("%d%d%d", &n, &m, &s);
  59. for (int i = 0; i < m; ++i) scanf("%d%d%d", &a[i].t, &a[i].u, &a[i].v), id[i] = i;
  60. sort(id, id+m, cmp);
  61. memset(ne, -1, sizeof(ne));
  62. add(a[id[0]].t, a[id[0]].u, a[id[0]].v, id[0]);
  63. for (int i = 1; i < m; ++i) {
  64. if (a[id[i]].u!=a[id[i-1]].u || a[id[i]].v!=a[id[i-1]].v || a[id[i]].t!=a[id[i-1]].t) add(a[id[i]].t, a[id[i]].u, a[id[i]].v, id[i]);
  65. }
  66. cnt = 0;
  67. dfs1(s);
  68. out();
  69. cnt = 0;
  70. for (int i = 1; i <= n; ++i) edge[i].dir = -1;
  71. memset(vis, 0, sizeof(vis));
  72. dfs2(s);
  73. out();
  74. return 0;
  75. }

H. Palindromic Cut

题意

给定一个长度为\(n(n\leq 4e5)\)的字符串,现要将其中的字符重新安排位置,并且切成等长的若干段,使得每段都是一个回文串。问最少切成多少段。并输出一种方案。

思路

统计出现了奇数次的字符个数,假设为\(k\)个,则显然:

  1. 要分成的段数\(\geq k\)
  2. 每一段长度都须为奇数长

k==0

一段,不用切。

k==1

一段,不用切。

  1. 为什么?万一n为偶数呢?那不是不好放置吗?
  2. 这种情况是不可能发生的,因为 1个奇数+若干个偶数=奇数 ,即总长度必然为奇数长,直接将它放在中间即可。

其他情况

上面说到,要分成的段数\(\geq k\),每段长度为奇数,但又不仅局限于这两个条件

注意到,如果分成的段数\(\gt k\),那么大的部分一定得是偶数。即假设分成了\(num\)段,则\(num-k\)一定得为偶数。

  1. 为什么呢?
  2. 因为将那出现奇数次的k种字符放在k段的中间位置后,多出来的num-k段,其中间的字符都是从出现了偶数次的字符中拆出来的,而要拆就得一对一对地拆,否则剩下奇数个又没法往两边分了。

于是预处理出\(n\)的所有因子,枚举分成的段数,即从\(\geq k\)的第一个开始向后枚举,\(check\)是否满足条件即可。时间复杂度\(O(\sqrt n)\).

  1. 万一不存在一种满足要求的情况呢?
  2. 不存在的。至少有一种分法满足要求,那就是全部切开。

输出的考虑和上面提到的拆和放的思路一致。

  1. 先是将所有出现奇数次的\(k\)种字符放到前\(k\)段的中间位置,每种放一个;

  2. 再将偶数个的一对对拆出来填到后\(n-k\)段中,这里放多少个就无所谓了,可直接对每种字符放完为止;

  3. 最后将剩下的字符从两边往中间放,满了就下一段。

注意特判分成一段的情况,直接输出即可。

Code

  1. #include <bits/stdc++.h>
  2. #define N 62
  3. #define maxn 400010
  4. char s[maxn];
  5. int cnt[70], fac[700], n;
  6. char ans[maxn];
  7. using namespace std;
  8. typedef long long LL;
  9. int idx(char c) {
  10. if (islower(c)) return c-'a';
  11. else if (isupper(c)) return c-'A'+26;
  12. else return c-'0'+52;
  13. }
  14. char charat(int i) {
  15. if (i < 26) return 'a'+i;
  16. else if (i < 52) return 'A'+i-26;
  17. else return '0'+i-52;
  18. }
  19. void print1() {
  20. puts("1");
  21. int p = 0;
  22. for (int i = 0; i < N; ++i) {
  23. if (cnt[i] & 1) --cnt[i], ans[n/2] = charat(i);
  24. while (cnt[i]) {
  25. ans[p] = ans[n-1-p] = charat(i);
  26. ++p, cnt[i] -= 2;
  27. }
  28. }
  29. ans[n] = '\0';
  30. puts(ans);
  31. exit(0);
  32. }
  33. void printn() {
  34. printf("%d\n", n);
  35. putchar(s[0]);
  36. for (int i = 1; i < n; ++i) printf(" %c", s[i]); puts("");
  37. exit(0);
  38. }
  39. void print(int num, int sz) {
  40. printf("%d\n", num);
  41. for (int i = 0; i < num-1; ++i) {
  42. char temp = ans[i*sz+sz];
  43. ans[i*sz+sz] = '\0';
  44. printf("%s ", ans+i*sz);
  45. ans[i*sz+sz] = temp;
  46. }
  47. printf("%s\n", ans+sz*(num-1));
  48. }
  49. int main() {
  50. scanf("%d%s", &n, s);
  51. for (int i = 0; i < n; ++i) ++cnt[idx(s[i])];
  52. int k = 0;
  53. for (int i = 0; i < N; ++i) if (cnt[i]&1) ++k;
  54. if (!k || k==1) print1();
  55. int tot = 0;
  56. for (int i = 1; i*i <= n; ++i) {
  57. if (i*i == n) fac[tot++] = i;
  58. else {
  59. if (n % i == 0) fac[tot++] = i, fac[tot++] = n/i;
  60. }
  61. }
  62. sort(fac, fac+tot);
  63. int p = lower_bound(fac, fac+tot, k) - fac;
  64. for (; p < tot; ++p) {
  65. if (!((fac[p]-k)&1) && ((n/fac[p])&1)) break;
  66. }
  67. int sz = n/fac[p], curm = 0, cur = 0;
  68. if (sz == 1) printn();
  69. for (int i = 0; i < N; ++i) {
  70. if (cnt[i] & 1) ans[curm*sz+sz/2] = charat(i), ++curm, --cnt[i];
  71. }
  72. for (int i = 0; i < N; ++i) {
  73. if (curm == fac[p]) break;
  74. while (cnt[i] && curm < fac[p]) ans[curm*sz+sz/2] = charat(i), ++curm, --cnt[i];
  75. }
  76. int l = 0, r = sz-1;
  77. for (int i = 0; i < N; ++i) {
  78. if (cur == fac[p]) break;
  79. if (l == sz/2) ++cur, l = 0, r = sz-1;
  80. while (cnt[i]) {
  81. if (l == sz/2) ++cur, l = 0, r = sz-1;
  82. ans[cur*sz+l++] = ans[cur*sz+r--] = charat(i);
  83. cnt[i] -= 2;
  84. }
  85. }
  86. print(fac[p], sz);
  87. return 0;
  88. }

I. Photo Processing

2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest I. Photo Processing

K. Road Widening

题意

给定一个数列a,每个元素初始值为s[i],可以加上g[i]的变化量,要求最终得到的数列中相邻两数的绝对值之差\(\leq 1\). 问总共最多能加的值是多少。输出总和及各点变化后的量。

思路

正着扫描一遍,限定下来一个范围。再拿这个范围的最大值去倒着扫描一遍,确定每个点的值。

Code

  1. #include <bits/stdc++.h>
  2. #define maxn 200010
  3. using namespace std;
  4. typedef long long LL;
  5. int s[maxn], g[maxn], e[maxn], ans[maxn], st[maxn], ed[maxn];
  6. LL res;
  7. int main() {
  8. int n;
  9. scanf("%d", &n);
  10. for (int i = 0; i < n; ++i) scanf("%d%d", &s[i], &g[i]), e[i] = s[i] + g[i];
  11. st[0] = s[0], ed[0] = e[0];
  12. for (int i = 1; i < n; ++i) {
  13. st[i] = max(st[i-1]-1, s[i]);
  14. ed[i] = min(ed[i-1]+1, e[i]);
  15. if (st[i] > ed[i]) { puts("-1"); return 0; }
  16. }
  17. LL res=ed[n-1]-s[n-1];
  18. ans[n-1] = ed[n-1];
  19. for (int i = n-2; i >= 0; --i) {
  20. if (ans[i+1] + 1 <= ed[i]) ans[i] = ans[i+1] + 1;
  21. else if (ans[i+1] <= ed[i]) ans[i] = ans[i+1];
  22. else ans[i] = ans[i+1] - 1;
  23. res += ans[i]-s[i];
  24. }
  25. printf("%I64d\n%d", res, ans[0]);
  26. for (int i = 1; i < n; ++i) printf(" %d", ans[i]); printf("\n");
  27. return 0;
  28. }

M. Quadcopter Competition

题意

在方格纸上走,从\((x1,y1)\)出发绕一圈回来,要求将\((x2,y2)\)包围在路径里(不能在路径上),问最小距离。

思路

就是问最小的矩形周长。

注意横或纵坐标相同的情况。

Code

  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long LL;
  4. int main() {
  5. int x1, x2,y1, y2, ans;
  6. scanf("%d%d", &x1, &y1);
  7. scanf("%d%d", &x2, &y2);
  8. if (y1 == y2) ans = 2 * (1+abs(x1-x2)) + 4;
  9. else if (x1 == x2) ans = 2 * (1+abs(y1-y2)) + 4;
  10. else {
  11. if (x2 > x1) ++x2;
  12. else --x2;
  13. if (y2 > y1) ++y2;
  14. else --y2;
  15. ans = 2 * (abs(y1-y2) + abs(x1-x2));
  16. }
  17. printf("%d\n", ans);
  18. return 0;
  19. }

2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest A E F G H I K M的更多相关文章

  1. 2018-2019 ICPC, NEERC, Southern Subregional Contest

    目录 2018-2019 ICPC, NEERC, Southern Subregional Contest (Codeforces 1070) A.Find a Number(BFS) C.Clou ...

  2. Codeforces 2018-2019 ICPC, NEERC, Southern Subregional Contest

    2018-2019 ICPC, NEERC, Southern Subregional Contest 闲谈: 被操哥和男神带飞的一场ACM,第一把做了这么多题,荣幸成为7题队,虽然比赛的时候频频出锅 ...

  3. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror) Solution

    从这里开始 题目列表 瞎扯 Problem A Find a Number Problem B Berkomnadzor Problem C Cloud Computing Problem D Gar ...

  4. 2018.10.20 2018-2019 ICPC,NEERC,Southern Subregional Contest(Online Mirror, ACM-ICPC Rules)

    i207M的“怕不是一个小时就要弃疗的flag”并没有生效,这次居然写到了最后,好评=.= 然而可能是退役前和i207M的最后一场比赛了TAT 不过打得真的好爽啊QAQ 最终结果: 看见那几个罚时没, ...

  5. Codeforces1070 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)总结

    第一次打ACM比赛,和yyf两个人一起搞事情 感觉被两个学长队暴打的好惨啊 然后我一直做傻子题,yyf一直在切神仙题 然后放一波题解(部分) A. Find a Number LINK 题目大意 给你 ...

  6. codeforce1070 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) 题解

    秉承ACM团队合作的思想懒,这篇blog只有部分题解,剩余的请前往星感大神Star_Feel的blog食用(表示男神汉克斯更懒不屑于写我们分别代写了下...) C. Cloud Computing 扫 ...

  7. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred)

    A. Find a Number 找到一个树,可以被d整除,且数字和为s 记忆化搜索 static class S{ int mod,s; String str; public S(int mod, ...

  8. 2018-2019 ICPC, NEERC, Southern Subregional Contest (Online Mirror, ACM-ICPC Rules, Teams Preferred) Solution

    A. Find a Number Solved By 2017212212083 题意:$找一个最小的n使得n % d == 0 并且 n 的每一位数字加起来之和为s$ 思路: 定义一个二元组$< ...

  9. 【*2000】【2018-2019 ICPC, NEERC, Southern Subregional Contest C 】Cloud Computing

    [链接] 我是链接,点我呀:) [题意] [题解] 我们可以很容易知道区间的每个位置有哪些安排可以用. 显然 我们优先用那些花费的钱比较少的租用cpu方案. 但一个方案可供租用的cpu有限. 我们可以 ...

随机推荐

  1. ActiveMQ RabbitMQ RokcetMQ Kafka实战 消息队列中间件视频教程

    附上消息队列中间件百度网盘连接: 链接: https://pan.baidu.com/s/1FFZQ5w17e1TlLDSF7yhzmA 密码: hr63

  2. 【JS】JS实现时间戳转换成普通时间

    var time = 1514457627; alert(getDate(time)); function getDate(tm){ var tt=new Date(parseInt(tm) * 10 ...

  3. JZOJ 1321. 灯

    1321. 灯 Time Limits: 1000 ms  Memory Limits: 65536 KB  Detailed Limits Goto ProblemSet Description 贝 ...

  4. python常见概念

    1. 什么是鸭子类型? 不要检查它是不是鸭子:检查它的叫声像不像鸭子,走起路来像不像鸭子.如果走起路来像鸭子,叫起来也像鸭子,那么它就是鸭子.鸭子类型是编程语言中动态类型语言中的一种设计风格,一个对象 ...

  5. 笔记-python-变量作用域

    笔记-python-变量作用域 1.      python变量作用域和引用范围 1.1.    变量作用域 一般而言程序的变量并不是任何对象或在任何位置都可以访问的,访问权限决定于这个变量是在哪里赋 ...

  6. 借助FreeHttp为任意移动端web网页添加vConsole调试

        以下介绍在不用修改代码并发布项目的情况下,为我们日常使用的移动web应用(如手机web淘宝)添加vConsole调试工具的方法   vConsole介绍 vConsole是一个轻量.可拓展.针 ...

  7. datagrid的右键菜单

    1. 2.右键菜单,主要是用onRowContextMenu:function(e,index,row){}方法来实现 onRowContextMenu:function(e,index,row){ ...

  8. TCP报文格式,TCP的三次握手和四次挥手&hosts文件

    1.TCP报文格式 TCP报头中的源端口号和目的端口号同IP数据报中的源IP与目的IP唯一确定一条TCP连接 序号(4字节=32位): 37 59 56 75 用来标识TCP发端向TCP收端发送的数据 ...

  9. 在Foxmail中添加阿里云企业邮箱账号

    1.安装完成Foxmail之后,新建账号 输入阿里云邮箱地址和密码,点击创建 接受服务器类型你可以选择POP3或者IMAP,在这里我选择的是POP3 点击创建,大功告成. 为什么要写这篇文章呢? 因为 ...

  10. 【读书笔记--cookie】JavaScript权威指南 第六版

    遇到一些问题需要用cookie处理,正好读了一下犀牛书关于cookie的介绍,整理了一些笔记. cookie是指web浏览器存储的少量数据,同时它是与具体的web页面或者站点相关的. cookie数据 ...