F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:祝各位Oier新年快乐,Rp++!
大视野在线测评-欢迎您
[ New Thread ]
Problem 4726 >> 这道题数据有锅,请修正数据。
Lazer2001 @ 2017-10-16 16:41:47
[ Quote ] [ Edit ] [ Delete ] 1#

比较简单的树形DP,但是,存在无法更新答案的情况。
例如:
double ans ( -1.0 ) ;
for ( register int i = 1 ; i <= n ; ++ i )
if ( siz [i] > k ) {
smax ( ans, dp [i] ) ;
}
无法AC

double ans ( 0.0 ) ;
for ( register int i = 1 ; i <= n ; ++ i )
if ( siz [i] > k ) {
smax ( ans, dp [i] ) ;
}
就可以AC
说明存在无法更新答案,也就是每一个点的siz都等于k。
无辜贡献3发WA。
请修正数据,谢谢。
Lazer2001 @ 2017-10-16 16:46:03
[ Quote ] [ Edit ] [ Delete ] 2#
打错了,每一个点的siz都大于等于k
Lazer2001 @ 2017-10-16 16:53:38
[ Quote ] [ Edit ] [ Delete ] 3#
虽然答案不一定保证有解,但是答案等于0有意义?
lavendir @ 2017-10-17 18:08:22
[ Quote ] [ Edit ] [ Delete ] 4#
可发邮件过来拿下数据核对下。3Q
Claris @ 2017-10-17 18:15:37
[ Quote ] [ Edit ] [ Delete ] 5#
二分答案的话,这种情况直接就是0,少一个特判细节。
2711694897 @ 2017-10-17 21:43:46
[ Quote ] [ Edit ] [ Delete ] 6#
@Claris 特判细节是什么呢?
Claris @ 2017-10-17 22:17:29
[ Quote ] [ Edit ] [ Delete ] 7#
就是他WA的地方。
[Top] [Previous Page] [Next Page]

HOME Back