[关闭]
@lawk97 2017-06-17T19:36:46.000000Z 字数 12217 阅读 980

poj很好很有层次感(初级)- 基本算法

枚举 贪心 构造法 模拟法


地址

(1)枚举

[poj1753,poj2965]


A - Flip Game
[POJ - 1753]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. using namespace std;
  8. struct temp{
  9. int x,y,step;
  10. char gra[4][4];
  11. }t;
  12. int dir[4][2]={0,1,0,-1,1,0,-1,0};
  13. temp convert(temp t){
  14. for(int i = 0; i < 4; i++){
  15. int x = t.x + dir[i][0], y = t.y + dir[i][1];
  16. if(x >= 0 && x < 4 && y >= 0 && y < 4){
  17. t.gra[x][y] = (t.gra[x][y] == 'b') ? 'w':'b';
  18. }
  19. }
  20. t.gra[t.x][t.y] = (t.gra[t.x][t.y] == 'b') ? 'w':'b';
  21. t.step++;
  22. return t;
  23. }
  24. temp move(temp t){
  25. if(t.x < 3){
  26. t.x++;
  27. }else{
  28. t.x=0;
  29. t.y++;
  30. }
  31. return t;
  32. }
  33. bool ensure(temp t){
  34. char c=t.gra[0][0];
  35. for(int i = 0; i < 4; i++){
  36. for(int j = 0; j < 4; j++){
  37. if(t.gra[i][j]!=c){
  38. return false;
  39. }
  40. }
  41. }
  42. return true;
  43. }
  44. int main(){
  45. int ans=1e9;
  46. for(int i = 0; i < 4; i++){
  47. scanf("%s",t.gra[i]);
  48. }
  49. t.x=0;
  50. t.y=0;
  51. t.step=0;
  52. stack<temp> s;
  53. s.push(t);
  54. t=convert(t);
  55. s.push(t);
  56. while(!s.empty()){
  57. temp top = s.top();
  58. s.pop();
  59. if (ensure(top)){
  60. ans = (ans > top.step) ? top.step:ans;
  61. continue;
  62. }
  63. top = move(top);
  64. if (top.y >= 4)
  65. {
  66. continue;
  67. }
  68. s.push(top);
  69. top = convert(top);
  70. s.push(top);
  71. }
  72. if (ans==1e9)
  73. {
  74. printf("Impossible\n");
  75. }else{
  76. printf("%d\n",ans);
  77. }
  78. }

