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_39604631_17953.cpp: In function 'int main()':
0_0_39604631_17953.cpp:29:16: error: 'vis' was not declared in this scope; did you mean 'dis'?
   29 |         memset(vis,false,sizeof(vis));
      |                ^~~
      |                dis
0_0_39604631_17953.cpp:57:54: error: expected ']' before ')' token
   57 |             k=lg2[r-l+1],t1=dp[l][k],t2=dp[r-(1<<k)+1)][k],ans;
      |                                                      ^
      |                                                      ]
0_0_39604631_17953.cpp:57:54: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   57 |             k=lg2[r-l+1],t1=dp[l][k],t2=dp[r-(1<<k)+1)][k],ans;
      |                                         ~~~~~~~~~~~~~^
      |                                                      |
      |                                                      int*
0_0_39604631_17953.cpp:57:54: error: expected ',' or ';' before ')' token
   57 |             k=lg2[r-l+1],t1=dp[l][k],t2=dp[r-(1<<k)+1)][k],ans;
      |                                                      ^
0_0_39604631_17953.cpp:59:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   59 |                 ans=t1;
      |                 ^~~
      |                 abs
0_0_39604631_17953.cpp:62:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   62 |                 ans=t2;
      |                 ^~~
      |                 abs
0_0_39604631_17953.cpp:64:39: error: 'ans' was not declared in this scope; did you mean 'abs'?
   64 |             cout<<dis[a]+dis[b]-2*dis[ans]<<'\n';
      |                                       ^~~
      |                                       abs


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-27 01:02:56, Gzip enabled