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

为什么我的C++能过,G++却RE呢??

Posted by MajiaOfMe at 2006-09-21 13:49:29 on Problem 2997
是不是我的输入处理出了问题,帮忙看一下:
int main()
{
	int i,j,k,p,q;
	int sum;

	//freopen("2997.in","r",stdin);
	while(scanf("%c",&ss[0])!=EOF)
	{
		sum=0;
		l=0;
		while(ss[l]!='\n')
		{
			if(ss[l]=='m'){ sum+=1000; l=0; }
			else if(ss[l]=='i' || ss[l]=='v' || ss[l]=='x' || ss[l]=='l' || ss[l]=='c' || ss[l]=='d')l++;
			ss[l]=getchar();
		}
		ss[l]='\0';
                  .................
          }
          return 0;
}

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