B - The Pilots Brothers' refrigerator
[POJ - 2965]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. using namespace std;
  9. //两种枚举思路,口感很好的递归练习
  10. int ans,ansx[20],ansy[20],gra;
  11. int pathx[20],pathy[20];
  12. char g[4][4];
  13. void convert(int x,int y){
  14. gra = gra ^ (1 << (x+y*4));
  15. for(int i = 0; i < 4; i++){
  16. gra = gra ^ (1 << (i+y*4));
  17. }
  18. for(int i = 0; i < 4; i++){
  19. gra = gra ^ (1 << (x+i*4));
  20. }
  21. }
  22. bool ensure(){
  23. for(int i = 0; i < 4; i++){
  24. for(int j = 0; j < 4; j++){
  25. if( ( (gra>>(j+i*4) ) & 1) != 1){
  26. return false;
  27. }
  28. }
  29. }
  30. return true;
  31. }
  32. void dfs(int step,int x,int y){
  33. if (ensure())
  34. {
  35. if (ans > step){
  36. ans = step;
  37. for (int i = 0; i < ans; ++i)
  38. {
  39. pathx[i]=ansx[i];
  40. pathy[i]=ansy[i];
  41. }
  42. }
  43. return;
  44. }
  45. if (y >= 4 || step > 16)
  46. {
  47. return;
  48. }
  49. if (x < 3)
  50. {
  51. dfs(step,x+1,y);
  52. }else
  53. {
  54. dfs(step,0,y+1);
  55. }
  56. convert(x,y);
  57. ansx[step]=x;
  58. ansy[step]=y;
  59. if (x < 3)
  60. {
  61. dfs(step+1,x+1,y);
  62. }else
  63. {
  64. dfs(step+1,0,y+1);
  65. }
  66. convert(x,y);
  67. }
  68. int main(){
  69. for(int i = 0; i < 4; i++){
  70. scanf("%s",g[i]);
  71. }
  72. gra=0;
  73. ans=1e9;
  74. int num,o=1;
  75. for (int i = 0; i < 4; ++i)
  76. {
  77. for(int j = 0; j < 4; j++){
  78. num = (g[i][j]=='-') ? 1:0;
  79. gra+=num*o;
  80. o = o<<1;
  81. }
  82. }
  83. dfs(0,0,0);
  84. printf("%d\n",ans);
  85. for (int i = 0; i < ans; ++i)
  86. {
  87. printf("%d %d\n",pathy[i]+1,pathx[i]+1 );
  88. }
  89. }
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. using namespace std;
  9. //要求先枚举翻转的情况
  10. int ans,gra,flag;
  11. int pathx[20],pathy[20];
  12. char g[4][4];
  13. void convert(int x,int y){
  14. gra = gra ^ (1 << (x+y*4));
  15. for(int i = 0; i < 4; i++){
  16. gra = gra ^ (1 << (i+y*4));
  17. }
  18. for(int i = 0; i < 4; i++){
  19. gra = gra ^ (1 << (x+i*4));
  20. }
  21. }
  22. bool ensure(){
  23. for(int i = 0; i < 4; i++){
  24. for(int j = 0; j < 4; j++){
  25. if( ( (gra>>(j+i*4) ) & 1) != 1){
  26. return false;
  27. }
  28. }
  29. }
  30. return true;
  31. }
  32. void dfs(int step,int x,int y){
  33. if (ans == step)
  34. {
  35. flag=ensure();
  36. return ;
  37. }
  38. if(flag || (y==4)){
  39. return ;
  40. }
  41. convert(x,y);
  42. pathx[step]=x;
  43. pathy[step]=y;
  44. if (x < 3)
  45. {
  46. dfs(step+1,x+1,y);
  47. }else
  48. {
  49. dfs(step+1,0,y+1);
  50. }
  51. convert(x,y);
  52. if (x < 3)
  53. {
  54. dfs(step,x+1,y);
  55. }else
  56. {
  57. dfs(step,0,y+1);
  58. }
  59. }
  60. int main(){
  61. for(int i = 0; i < 4; i++){
  62. scanf("%s",g[i]);
  63. }
  64. gra=0;
  65. flag=0;
  66. int num,o=1;
  67. for (int i = 0; i < 4; ++i)
  68. {
  69. for(int j = 0; j < 4; j++){
  70. num = (g[i][j]=='-') ? 1:0;
  71. gra+=num*o;
  72. o = o<<1;
  73. }
  74. }
  75. for (ans = 1; ans <= 16; ++ans)
  76. {
  77. dfs(0,0,0);
  78. if (flag)
  79. {
  80. break;
  81. }
  82. }
  83. if (ans==1e9)
  84. {
  85. printf("Impossible\n");
  86. }else{
  87. printf("%d\n",ans);
  88. for (int i = 0; i < ans; ++i)
  89. {
  90. printf("%d %d\n",pathy[i]+1,pathx[i]+1 );
  91. }
  92. }
  93. }

(2)贪心

[poj1328,poj2109,poj2586]


