dna.cpp:34:8: error: 'vector' does not name a type
34 | int n; vector<vector<int>>cnt; string s1, s2;
| ^~~~~~
dna.cpp:34:32: error: 'string' does not name a type; did you mean 'stdin'?
34 | int n; vector<vector<int>>cnt; string s1, s2;
| ^~~~~~
| stdin
dna.cpp:36:6: error: variable or field 'init' declared void
36 | void init(string p, string q){
| ^~~~
dna.cpp:36:11: error: 'string' was not declared in this scope
36 | void init(string p, string q){
| ^~~~~~
dna.cpp:36:11: note: suggested alternatives:
In file included from /usr/include/c++/10/string:39,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
dna.cpp:36:21: error: 'string' was not declared in this scope
36 | void init(string p, string q){
| ^~~~~~
dna.cpp:36:21: note: suggested alternatives:
In file included from /usr/include/c++/10/string:39,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/stringfwd.h:79:33: note: 'std::string'
79 | typedef basic_string<char> string;
| ^~~~~~
In file included from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/string:67:11: note: 'std::pmr::string'
67 | using string = basic_string<char>;
| ^~~~~~
dna.cpp: In function 'int get_distance(int, int)':
dna.cpp:60:14: error: 'cnt' was not declared in this scope; did you mean 'int'?
60 | int x1 = cnt[r][0], x2 = cnt[r][1], y1 = cnt[r][2], y2 = cnt[r][3];
| ^~~
| int
dna.cpp:64:28: error: 'x2' was not declared in this scope; did you mean 'x1'?
64 | x1 -= cnt[l-1][0], x2 -= cnt[l-1][1], y1 -= cnt[l-1][2], y2 -= cnt[l-1][3];
| ^~
| x1
dna.cpp:64:47: error: 'y1' was not declared in this scope; did you mean 'z1'?
64 | x1 -= cnt[l-1][0], x2 -= cnt[l-1][1], y1 -= cnt[l-1][2], y2 -= cnt[l-1][3];
| ^~
| z1
dna.cpp:64:66: error: 'y2' was not declared in this scope
64 | x1 -= cnt[l-1][0], x2 -= cnt[l-1][1], y1 -= cnt[l-1][2], y2 -= cnt[l-1][3];
| ^~
dna.cpp:65:28: error: 'z2' was not declared in this scope; did you mean 'z1'?
65 | z1 -= cnt[l-1][4], z2 -= cnt[l-1][5];
| ^~
| z1
dna.cpp:68:22: error: 'y1' was not declared in this scope; did you mean 'z1'?
68 | int ans = min(x1,y1) + min(x2,z1) + min(y2,z2);
| ^~
| z1
dna.cpp:68:15: error: 'min' was not declared in this scope; did you mean 'std::min'?
68 | int ans = min(x1,y1) + min(x2,z1) + min(y2,z2);
| ^~~
| std::min
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/string:40,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: 'std::min' declared here
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
dna.cpp:68:32: error: 'x2' was not declared in this scope; did you mean 'x1'?
68 | int ans = min(x1,y1) + min(x2,z1) + min(y2,z2);
| ^~
| x1
dna.cpp:68:45: error: 'y2' was not declared in this scope
68 | int ans = min(x1,y1) + min(x2,z1) + min(y2,z2);
| ^~
dna.cpp:68:48: error: 'z2' was not declared in this scope; did you mean 'z1'?
68 | int ans = min(x1,y1) + min(x2,z1) + min(y2,z2);
| ^~
| z1
dna.cpp:69:5: error: 'set' was not declared in this scope
69 | set<int>front; set<int>end;
| ^~~
dna.cpp:69:9: error: expected primary-expression before 'int'
69 | set<int>front; set<int>end;
| ^~~
dna.cpp:69:24: error: expected primary-expression before 'int'
69 | set<int>front; set<int>end;
| ^~~
dna.cpp:74:9: error: 'front' was not declared in this scope
74 | front.insert(1); end.insert(2);
| ^~~~~
dna.cpp:74:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
74 | front.insert(1); end.insert(2);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:77:9: error: 'front' was not declared in this scope
77 | front.insert(2); end.insert(1);
| ^~~~~
dna.cpp:77:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
77 | front.insert(2); end.insert(1);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:80:9: error: 'front' was not declared in this scope
80 | front.insert(1); end.insert(3);
| ^~~~~
dna.cpp:80:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
80 | front.insert(1); end.insert(3);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:83:9: error: 'front' was not declared in this scope
83 | front.insert(3); end.insert(1);
| ^~~~~
dna.cpp:83:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
83 | front.insert(3); end.insert(1);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:86:9: error: 'front' was not declared in this scope
86 | front.insert(2); end.insert(3);
| ^~~~~
dna.cpp:86:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
86 | front.insert(2); end.insert(3);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:89:9: error: 'front' was not declared in this scope
89 | front.insert(3); end.insert(2);
| ^~~~~
dna.cpp:89:26: error: 'end' was not declared in this scope; did you mean 'std::end'?
89 | front.insert(3); end.insert(2);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:92:17: error: 'front' was not declared in this scope
92 | bool yes = (front==end and r1==r2 and r2==r3);
| ^~~~~
dna.cpp:92:24: error: 'end' was not declared in this scope; did you mean 'std::end'?
92 | bool yes = (front==end and r1==r2 and r2==r3);
| ^~~
| std::end
In file included from /usr/include/c++/10/string:54,
from dna.h:1,
from dna.cpp:1:
/usr/include/c++/10/bits/range_access.h:110:37: note: 'std::end' declared here
110 | template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
| ^~~
dna.cpp:92:36: error: 'r2' was not declared in this scope; did you mean 'r1'?
92 | bool yes = (front==end and r1==r2 and r2==r3);
| ^~
| r1
dna.cpp:92:47: error: 'r3' was not declared in this scope; did you mean 'r1'?
92 | bool yes = (front==end and r1==r2 and r2==r3);
| ^~
| r1