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_39876246_5713.cpp:4:1: error: expected ',' or ';' before 'int'
    4 | int val[N][N],dp[N][N][9][9];
      | ^~~
0_0_39876246_5713.cpp: In function 'void init()':
0_0_39876246_5713.cpp:10:13: error: 'dp' was not declared in this scope
   10 |             dp[row][col][0][0] = val[row][col];
      |             ^~
0_0_39876246_5713.cpp:10:34: error: 'val' was not declared in this scope
   10 |             dp[row][col][0][0] = val[row][col];
      |                                  ^~~
0_0_39876246_5713.cpp:22:32: error: 'dp' was not declared in this scope
   22 |                     if(i == 0) dp[row][col][i][j]=max(dp[row][col][i][j-1],dp[row][col+(1<<(j-1))][i][j-1]);
      |                                ^~
0_0_39876246_5713.cpp:23:26: error: 'dp' was not declared in this scope
   23 |                     else dp[row][col][i][j]=max(dp[row][col][i-1][j],dp[row+(1<<(i-1))][col][i-1][j]);
      |                          ^~
0_0_39876246_5713.cpp: In function 'int RMQ2D(int, int, int, int)':
0_0_39876246_5713.cpp:33:14: error: 'dp' was not declared in this scope
   33 |     int m1 = dp[x1][y1][kx][ky];
      |              ^~
0_0_39876246_5713.cpp: In function 'int main()':
0_0_39876246_5713.cpp:48:29: error: 'val' was not declared in this scope
   48 |                 scanf("%d",&val[i][j]);
      |                             ^~~
0_0_39876246_5713.cpp:54:21: error: 'val' was not declared in this scope
   54 |             if(ans==val[x1][y1] || ans==val[x2][y2]
      |                     ^~~


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-01-10 11:37:01, Gzip enabled