C - Radar Installation
[POJ - 1328]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. using namespace std;
  9. struct location{
  10. int x,y;
  11. };
  12. struct path
  13. {
  14. double l,r;
  15. };
  16. bool cmp(path a, path b){
  17. return a.l<b.l;
  18. }
  19. int main(){
  20. int n,d,kase=0;
  21. location l[1005];
  22. path p[1005];
  23. while(scanf("%d%d",&n,&d),n!=0){
  24. for(int i = 0; i < n; i++){
  25. scanf("%d%d",&l[i].x,&l[i].y);
  26. }
  27. int ans=0,flag=0;
  28. for(int i = 0; i < n; i++){
  29. if (d<l[i].y)
  30. {
  31. flag=1;
  32. break;
  33. }
  34. p[i].r=l[i].x+sqrt(d*d-l[i].y*l[i].y);
  35. p[i].l=l[i].x-sqrt(d*d-l[i].y*l[i].y);
  36. }
  37. printf("Case %d: ",++kase );
  38. if (flag){
  39. printf("-1\n");
  40. }else{
  41. sort(p,p+n,cmp);
  42. for(int i = 0; i < n; i++){
  43. double x = p[i].r;
  44. ans++;
  45. for(int j = i+1; j < n; j++){
  46. if(x < p[j].l){
  47. break;
  48. }else if(x > p[j].r){
  49. x = p[j].r;
  50. }
  51. i = j;
  52. }
  53. }
  54. printf("%d\n",ans );
  55. }
  56. }
  57. return 0;
  58. }

D - Power of Cryptography
[POJ - 2109]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. using namespace std;
  9. /*
  10. 基础知识: 类型 长度 (bit) 有效数字 绝对值范围
  11. float 32 6~7 10^(-37) ~ 10^38
  12. double 64 15~16 10^(-307) ~ 10^308
  13. long double 128 18~19 10^(-4931) ~ 10 ^ 4932
  14. double scanf use %lf,printf use %f
  15. long double scanf&printf use %Lf,but some compiler don't suppose it
  16. */
  17. int main(){
  18. double n,p;
  19. while(~scanf("%lf%lf",&n,&p)){
  20. cout << pow(p,1/n) << endl;
  21. }
  22. return 0;
  23. }

E - Y2K Accounting Bug
[POJ - 2586]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. using namespace std;
  9. int main(){
  10. long long d,s,all,num,m[15];
  11. while(~scanf("%lld%lld",&d,&s)){
  12. all=0;
  13. m[0]=0;
  14. for(int i = 1; i <= 4; i++){
  15. all += d;
  16. m[i] = d;
  17. if( all-(5-i)*s > 0 ){
  18. all -= d;
  19. all += -s;
  20. m[i] = -s;
  21. }
  22. }
  23. for(int i=5;i<=12;i++){
  24. all -= m[i-5];
  25. if (all+d<0){
  26. all += d;
  27. m[i] = d;
  28. }else
  29. {
  30. all += -s;
  31. m[i] = -s;
  32. }
  33. }
  34. all=0;
  35. for(int i = 1; i <= 12; i++){
  36. all+=m[i];
  37. }
  38. if (all>0)
  39. {
  40. printf("%lld\n",all );
  41. }else{
  42. printf("Deficit\n");
  43. }
  44. }
  45. return 0;
  46. }

(3)递归和分治法


(4)递推


(5)构造法

[poj3295]


