selling_rna.cpp:3: warning: "MAXN" redefined
3 | #define MAXN 2000007
|
selling_rna.cpp:2: note: this is the location of the previous definition
2 | #define MAXN 100007
|
selling_rna.cpp:18:13: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
18 | node prefix[MAXS],suffix[MAXS];
| ^~~~
| MAXN
selling_rna.cpp:18:26: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
18 | node prefix[MAXS],suffix[MAXS];
| ^~~~
| MAXN
selling_rna.cpp: In function 'void transform(std::string&)':
selling_rna.cpp:22:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
22 | for(int f=0;f<s.size();f++){
| ~^~~~~~~~~
selling_rna.cpp: In function 'void add(std::string, int)':
selling_rna.cpp:30:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
30 | for(int i=0;i<s.size();i++){
| ~^~~~~~~~~
selling_rna.cpp:31:12: error: 'prefix' was not declared in this scope
31 | if(prefix[curr].ch[s[i]-'A']==0){
| ^~~~~~
selling_rna.cpp:35:14: error: 'prefix' was not declared in this scope
35 | curr=prefix[curr].ch[s[i]-'A'];
| ^~~~~~
selling_rna.cpp:38:5: error: 'prefix' was not declared in this scope
38 | prefix[curr].words.push_back(id);
| ^~~~~~
selling_rna.cpp:43:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
43 | for(int i=0;i<s.size();i++){
| ~^~~~~~~~~
selling_rna.cpp:44:12: error: 'suffix' was not declared in this scope
44 | if(suffix[curr].ch[s[i]-'A']==0){
| ^~~~~~
selling_rna.cpp:48:14: error: 'suffix' was not declared in this scope
48 | curr=suffix[curr].ch[s[i]-'A'];
| ^~~~~~
selling_rna.cpp:51:5: error: 'suffix' was not declared in this scope
51 | suffix[curr].words.push_back(id);
| ^~~~~~
selling_rna.cpp: At global scope:
selling_rna.cpp:57:10: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
57 | int mins[MAXS],maxs[MAXS];
| ^~~~
| MAXN
selling_rna.cpp:57:21: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
57 | int mins[MAXS],maxs[MAXS];
| ^~~~
| MAXN
selling_rna.cpp:58:10: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
58 | int from[MAXS],to[MAXS];
| ^~~~
| MAXN
selling_rna.cpp:58:19: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
58 | int from[MAXS],to[MAXS];
| ^~~~
| MAXN
selling_rna.cpp: In function 'void dfs(int)':
selling_rna.cpp:61:5: error: 'mins' was not declared in this scope
61 | mins[x]=num+1;
| ^~~~
selling_rna.cpp:63:15: error: 'prefix' was not declared in this scope
63 | for(int i:prefix[x].words){
| ^~~~~~
selling_rna.cpp:68:12: error: 'prefix' was not declared in this scope
68 | if(prefix[x].ch[i]!=0)dfs(prefix[x].ch[i]);
| ^~~~~~
selling_rna.cpp:71:5: error: 'maxs' was not declared in this scope
71 | maxs[x]=num;
| ^~~~
selling_rna.cpp: In function 'void dfs2(int)':
selling_rna.cpp:75:5: error: 'from' was not declared in this scope
75 | from[x]=pos+1;
| ^~~~
selling_rna.cpp:77:15: error: 'suffix' was not declared in this scope
77 | for(int i:suffix[x].words){
| ^~~~~~
selling_rna.cpp:82:12: error: 'suffix' was not declared in this scope
82 | if(suffix[x].ch[i]!=0)dfs2(suffix[x].ch[i]);
| ^~~~~~
selling_rna.cpp:85:5: error: 'to' was not declared in this scope; did you mean 't'?
85 | to[x]=pos;
| ^~
| t
selling_rna.cpp: In function 'int findpref(std::string)':
selling_rna.cpp:91:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | for(int i=0;i<s.size();i++){
| ~^~~~~~~~~
selling_rna.cpp:92:12: error: 'prefix' was not declared in this scope
92 | if(prefix[curr].ch[s[i]-'A']==0)return -1;
| ^~~~~~
selling_rna.cpp:93:14: error: 'prefix' was not declared in this scope
93 | curr=prefix[curr].ch[s[i]-'A'];
| ^~~~~~
selling_rna.cpp: In function 'int findsuff(std::string)':
selling_rna.cpp:103:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
103 | for(int i=0;i<s.size();i++){
| ~^~~~~~~~~
selling_rna.cpp:104:12: error: 'suffix' was not declared in this scope
104 | if(suffix[curr].ch[s[i]-'A']==0)return -1;
| ^~~~~~
selling_rna.cpp:105:14: error: 'suffix' was not declared in this scope
105 | curr=suffix[curr].ch[s[i]-'A'];
| ^~~~~~
selling_rna.cpp: At global scope:
selling_rna.cpp:111:21: error: 'MAXS' was not declared in this scope; did you mean 'MAXN'?
111 | vector<event> query[MAXS];
| ^~~~
| MAXN
selling_rna.cpp: In function 'int main()':
selling_rna.cpp:161:12: error: 'mins' was not declared in this scope
161 | if(mins[a]>maxs[a] or from[b]>to[b])continue;
| ^~~~
selling_rna.cpp:161:20: error: 'maxs' was not declared in this scope
161 | if(mins[a]>maxs[a] or from[b]>to[b])continue;
| ^~~~
selling_rna.cpp:161:31: error: 'from' was not declared in this scope
161 | if(mins[a]>maxs[a] or from[b]>to[b])continue;
| ^~~~
selling_rna.cpp:161:39: error: 'to' was not declared in this scope; did you mean 't'?
161 | if(mins[a]>maxs[a] or from[b]>to[b])continue;
| ^~
| t
selling_rna.cpp:163:9: error: 'query' was not declared in this scope
163 | query[from[b]-1].push_back({mins[a],maxs[a],-i});
| ^~~~~
selling_rna.cpp:163:15: error: 'from' was not declared in this scope
163 | query[from[b]-1].push_back({mins[a],maxs[a],-i});
| ^~~~
selling_rna.cpp:163:37: error: 'mins' was not declared in this scope
163 | query[from[b]-1].push_back({mins[a],maxs[a],-i});
| ^~~~
selling_rna.cpp:163:45: error: 'maxs' was not declared in this scope
163 | query[from[b]-1].push_back({mins[a],maxs[a],-i});
| ^~~~
selling_rna.cpp:164:15: error: 'to' was not declared in this scope; did you mean 't'?
164 | query[to[b]].push_back({mins[a],maxs[a],i});
| ^~
| t
selling_rna.cpp:170:21: error: 'query' was not declared in this scope
170 | for(event e:query[i]){
| ^~~~~