F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20612016_23931.cpp:4:6: error: 'eps' does not name a type
      eps ) {    if ( map[ i ][ j ] != '.' ) {     ans += visit[ i ][ j ] * ( map[ i ][ j ] - '0' );    }    else {     if ( map[ i + 1 ][ j ] != '*' ) {       visit[ i + 1 ][ j ] += visit[ i ][ j ];     }     else {      if ( j > 0 ) {        visit[ i + 1 ][ j - 1 ] += visit[ i ][ j ] / 2;      }      if ( j < m - 1 ) {       visit[ i + 1 ][ j + 1 ] += visit[ i ][ j ] / 2;      }     }    }   }  } } for ( i = 0 ; i < m ; ++i ) {  if ( map[ n - 1 ][ i ] != '*' && map[ n - 1 ][ i ] != '.' ) {   ans += visit[ n - 1 ][ i ] * ( map[ n - 1 ][ i ] - '0' );  } } return ans;} int main () { int i, n, m, t; double ans, temp; scanf ( "%d", &t ); while ( t-- ) {  scanf ( "%d%d", &n, &m );  getchar();  for ( i = 0 ; i < n ; ++i ) {   gets( map[ i ] );   if ( map[ i ][ 0 ] == '\0' ) --i;  }  ans = 0;  for ( i = 0 ; i < m ; ++i ) {   if ( map[ 0 ][ i ] != '.' ) {     if ( map[ 0 ][ i ] == '*' ) temp = 0;    else temp = map[ 0 ][ i ] - '0';   }   else temp = deal( i, n, m );    if ( temp - ans > eps ) ans = temp;  }     printf ( "%.6lf\n", ans );     }     return 0;}
      ^
0_0_20612016_23931.cpp:4:400: error: expected declaration before '}' token
      eps ) {    if ( map[ i ][ j ] != '.' ) {     ans += visit[ i ][ j ] * ( map[ i ][ j ] - '0' );    }    else {     if ( map[ i + 1 ][ j ] != '*' ) {       visit[ i + 1 ][ j ] += visit[ i ][ j ];     }     else {      if ( j > 0 ) {        visit[ i + 1 ][ j - 1 ] += visit[ i ][ j ] / 2;      }      if ( j < m - 1 ) {       visit[ i + 1 ][ j + 1 ] += visit[ i ][ j ] / 2;      }     }    }   }  } } for ( i = 0 ; i < m ; ++i ) {  if ( map[ n - 1 ][ i ] != '*' && map[ n - 1 ][ i ] != '.' ) {   ans += visit[ n - 1 ][ i ] * ( map[ n - 1 ][ i ] - '0' );  } } return ans;} int main () { int i, n, m, t; double ans, temp; scanf ( "%d", &t ); while ( t-- ) {  scanf ( "%d%d", &n, &m );  getchar();  for ( i = 0 ; i < n ; ++i ) {   gets( map[ i ] );   if ( map[ i ][ 0 ] == '\0' ) --i;  }  ans = 0;  for ( i = 0 ; i < m ; ++i ) {   if ( map[ 0 ][ i ] != '.' ) {     if ( map[ 0 ][ i ] == '*' ) temp = 0;    else temp = map[ 0 ][ i ] - '0';   }   else temp = deal( i, n, m );    if ( temp - ans > eps ) ans = temp;  }     printf ( "%.6lf\n", ans );     }     return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-25 08:34:47, Gzip enabled