F - Tautology
[POJ - 3295]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. char text[105];
  11. stack<int> va;
  12. map<char,int> m;
  13. bool cal(int p,int q,int r,int s,int t){
  14. m['p']=p;
  15. m['q']=q;
  16. m['r']=r;
  17. m['s']=s;
  18. m['t']=t;
  19. int len=strlen(text);
  20. for(int i = len-1;i >= 0; i--){
  21. if (text[i]=='p'||text[i]=='q'
  22. ||text[i]=='r'||text[i]=='s'
  23. ||text[i]=='t')
  24. {
  25. va.push(m[text[i]]);
  26. continue;
  27. }else if (text[i]=='N')
  28. {
  29. int t = !(va.top());
  30. va.pop();
  31. va.push(t);
  32. continue;
  33. }
  34. int a,b;
  35. a = va.top();
  36. va.pop();
  37. b = va.top();
  38. va.pop();
  39. if (text[i]=='K')
  40. {
  41. va.push(a&&b);
  42. }else if (text[i]=='A')
  43. {
  44. va.push(a||b);
  45. }else if (text[i]=='C')
  46. {
  47. va.push( (!a) || b );
  48. }else if (text[i]=='E')
  49. {
  50. va.push(a==b);
  51. }
  52. }
  53. return va.top();
  54. }
  55. int main(){
  56. while(scanf("%s",text),text[0]!='0'){
  57. int flag=1;
  58. for(int p = 0; flag && p<=1; p++){
  59. for(int q = 0; flag && q<=1; q++){
  60. for(int r = 0; flag && r<=1; r++){
  61. for(int s = 0; flag && s<=1; s++){
  62. for(int t = 0; flag && t<=1; t++){
  63. flag=cal(p,q,r,s,t);
  64. }
  65. }
  66. }
  67. }
  68. }
  69. if (flag)
  70. {
  71. printf("tautology\n");
  72. }else{
  73. printf("not\n");
  74. }
  75. }
  76. return 0;
  77. }

(6)模拟法

[poj1068,poj2632,poj1573,poj2993,poj2996)]


G - Parencodings
[POJ - 1068]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. int main(){
  11. int t,n,p[25],w[25];
  12. char sym[100000];
  13. scanf("%d",&t);
  14. while(t--){
  15. scanf("%d",&n);
  16. for(int i = 0; i < n; i++){
  17. scanf("%d",&p[i]);
  18. }
  19. int num = 0;
  20. stack<int> s;
  21. for(int i = 0; i < n; i++){
  22. for(int j = 0; j < p[i]-num; j++){
  23. sym[i+num+j] = '(';
  24. }
  25. sym[i+p[i]] = ')';
  26. num = p[i];
  27. }
  28. int len = strlen(sym);
  29. num = 0;
  30. for(int i = 0; i < len; i++){
  31. if(sym[i]=='('){
  32. s.push(i);
  33. num++;
  34. }else if(s.empty()){
  35. w[i-num] = 0;
  36. }else{
  37. int top = s.top();
  38. s.pop();
  39. w[i-num] = (i-top+1)/2;
  40. }
  41. }
  42. for (int i = 0; i < n; ++i)
  43. {
  44. printf("%d ",w[i]);
  45. }
  46. printf("\n");
  47. }
  48. return 0;
  49. }

H - Crashing Robots
[POJ - 2632]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. struct robot{
  11. int x,y,d;
  12. }r[105];
  13. int dir[4][2]={0,1,1,0,0,-1,-1,0};
  14. int main(){
  15. int t,n,m,a,b;
  16. int gra[105][105];
  17. scanf("%d",&t);
  18. while(t--){
  19. scanf("%d%d%d%d",&a,&b,&n,&m);
  20. for(int i = 0; i < 105; i++){
  21. for(int j = 0; j < 105; j++){
  22. gra[i][j] = 0;
  23. }
  24. }
  25. for(int i = 1; i <= n; i++){
  26. char dir;
  27. scanf("%d%d",&r[i].x,&r[i].y);
  28. getchar();
  29. dir=getchar();
  30. if(dir == 'N'){
  31. r[i].d = 0;
  32. }else if(dir == 'E'){
  33. r[i].d = 1;
  34. }else if(dir == 'S'){
  35. r[i].d = 2;
  36. }else if(dir == 'W'){
  37. r[i].d = 3;
  38. }
  39. gra[r[i].x][r[i].y] = i;
  40. }
  41. int flag = 0;
  42. for(int i = 0; i < m; i++){
  43. int now,num;
  44. char ins;
  45. scanf("%d",&now);
  46. getchar();
  47. ins = getchar();
  48. scanf("%d",&num);
  49. if (flag)
  50. {
  51. continue;
  52. }
  53. if(ins=='L'){
  54. r[now].d = (r[now].d+3*num)%4;
  55. }else if(ins=='R'){
  56. r[now].d = (r[now].d+num)%4;
  57. }else{
  58. while(num--){
  59. gra[r[now].x][r[now].y] = 0;
  60. r[now].x += dir[r[now].d][0];
  61. r[now].y += dir[r[now].d][1];
  62. if(r[now].x<=0 || r[now].x>a
  63. || r[now].y<=0 || r[now].y>b){
  64. flag = 1;
  65. printf("Robot %d crashes into the wall\n",now );
  66. break;
  67. }else if (gra[r[now].x][r[now].y])
  68. {
  69. flag = 1;
  70. printf("Robot %d crashes into robot %d\n",
  71. now,gra[r[now].x][r[now].y] );
  72. break;
  73. }
  74. gra[r[now].x][r[now].y] = now;
  75. }
  76. }
  77. }
  78. if (!flag)
  79. {
  80. printf("OK\n");
  81. }
  82. }
  83. return 0;
  84. }

