regions.cpp: In function 'void DFS(int, int)':
regions.cpp:32:46: error: conversion from 'std::map<int, int>' to non-scalar type 'std::unordered_map<int, int>' requested
32 | unordered_map<int, int> tmp = Cdown[u];
| ~~~~~~~^
regions.cpp:33:51: error: cannot convert 'std::unordered_map<int, int>' to 'std::map<int, int>&'
33 | if (SZ(tmp) > SZ(Cdown[v])) Cdown[v].swap(tmp);
| ^~~
| |
| std::unordered_map<int, int>
In file included from /usr/include/c++/9/map:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:81,
from regions.cpp:2:
/usr/include/c++/9/bits/stl_map.h:1121:17: note: initializing argument 1 of 'void std::map<_Key, _Tp, _Compare, _Alloc>::swap(std::map<_Key, _Tp, _Compare, _Alloc>&) [with _Key = int; _Tp = int; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, int> >]'
1121 | swap(map& __x)
| ~~~~~^~~
regions.cpp: In function 'int main()':
regions.cpp:40:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
40 | scanf("%d%d%d%d", &n, &R, &q, &A[1]);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regions.cpp:42:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
42 | int p; scanf("%d%d", &p, &A[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~~
regions.cpp:54:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
54 | int r1, r2; scanf("%d%d", &r1, &r2);
| ~~~~~^~~~~~~~~~~~~~~~~~