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_38015505_11380.cpp:6:1: error: expected unqualified-id before numeric constant
 66
 ^
0_0_38015505_11380.cpp: In function 'int dfs(int, int, int)':
0_0_38015505_11380.cpp:11:23: error: 'n' was not declared in this scope
  if (pos + step + 2 > n){
                       ^
0_0_38015505_11380.cpp:12:3: error: 'dp' was not declared in this scope
   dp[pos][step][p] = 0;
   ^
0_0_38015505_11380.cpp:15:6: error: 'dp' was not declared in this scope
  if (dp[pos][step][p] != INF) return dp[pos][step][p];
      ^
0_0_38015505_11380.cpp:21:3: error: 'dp' was not declared in this scope
   dp[pos][step][p] = max(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
   ^
0_0_38015505_11380.cpp:21:31: error: 'a' was not declared in this scope
   dp[pos][step][p] = max(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
                               ^
0_0_38015505_11380.cpp:23:3: error: 'dp' was not declared in this scope
   dp[pos][step][p] = min(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
   ^
0_0_38015505_11380.cpp:23:31: error: 'a' was not declared in this scope
   dp[pos][step][p] = min(d1 + a[pos + step + 1] - a[pos - 1], d2 + a[pos + step + 2] - a[pos - 1]);
                               ^
0_0_38015505_11380.cpp:24:9: error: 'dp' was not declared in this scope
  return dp[pos][step][p];
         ^
0_0_38015505_11380.cpp: In function 'void solve()':
0_0_38015505_11380.cpp:28:14: error: 'n' was not declared in this scope
  scanf("%d",&n);
              ^
0_0_38015505_11380.cpp:30:15: error: 'a' was not declared in this scope
   scanf("%d",&a[i]);
               ^
0_0_38015505_11380.cpp:33:4: error: 'dp' was not declared in this scope
    dp[i][j][0] = dp[i][j][1] = INF;
    ^
0_0_38015505_11380.cpp:36:21: error: 'dp' was not declared in this scope
  printf("%d\n", max(dp[1][0][0], dp[1][1][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-09-28 16:24:31, Gzip enabled