I - Robot Motion
[POJ - 1573]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. struct location{
  11. int x,y;
  12. };
  13. int main(){
  14. int r,c,e,used[12][12];
  15. char gra[12][12];
  16. while(scanf("%d%d%d",&r,&c,&e),r&&c){
  17. for(int i = 0; i < r; i++){
  18. scanf("%s",gra[i]);
  19. }
  20. for(int i = 0; i < 12; i++){
  21. for(int j = 0; j < 12; j++){
  22. used[i][j] = -1;
  23. }
  24. }
  25. int ansg = 0, ansl = 0;
  26. stack<location> s;
  27. location st;
  28. st.x = e-1;
  29. st.y = 0;
  30. used[st.y][st.x] = 0;
  31. s.push(st);
  32. while(!s.empty()){
  33. location top = s.top();
  34. s.pop();
  35. int x = top.x;
  36. int y = top.y;
  37. switch(gra[y][x]){
  38. case 'N':
  39. y--;
  40. break;
  41. case 'E':
  42. x++;
  43. break;
  44. case 'S':
  45. y++;
  46. break;
  47. case 'W':
  48. x--;
  49. break;
  50. default:
  51. break;
  52. }
  53. ansg++;
  54. if(x<0 || x>=c || y<0 || y>=r){
  55. printf("%d step(s) to exit\n",ansg );
  56. break;
  57. }else if(used[y][x] >= 0){
  58. printf("%d step(s) before a loop of %d step(s)\n"
  59. ,used[y][x], ansg-used[y][x] );
  60. break;
  61. }
  62. used[y][x] = ansg;
  63. top.y = y;
  64. top.x = x;
  65. s.push(top);
  66. }
  67. }
  68. return 0;
  69. }

J - Emag eht htiw Em Pleh
[POJ - 2993]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. int main(){
  11. char gra[20][40];
  12. for(int i = 0; i < 17; i += 2){
  13. for(int j = 0; j < 33; j++){
  14. if (j % 4 == 0)
  15. {
  16. gra[i][j] = '+';
  17. }else{
  18. gra[i][j] = '-';
  19. }
  20. }
  21. }
  22. for(int i = 1; i < 16; i += 2){
  23. for(int j = 0; j < 33; j++){
  24. if (j % 4 == 0)
  25. {
  26. gra[i][j] = '|';
  27. }else if( ((j/4)+(i/2)) % 2 == 0){
  28. gra[i][j] = '.';
  29. }else{
  30. gra[i][j] = ':';
  31. }
  32. }
  33. }
  34. char text[100];
  35. scanf("%s",text);
  36. scanf("%s",text);
  37. int len = strlen(text);
  38. for(int i = 0; i < len; i++){
  39. int ch,x,y;
  40. if (text[i]>='A'&&text[i]<='Z')
  41. {
  42. ch = text[i];
  43. x = 15 - (text[i+2]-'1')*2;
  44. y = (text[i+1]-'a')*4 + 2;
  45. i += 3;
  46. }else{
  47. ch = 'P';
  48. x = 15 - (text[i+1]-'1')*2;
  49. y = (text[i]-'a')*4 + 2;
  50. i += 2;
  51. }
  52. gra[x][y] = ch;
  53. }
  54. scanf("%s",text);
  55. scanf("%s",text);
  56. len = strlen(text);
  57. for(int i = 0; i < len; i++){
  58. int ch,x,y;
  59. if (text[i]>='A'&&text[i]<='Z')
  60. {
  61. ch = text[i];
  62. x = 15 - (text[i+2]-'1')*2;
  63. y = (text[i+1]-'a')*4 + 2;
  64. i += 3;
  65. }else{
  66. ch = 'P';
  67. x = 15 - (text[i+1]-'1')*2;
  68. y = (text[i]-'a')*4 + 2;
  69. i += 2;
  70. }
  71. gra[x][y] = ch + 32;
  72. }
  73. for(int i = 0; i < 17; i++){
  74. for(int j = 0; j < 33; j++){
  75. printf("%c",gra[i][j] );
  76. }
  77. printf("\n");
  78. }
  79. }

K - Help Me with the Game
[POJ - 2996]

  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <algorithm>
  5. #include <cstring>
  6. #include <stack>
  7. #include <queue>
  8. #include <map>
  9. using namespace std;
  10. struct chees{
  11. int x[10];
  12. char y[10];
  13. };
  14. map<char,chees> mloc;
  15. map<char,int> mused;
  16. char sheet[12]
  17. = {'K','Q','R','B','N','P','k','q','r','b','n','p'};
  18. char gra[20][40];
  19. int main(){
  20. for(int i = 0; i < 17; i++){
  21. scanf("%s",gra[i]);
  22. }
  23. for(int i = 0; i < 12; i++){
  24. mused[sheet[i]] = 0;
  25. }
  26. for(int i = 15; i >= 0; i -= 2){
  27. for(int j = 2; j < 33; j += 4){
  28. int c = gra[i][j];
  29. if(mused[c]>=10){
  30. continue;
  31. }
  32. mloc[c].x[ mused[c] ] = 8-i/2;
  33. mloc[c].y[ mused[c] ] = 'a'+(j-2)/4;
  34. mused[c]++;
  35. }
  36. }
  37. printf("White: ");
  38. for(int i = 0; i < 6; i++){
  39. int c = sheet[i];
  40. for(int j = 0; j < mused[c]; j++){
  41. if (i < 5)
  42. {
  43. printf("%c", c);
  44. }
  45. printf("%c%d", mloc[c].y[j], mloc[c].x[j]);
  46. if(i==5&&j==(mused[c]-1)){
  47. continue;
  48. }
  49. printf(",");
  50. }
  51. }
  52. printf("\n");
  53. for(int i = 0; i < 12; i++){
  54. mused[sheet[i]] = 0;
  55. }
  56. for(int i = 1; i <= 15; i += 2){
  57. for(int j = 2; j < 33; j += 4){
  58. int c = gra[i][j];
  59. if(mused[c]>=10){
  60. continue;
  61. }
  62. mloc[c].x[ mused[c] ] = 8-i/2;
  63. mloc[c].y[ mused[c] ] = 'a'+(j-2)/4;
  64. mused[c]++;
  65. }
  66. }
  67. printf("Black: ");
  68. for(int i = 6; i < 12; i++){
  69. int c = sheet[i];
  70. for(int j = 0; j < mused[c]; j++){
  71. if (i < 11)
  72. {
  73. printf("%c", c-32);
  74. }
  75. printf("%c%d", mloc[c].y[j], mloc[c].x[j]);
  76. if(i==11&&j==(mused[c]-1)){
  77. continue;
  78. }
  79. printf(",");
  80. }
  81. }
  82. printf("\n");
  83. return 0;
  84. }

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注