0_0_14692781_5246.cpp:28:15: error: conflicting declaration 'std::map<int, int> d'
map<int, int> d, invd;
^
0_0_14692781_5246.cpp:16:5: note: previous declaration as 'int d [10005]'
int d[N], invd[N];
^
0_0_14692781_5246.cpp:28:18: error: conflicting declaration 'std::map<int, int> invd'
map<int, int> d, invd;
^
0_0_14692781_5246.cpp:16:11: note: previous declaration as 'int invd [10005]'
int d[N], invd[N];
^
0_0_14692781_5246.cpp: In function 'long long int query(int, int)':
0_0_14692781_5246.cpp:34:11: error: request for member 'clear' in 'd', which is of non-class type 'int [10005]'
d.clear(), invd.clear(), lastd = 0;
^
0_0_14692781_5246.cpp:34:25: error: request for member 'clear' in 'invd', which is of non-class type 'int [10005]'
d.clear(), invd.clear(), lastd = 0;
^
0_0_14692781_5246.cpp:39:31: error: request for member 'first' in 'p', which is of non-class type 'int'
int tmp = __gcd(p.first, a[i]);
^
0_0_14692781_5246.cpp:40:38: error: request for member 'second' in 'p', which is of non-class type 'int'
update.push_back({tmp, p.second});
^
0_0_14692781_5246.cpp:40:45: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
update.push_back({tmp, p.second});
^
0_0_14692781_5246.cpp:40:45: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
from 0_0_14692781_5246.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(value_type&& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'
0_0_14692781_5246.cpp:48:33: error: request for member 'second' in 'p', which is of non-class type 'int'
sum += 1LL * (i - p.second) * p.first;
^
0_0_14692781_5246.cpp:48:45: error: request for member 'first' in 'p', which is of non-class type 'int'
sum += 1LL * (i - p.second) * p.first;
^
0_0_14692781_5246.cpp:51:18: error: request for member 'count' in 'invd', which is of non-class type 'int [10005]'
if (invd.count(lastd) == 0) {
^
0_0_14692781_5246.cpp:59:31: error: request for member 'first' in 'p', which is of non-class type 'int'
int tmp = __gcd(p.first, a[i]);
^
0_0_14692781_5246.cpp:60:38: error: request for member 'second' in 'p', which is of non-class type 'int'
update.push_back({tmp, p.second});
^
0_0_14692781_5246.cpp:60:45: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(<brace-enclosed initializer list>)'
update.push_back({tmp, p.second});
^
0_0_14692781_5246.cpp:60:45: note: candidates are:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/random.h:34,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/random:49,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:66,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62,
from GCC4.9.2/x86_64-w64-mingw32/include/c++/x86_64-w64-mingw32/bits/stdc++.h:64,
from 0_0_14692781_5246.cpp:1:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:913:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(value_type&& __x)
^
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:931:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'
0_0_14692781_5246.cpp:68:33: error: request for member 'second' in 'p', which is of non-class type 'int'
sum += 1LL * (i - p.second) * p.first;
^
0_0_14692781_5246.cpp:68:45: error: request for member 'first' in 'p', which is of non-class type 'int'
sum += 1LL * (i - p.second) * p.first;
^
0_0_14692781_5246.cpp: In function 'int main()':
0_0_14692781_5246.cpp:92:22: error: 'm' was not declared in this scope
scanf("%d", &m);
^
0_0_14692781_5246.cpp:100:13: error: 'INF' was not declared in this scope
L = INF, R = -INF, sum = 0;
^
|