race.cpp:106:39: error: redefinition of 'template<class T1, class T2> std::ostream& operator<<(std::ostream&, const std::pair<_T1, _T2>&)'
template<class T1, class T2> ostream& operator<<(ostream& os, const pair<T1,T2>& a) { os << '{' << a.f << ", " << a.s << '}'; return os; }
^~~~~~~~
race.cpp:20:39: note: 'template<class T1, class T2> std::ostream& operator<<(std::ostream&, const std::pair<_T1, _T2>&)' previously declared here
template<class T1, class T2> ostream& operator<<(ostream& os, const pair<T1,T2>& a) { os << '{' << a.f << ", " << a.s << '}'; return os; }
^~~~~~~~
race.cpp:107:28: error: redefinition of 'template<class T> std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)'
template<class T> ostream& operator<<(ostream& os, const vector<T>& a){os << '{';for(int i=0;i<sz(a);i++){if(i>0&&i<sz(a))os << ", ";os << a[i];}os<<'}';return os;}
^~~~~~~~
race.cpp:21:28: note: 'template<class T> std::ostream& operator<<(std::ostream&, const std::vector<_Tp>&)' previously declared here
template<class T> ostream& operator<<(ostream& os, const vector<T>& a){os << '{';for(int i=0;i<sz(a);i++){if(i>0&&i<sz(a))os << ", ";os << a[i];}os<<'}';return os;}
^~~~~~~~
race.cpp:108:28: error: redefinition of 'template<class T> std::ostream& operator<<(std::ostream&, const std::set<T>&)'
template<class T> ostream& operator<<(ostream& os, const set<T>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:22:28: note: 'template<class T> std::ostream& operator<<(std::ostream&, const std::set<T>&)' previously declared here
template<class T> ostream& operator<<(ostream& os, const set<T>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:109:28: error: redefinition of 'template<class T> std::ostream& operator<<(std::ostream&, const std::multiset<T>&)'
template<class T> ostream& operator<<(ostream& os, const multiset<T>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:23:28: note: 'template<class T> std::ostream& operator<<(std::ostream&, const std::multiset<T>&)' previously declared here
template<class T> ostream& operator<<(ostream& os, const multiset<T>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:110:38: error: redefinition of 'template<class T1, class T2> std::ostream& operator<<(std::ostream&, const std::map<T1, T2>&)'
template<class T1,class T2> ostream& operator<<(ostream& os, const map<T1,T2>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:24:38: note: 'template<class T1, class T2> std::ostream& operator<<(std::ostream&, const std::map<T1, T2>&)' previously declared here
template<class T1,class T2> ostream& operator<<(ostream& os, const map<T1,T2>& a) {os << '{';int i=0;for(auto p:a){if(i>0&&i<sz(a))os << ", ";os << p;i++;}os << '}';return os;}
^~~~~~~~
race.cpp:111:11: error: redefinition of 'const int N'
const int N=501;
^
race.cpp:25:11: note: 'const int N' previously defined here
const int N=501;
^
race.cpp:112:14: error: redefinition of 'bool adj [501][501]'
bool adj[N][N];
^
race.cpp:26:6: note: 'bool adj [501][501]' previously declared here
bool adj[N][N];
^~~
race.cpp:113:16: error: redefinition of 'int dp1 [501][501][2]'
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^
race.cpp:27:5: note: 'int dp1 [501][501][2]' previously declared here
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^~~
race.cpp:113:29: error: redefinition of 'int dp2 [501][501][2]'
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^
race.cpp:27:18: note: 'int dp2 [501][501][2]' previously declared here
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^~~
race.cpp:113:42: error: redefinition of 'int dp3 [501][501][2]'
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^
race.cpp:27:31: note: 'int dp3 [501][501][2]' previously declared here
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^~~
race.cpp:113:50: error: redefinition of 'int b [501][2]'
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^
race.cpp:27:44: note: 'int b [501][2]' previously declared here
int dp1[N][N][2],dp2[N][N][2],dp3[N][N][2],b[N][2];
^
race.cpp:114:15: error: redefinition of 'std::pair<int, int> ans'
pair<int,int> ans;
^~~
race.cpp:28:15: note: 'std::pair<int, int> ans' previously defined here
pair<int,int> ans;
^~~
race.cpp: In function 'void calc(int, int, int)':
race.cpp:115:6: error: redefinition of 'void calc(int, int, int)'
void calc(int l,int r,int a)
^~~~
race.cpp:29:6: note: 'void calc(int, int, int)' previously defined here
void calc(int l,int r,int a)
^~~~
race.cpp: In function 'int main()':
race.cpp:130:5: error: redefinition of 'int main()'
int main()
^~~~
race.cpp:44:5: note: 'int main()' previously defined here
int main()
^~~~
race.cpp: In function 'int main()':
race.cpp:47:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&n,&k);
~~~~~^~~~~~~~~~~~~~~
race.cpp:51:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&t);
~~~~~^~~~~~~~~
race.cpp:55:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&t);
~~~~~^~~~~~~~~
race.cpp: In function 'int main()':
race.cpp:133:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&n,&k);
~~~~~^~~~~~~~~~~~~~~
race.cpp:137:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&t);
~~~~~^~~~~~~~~
race.cpp:141:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i",&t);
~~~~~^~~~~~~~~