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_38711019_9143.cpp: In function 'void solve()':
0_0_38711019_9143.cpp:37:5: error: 'vector' was not declared in this scope
   37 |     vector<int> a(n+1) ;
      |     ^~~~~~
0_0_38711019_9143.cpp:6:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    5 | #include<algorithm>
  +++ |+#include <vector>
    6 | using namespace std;
0_0_38711019_9143.cpp:8:13: error: expected primary-expression before 'long'
    8 | #define int long long
      |             ^~~~
0_0_38711019_9143.cpp:37:12: note: in expansion of macro 'int'
   37 |     vector<int> a(n+1) ;
      |            ^~~
0_0_38711019_9143.cpp:38:34: error: 'a' was not declared in this scope
   38 |     for(int i=1;i<=n;i++) cin >> a[i] ;
      |                                  ^
0_0_38711019_9143.cpp:40:16: error: expected primary-expression before '>' token
   40 |     vector<node> qu(m+1) ;
      |                ^
0_0_38711019_9143.cpp:40:18: error: 'qu' was not declared in this scope
   40 |     vector<node> qu(m+1) ;
      |                  ^~
0_0_38711019_9143.cpp:8:13: error: expected primary-expression before 'long'
    8 | #define int long long
      |             ^~~~
0_0_38711019_9143.cpp:50:12: note: in expansion of macro 'int'
   50 |     vector<int> ans(m+1) ;
      |            ^~~
0_0_38711019_9143.cpp:53:21: error: 'a' was not declared in this scope
   53 |             if(!vis[a[j]]) {
      |                     ^
0_0_38711019_9143.cpp:60:17: error: 'a' was not declared in this scope
   60 |             vis[a[j]] = j ;
      |                 ^
0_0_38711019_9143.cpp:63:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   63 |         ans[qu[i].id] = query(qu[i].r) - query(qu[i].l-1) ;
      |         ^~~
      |         abs
0_0_38711019_9143.cpp:66:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   66 |         cout<<ans[i]<<"\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-05-18 21:04:52, Gzip enabled