| ||||||||||
| 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:谁能告诉我怎么错的? 我理直气壮地说。 昨晚被1002搞得发晕,今天竟让这破题WA了 。。。。。。。。。。。。。。。。。。。。。In Reply To:谁能告诉我怎么错的? 我理直气壮地说。 昨晚被1002搞得发晕,今天竟让这破题WA了 。。。。。。。。。。。。。。。。。。。。。 Posted by:31311069 at 2004-11-01 21:59:35 > #include<stdio.h>
>
> int main ()
> {
> int t[10000] , i , n , pre ,npre , temp , time ,tt ;
> scanf ( "%d",&n );
> i = 0 ;
> while ( n-- )
> {
> scanf ( "%d%d",&temp,&npre );
> tt = 0 ;
> while ( npre-- > 0 )
> {
> scanf ( "%d",&pre ) ;
> if ( tt < t[pre] )
> tt = t[pre] ;
> }
> t[++i] = temp + tt ;
> if ( time < t[i] )
> time = t[i] ;
> }
> printf ( "%d\n",time );
> return 0 ;
> }
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator