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_38703899_17469.cpp: In function 'void solve()':
0_0_38703899_17469.cpp:31:9: error: 'pair' was not declared in this scope
   31 |     map<pair<ll, ll>, vector<ll>> vis[2];
      |         ^~~~
0_0_38703899_17469.cpp:1:1: note: 'std::pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
  +++ |+#include <utility>
    1 | using namespace std;
0_0_38703899_17469.cpp:31:5: error: 'map' was not declared in this scope
   31 |     map<pair<ll, ll>, vector<ll>> vis[2];
      |     ^~~
0_0_38703899_17469.cpp:1:1: note: 'std::map' is defined in header '<map>'; did you forget to '#include <map>'?
  +++ |+#include <map>
    1 | using namespace std;
0_0_38703899_17469.cpp:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
0_0_38703899_17469.cpp:31:14: note: in expansion of macro 'll'
   31 |     map<pair<ll, ll>, vector<ll>> vis[2];
      |              ^~
0_0_38703899_17469.cpp:33:5: error: 'cin' was not declared in this scope
   33 |     cin >> n >> q;
      |     ^~~
0_0_38703899_17469.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 | using namespace std;
0_0_38703899_17469.cpp:44:17: error: 'vis' was not declared in this scope
   44 |                 vis[flag^1][{u, v}].push_back(v);
      |                 ^~~
0_0_38703899_17469.cpp:56:24: error: 'vis' was not declared in this scope
   56 |     for (auto [a, b] : vis[0]) {
      |                        ^~~
0_0_38703899_17469.cpp:57:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   57 |         sort(vis[0][a].begin(), vis[0][a].end());
      |         ^~~~
      |         short
0_0_38703899_17469.cpp:65:24: error: 'vis' was not declared in this scope
   65 |     for (auto [a, b] : vis[1]) {
      |                        ^~~
0_0_38703899_17469.cpp:66:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   66 |         sort(vis[1][a].begin(), vis[1][a].end());
      |         ^~~~
      |         short
0_0_38703899_17469.cpp:80:23: error: 'vis' was not declared in this scope
   80 |             auto it = vis[1][ {a, 0}].end() - lower_bound(vis[1][ {a, 0}].begin(), vis[1][ {a, 0}].end(), a);
      |                       ^~~
0_0_38703899_17469.cpp:80:47: error: 'lower_bound' was not declared in this scope
   80 |             auto it = vis[1][ {a, 0}].end() - lower_bound(vis[1][ {a, 0}].begin(), vis[1][ {a, 0}].end(), a);
      |                                               ^~~~~~~~~~~
0_0_38703899_17469.cpp:83:13: error: 'cout' was not declared in this scope
   83 |             cout << ans << '\n';
      |             ^~~~
0_0_38703899_17469.cpp:83:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_38703899_17469.cpp:87:23: error: 'vis' was not declared in this scope
   87 |             auto it = vis[1][ {b, a % b}].end() - lower_bound(vis[1][ {b, a % b}].begin(), vis[1][ {b, a % b}].end(), a);
      |                       ^~~
0_0_38703899_17469.cpp:87:51: error: 'lower_bound' was not declared in this scope
   87 |             auto it = vis[1][ {b, a % b}].end() - lower_bound(vis[1][ {b, a % b}].begin(), vis[1][ {b, a % b}].end(), a);
      |                                                   ^~~~~~~~~~~
0_0_38703899_17469.cpp:95:9: error: 'cout' was not declared in this scope
   95 |         cout << ans/2 << '\n';
      |         ^~~~
0_0_38703899_17469.cpp:95:9: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_38703899_17469.cpp: In function 'int main()':
0_0_38703899_17469.cpp:99:5: error: 'ios' has not been declared
   99 |     ios::sync_with_stdio(0);
      |     ^~~
0_0_38703899_17469.cpp:100:5: error: 'cin' was not declared in this scope
  100 |     cin.tie(0);
      |     ^~~
0_0_38703899_17469.cpp:100:5: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_38703899_17469.cpp:101:5: error: 'cout' was not declared in this scope
  101 |     cout.tie(0);
      |     ^~~~
0_0_38703899_17469.cpp:101:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?


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-12-02 05:16:37, Gzip enabled