Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:为什么WA~~~自己测试都是对的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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator