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 我开始还以为左右两边一定是4个字符 NNd

Posted by tzkq at 2008-11-07 04:34:10 on Problem 1013
In Reply To:终于AC了,说说我遇到的问题(用了fflush函数的特别注意!)【附带一些测试数据】 Posted by:Binux at 2008-02-02 23:27:02
> 这一题看记录,我都写了一个月了,权重,分析,穷举3种方法都用了,所有见到过的测试数据都过了,就是没有发现问题。。。。
> 
> 然后和同学讨论之下,发现是用了fflush函数清除缓冲,原来是为了防止有回车干扰而清除的,但是可能就像他说的“可能JUDGE是先一次性把数据都存进BUFF的,你一清,等于没开始做题就做完了...”
> 
> 导致我一直没AC,去掉之后,权重和穷举都AC了。。。
> 
> 唉,亏我写了那么多遍啊。。。。
> 
> 后面是我收集的测试数据,不过这题真的不难,真的是细节啊。。。。
> ----------------------------------------
> 6
> ABCD EFGH even
> ABCI EFJK up
> ABIJ EFGH even
> ABCD EFGH even
> ABCI EFJK down
> ABIJ EFGH even
> ABCD EFGK up
> EFDL ABGK up
> GHIJ EFDK up
> A B up
> B C down
> AC BD up
> A B even
> A C down
> E F even
> A B down
> B C up
> G E even
> ------------------------------------------
> K is the counterfeit coin and it is light.
> K is the counterfeit coin and it is heavy.
> K is the counterfeit coin and it is light.
> B is the counterfeit coin and it is light.
> C is the counterfeit coin and it is heavy.
> B is the counterfeit coin and it is heavy.

我开始还以为左右两边一定是4个字符 NNd

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