Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

为什么总是Memory Limit Exceed?有什么解决方法?

Posted by glaver at 2003-12-03 21:57:40 on Problem 1028
#include "stdio.h"
main()
{  char str[100][71]={"http://www.acm.org/"};
   char s[71],(*p)[71];
   int i=0,ii=0;
   p=str;
   scanf("%s",s);
 while(s[0]!='Q')
  { if(s[0]=='V')
      {scanf("%s",*++p);
       ii=++i;
       printf("%s\n",*p);
      }
     else if(s[0]=='B')
       { i--;
         if(i<0)
          {i=0;
           printf("Ignored\n");
           }
         else
           printf("%s\n",*--p);
       }
     else if(s[0]=='F')
        { i++;
         if(i>ii)
           {i=ii;
            printf("Ignored\n");
            }
         else
           printf("%s\n",*++p);
        }
   scanf("%s",s);
 }
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator