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:为什么WA~~~自己测试都是对的

Posted by jqandjq at 2009-04-14 20:21:07 on Problem 2965
In Reply To:为什么WA~~~自己测试都是对的 Posted by:jqandjq at 2009-04-14 13:04:55
> 		for (i=0;i<4;i++)
> 		{
> 			scanf("%s",str[i]);
> 		}
> 		for (i=0;i<4;i++)
> 		{
> 			for (j=0;j<4;j++)
> 			{
> 				if (str[i][j] == '+')
> 				{
> 					start |= (1<<k);
> 				}
> 				k--;
> 			}
> 		}
我晕,这个输入改成:
                char c;
		int num = 32768;
		for (i = 0; i < 4; ++i) 
		{
			for (j = 0; j < 4; ++j) 
			{
				scanf("%c", &c);
				if (c == '+')
					start += num;
				num >>= 1; //
			}
			getchar();
		}
就对了,这是什么情况~~~
郁闷~

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