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:跪求:我的程序在自己机器上运行是正确的但是怎么提交的时候总是通不过呢?请各位大侠指教!

Posted by devil_binary at 2007-05-13 21:18:20
In Reply To:跪求:我的程序在自己机器上运行是正确的但是怎么总是通不过呢?请各位大侠指教! Posted by:devil_binary at 2007-05-13 21:15:54
> #include    <iostream>
> using namespace std ; 
> 
> int             frog( int x , int y , int m , int n , int l ) ;
> 
> int             main()
> {
>                 int   x , y , m , n , l ;
>                 int     temp ;
>                 cin >> x >> y >> m >> n >> l ;
>                 temp = frog( x , y , m , n , l ) ;
>                 if( temp == 0 )
>                 cout << "Impossible" << endl ; 
>                 else
>                 cout << temp << endl ;
>                 system("pause") ;
>                 return         0 ;                
> }
> 
> int             frog( int x , int y , int m , int n , int l ) 
> {
>                 int   count = 0 ;
>                 while( x != y )
>                 {       
>                         x += m ; 
>                         x %= l ;
>                         y += n ;
>                         y %= l ;
>                         count++ ; 
>                         if( count > 20000 )
>                         {
>                             return   0 ;   
>                         }
>                 }               
>                 return          count ;
> 
> }

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