dreaming.cpp:68:7: error: stray '#' in program
} #include "dreaming.h"
^
dreaming.cpp:131:3: error: stray '#' in program
} #include "dreaming.h"
^
dreaming.cpp:198:7: error: stray '#' in program
} #include "dreaming.h"
^
dreaming.cpp:68:8: error: 'include' does not name a type
} #include "dreaming.h"
^~~~~~~
dreaming.cpp:87:19: error: redefinition of 'std::vector<std::pair<int, int> > edg [100005]'
vector <pii> edg[N];
^
dreaming.cpp:20:14: note: 'std::vector<std::pair<int, int> > edg [100005]' previously declared here
vector <pii> edg[N];
^~~
dreaming.cpp:88:14: error: conflicting declaration 'std::vector<int> se'
vector <int> se;
^~
dreaming.cpp:21:16: note: previous declaration as 'std::multiset<int> se'
multiset <int> se;
^~
dreaming.cpp:89:4: error: redefinition of 'long long int dist'
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:22:4: note: 'long long int dist' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:89:14: error: redefinition of 'long long int dp [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:10: note: 'long long int dp [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:89:22: error: redefinition of 'long long int dp1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:17: note: 'long long int dp1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:89:29: error: redefinition of 'long long int up [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:25: note: 'long long int up [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:89:37: error: redefinition of 'long long int up1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:32: note: 'long long int up1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:90:10: error: redefinition of 'int vis [100005]'
int vis[N];
^
dreaming.cpp:23:5: note: 'int vis [100005]' previously declared here
int vis[N];
^~~
dreaming.cpp: In function 'void dfs(int, long long int)':
dreaming.cpp:91:6: error: redefinition of 'void dfs(int, long long int)'
void dfs(int u, ll mx){
^~~
dreaming.cpp:24:6: note: 'void dfs(int, long long int)' previously defined here
void dfs(int u, ll mx){
^~~
dreaming.cpp: In function 'void dfs1(int, long long int)':
dreaming.cpp:100:6: error: redefinition of 'void dfs1(int, long long int)'
void dfs1(int u, ll mx){
^~~~
dreaming.cpp:33:6: note: 'void dfs1(int, long long int)' previously defined here
void dfs1(int u, ll mx){
^~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:112:5: error: redefinition of 'int travelTime(int, int, int, int*, int*, int*)'
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp:45:5: note: 'int travelTime(int, int, int, int*, int*, int*)' previously defined here
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp:80:12: error: 'class std::multiset<int>' has no member named 'push_back'
#define pb push_back
^
dreaming.cpp:124:10: note: in expansion of macro 'pb'
se.pb(dist);
^~
dreaming.cpp:128:31: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
if (se.size() == 2) return se[0] + se[1] + L;
^
dreaming.cpp:128:39: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
if (se.size() == 2) return se[0] + se[1] + L;
^
dreaming.cpp:129:16: error: 'class std::multiset<int>' has no member named 'back'
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^~~~
dreaming.cpp:129:27: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
dreaming.cpp:129:42: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
dreaming.cpp:129:54: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
dreaming.cpp: At global scope:
dreaming.cpp:131:4: error: 'include' does not name a type
} #include "dreaming.h"
^~~~~~~
dreaming.cpp:150:19: error: redefinition of 'std::vector<std::pair<int, int> > edg [100005]'
vector <pii> edg[N];
^
dreaming.cpp:20:14: note: 'std::vector<std::pair<int, int> > edg [100005]' previously declared here
vector <pii> edg[N];
^~~
dreaming.cpp:151:16: error: redefinition of 'std::multiset<int> se'
multiset <int> se;
^~
dreaming.cpp:21:16: note: 'std::multiset<int> se' previously declared here
multiset <int> se;
^~
dreaming.cpp:152:4: error: redefinition of 'long long int dist'
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:22:4: note: 'long long int dist' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:152:14: error: redefinition of 'long long int dp [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:10: note: 'long long int dp [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:152:22: error: redefinition of 'long long int dp1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:17: note: 'long long int dp1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:152:29: error: redefinition of 'long long int up [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:25: note: 'long long int up [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:152:37: error: redefinition of 'long long int up1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:32: note: 'long long int up1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:153:10: error: redefinition of 'int vis [100005]'
int vis[N];
^
dreaming.cpp:23:5: note: 'int vis [100005]' previously declared here
int vis[N];
^~~
dreaming.cpp: In function 'void dfs(int, long long int)':
dreaming.cpp:154:6: error: redefinition of 'void dfs(int, long long int)'
void dfs(int u, ll mx){
^~~
dreaming.cpp:24:6: note: 'void dfs(int, long long int)' previously defined here
void dfs(int u, ll mx){
^~~
dreaming.cpp: In function 'void dfs1(int, long long int)':
dreaming.cpp:163:6: error: redefinition of 'void dfs1(int, long long int)'
void dfs1(int u, ll mx){
^~~~
dreaming.cpp:33:6: note: 'void dfs1(int, long long int)' previously defined here
void dfs1(int u, ll mx){
^~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:175:5: error: redefinition of 'int travelTime(int, int, int, int*, int*, int*)'
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp:45:5: note: 'int travelTime(int, int, int, int*, int*, int*)' previously defined here
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp: At global scope:
dreaming.cpp:198:8: error: 'include' does not name a type
} #include "dreaming.h"
^~~~~~~
dreaming.cpp:217:19: error: redefinition of 'std::vector<std::pair<int, int> > edg [100005]'
vector <pii> edg[N];
^
dreaming.cpp:20:14: note: 'std::vector<std::pair<int, int> > edg [100005]' previously declared here
vector <pii> edg[N];
^~~
dreaming.cpp:218:14: error: conflicting declaration 'std::vector<int> se'
vector <int> se;
^~
dreaming.cpp:21:16: note: previous declaration as 'std::multiset<int> se'
multiset <int> se;
^~
dreaming.cpp:219:4: error: redefinition of 'long long int dist'
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:22:4: note: 'long long int dist' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~~
dreaming.cpp:219:14: error: redefinition of 'long long int dp [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:10: note: 'long long int dp [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:219:22: error: redefinition of 'long long int dp1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:17: note: 'long long int dp1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:219:29: error: redefinition of 'long long int up [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:25: note: 'long long int up [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~
dreaming.cpp:219:37: error: redefinition of 'long long int up1 [100005]'
ll dist, dp[N], dp1[N], up[N], up1[N];
^
dreaming.cpp:22:32: note: 'long long int up1 [100005]' previously declared here
ll dist, dp[N], dp1[N], up[N], up1[N];
^~~
dreaming.cpp:220:10: error: redefinition of 'int vis [100005]'
int vis[N];
^
dreaming.cpp:23:5: note: 'int vis [100005]' previously declared here
int vis[N];
^~~
dreaming.cpp: In function 'void dfs(int, long long int)':
dreaming.cpp:221:6: error: redefinition of 'void dfs(int, long long int)'
void dfs(int u, ll mx){
^~~
dreaming.cpp:24:6: note: 'void dfs(int, long long int)' previously defined here
void dfs(int u, ll mx){
^~~
dreaming.cpp: In function 'void dfs1(int, long long int)':
dreaming.cpp:230:6: error: redefinition of 'void dfs1(int, long long int)'
void dfs1(int u, ll mx){
^~~~
dreaming.cpp:33:6: note: 'void dfs1(int, long long int)' previously defined here
void dfs1(int u, ll mx){
^~~~
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:242:5: error: redefinition of 'int travelTime(int, int, int, int*, int*, int*)'
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp:45:5: note: 'int travelTime(int, int, int, int*, int*, int*)' previously defined here
int travelTime(int n, int m, int L, int A[], int B[], int T[]) {
^~~~~~~~~~
dreaming.cpp:210:12: error: 'class std::multiset<int>' has no member named 'push_back'
#define pb push_back
^
dreaming.cpp:254:10: note: in expansion of macro 'pb'
se.pb(dist);
^~
dreaming.cpp:258:31: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
if (se.size() == 2) return se[0] + se[1] + L;
^
dreaming.cpp:258:39: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
if (se.size() == 2) return se[0] + se[1] + L;
^
dreaming.cpp:259:16: error: 'class std::multiset<int>' has no member named 'back'
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^~~~
dreaming.cpp:259:27: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
dreaming.cpp:259:42: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
dreaming.cpp:259:54: error: no match for 'operator[]' (operand types are 'std::multiset<int>' and 'int')
return max(se.back() + se[k - 2] + L, se[k - 2] + se[k - 3] + 2 * L);
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_Rb_tree_const_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/7/bits/stl_algo.h:4836:18: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::_Rb_tree_const_iterator<int>]'
dreaming.cpp:126:30: required from here
/usr/include/c++/7/bits/stl_algo.h:1969:22: error: no match for 'operator-' (operand types are 'std::_Rb_tree_const_iterator<int>' and 'std::_Rb_tree_const_iterator<int>')
std::__lg(__last - __first) * 2,
~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:389:5: note: candidate: template<class _IteratorL, class _IteratorR> decltype ((__y.base() - __x.base())) std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
operator-(const reverse_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:389:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:1969:22: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::reverse_iterator<_Iterator>'
std::__lg(__last - __first) * 2,
~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:67:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_iterator.h:1191:5: note: candidate: template<class _IteratorL, class _IteratorR> decltype ((__x.base() - __y.base())) std::operator-(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&)
operator-(const move_iterator<_IteratorL>& __x,
^~~~~~~~
/usr/include/c++/7/bits/stl_iterator.h:1191:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:1969:22: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::move_iterator<_IteratorL>'
std::__lg(__last - __first) * 2,
~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/7/ccomplex:39:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from dreaming.cpp:2:
/usr/include/c++/7/complex:356:5: note: candidate: template<class _Tp> std::complex<_Tp> std::operator-(const std::complex<_Tp>&, const std::complex<_Tp>&)
operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
^~~~~~~~
/usr/include/c++/7/complex:356:5: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:1969:22: note: 'std::_Rb_tree_const_iterator<int>' is not derived from 'const std::complex<_Tp>'
std::__lg(__last - __first) * 2,
~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/7/ccomplex:39:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from dreaming.cpp:2:
/