Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out

View Compilation Error

1_867_1679_14989.cpp: In function 'long double dfs(int, int)':
1_867_1679_14989.cpp:6:12: error: expected primary-expression before 'long'
 #define lb long double
            ^
1_867_1679_14989.cpp:13:51: note: in expansion of macro 'lb'
  return dp[q][c] = c * p * ((lb)q / 200.0) + p * (lb(200 - q) / 200.0) * dfs(q + 4, c + 1) + (1 - p)*dfs(q + 3, c + 1);
                                                   ^
1_867_1679_14989.cpp:6:12: error: expected ')' before 'long'
 #define lb long double
            ^
1_867_1679_14989.cpp:13:51: note: in expansion of macro 'lb'
  return dp[q][c] = c * p * ((lb)q / 200.0) + p * (lb(200 - q) / 200.0) * dfs(q + 4, c + 1) + (1 - p)*dfs(q + 3, c + 1);
                                                   ^


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-07-03 15:36:01, Gzip enabled