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_19231202_3873.cpp:14:1: error: expected unqualified-id before 'using'
 using namespace std;
 ^
0_0_19231202_3873.cpp:18:18: error: 'dp' does not name a type
 int MAXN = 20;DB dp[MAXN][MAXN];
                  ^
0_0_19231202_3873.cpp: In function 'void init()':
0_0_19231202_3873.cpp:21:37: error: 'dp' was not declared in this scope
 int j = 0; j <= 10; j++)            dp[i][j] = 0.0;}
                                     ^
0_0_19231202_3873.cpp: In function 'int main()':
0_0_19231202_3873.cpp:23:19: error: 'p' was not declared in this scope
 int main(){    DB p;    while(scanf("%lf",&p) != EOF){        if(p == -1.0) break;        init();        for(
                   ^
0_0_19231202_3873.cpp:24:24: error: 'dp' was not declared in this scope
 int i = 0; i < 3; i++) dp[4][i] = 1.0;        dp[3][3] = p * p / (1 - p * (1 - p) * 2);        for(
                        ^
0_0_19231202_3873.cpp:24:47: error: 'dp' was not declared in this scope
 int i = 0; i < 3; i++) dp[4][i] = 1.0;        dp[3][3] = p * p / (1 - p * (1 - p) * 2);        for(
                                               ^
0_0_19231202_3873.cpp:26:161: error: 'gp' was not declared in this scope
 int j = 3; j >= 0;j--){                if(i == 3 && j == 3) continue;                dp[i][j] = p * dp[i+1][j] + (1 - p) * dp[i][j + 1];            }        DB gp = dp[0][0];        init();        for(
                                                                                                                                                                 ^
0_0_19231202_3873.cpp:29:161: error: 'p7' was not declared in this scope
 int j = 6; j >= 0;j--){                if(i == 6 && j == 6) continue;                dp[i][j] = p * dp[i+1][j] + (1 - p) * dp[i][j + 1];            }        DB p7 = dp[0][0];        init();        dp[6][6] = p7;        dp[6][5] = gp + (1.0 - gp) * dp[6][6];        dp[5][6] = gp * dp[6][6];        for(
                                                                                                                                                                 ^
0_0_19231202_3873.cpp:32:116: error: 'sp' was not declared in this scope
 int j = 5;j >= 0;j--){                dp[i][j] = gp * dp[i+1][j] + (1.0 - gp) * dp[i][j+1];            }        DB sp = dp[0][0];        init();        for(
                                                                                                                    ^
0_0_19231202_3873.cpp:35:118: error: 'mp' was not declared in this scope
 int j = 1; j >= 0; j--){                dp[i][j] = dp[i+1][j] * sp + dp[i][j+1] * (1.0 - sp);            }        DB mp = dp[0][0];        printf("%.11f %.11f %.11f\n",gp,sp,mp);    }    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-05-05 20:23:49, Gzip enabled