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

Re:为什么一直是output limited exceed啊!那为高手帮忙看看,谢谢了!

Posted by Jiang_Jian at 2008-06-17 19:48:38 on Problem 1056
In Reply To:为什么一直是output limited exceed啊!那为高手帮忙看看,谢谢了! Posted by:lianxi at 2005-04-22 19:27:19
>  打击的 !
> #include <iostream.h>
> #include <string.h>
> 
> int set=1;
> char get[100][200];
> int i, j, k;
> int count = 0;
> 
> void fun()
> {
> 	for ( i = 1; i < count; i++ )
> 	{
> 		for ( j = i - 1; j >= 0; j-- )
> 		{
> 			for ( k = 0; get[i][k] != '\0' && get[j][k] != '\0'; k++)
> 			{
> 				if ( get[i][k] != get[j][k] )
> 					break;
> 			}
> 			if ( get[i][k] == '\0' || get[j][k] == '\0' )
> 			{
> 				cout << "Set " << set++ << " is not immediately decodable." << endl;
> 				count = 0;
> 				return;
> 			}
> 		}
> 	}
> 	cout << "Set " << set++ << " is immediately decodable." << endl;
> 	count = 0;
> }
> 
> void main()
> {
> 	while (true)
> 	{
> 		for ( i = 0; ; i++ )
> 		{
> 			cin >> get[i];
> 			if ( strcmp(get[i],"9") == 0 )
> 			{
> 				if ( i == 0 )
> 					return;
> 				break;
> 			}
> 			count++;
> 		}
> 		fun();
> 	}
> 
> }

将while(true)改成while(cin>>get[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