plants.cpp:44:2: error: stray '#' in program
44 | }#include "plants.h"
| ^
plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:5:4: error: 'sz' was not declared in this scope
5 | n=sz(r);
| ^~
plants.cpp:5:4: note: the macro 'sz' had not yet been defined
plants.cpp:46: note: it was later defined here
46 | #define sz(x) (int)(x).size()
|
plants.cpp: At global scope:
plants.cpp:44:3: error: 'include' does not name a type
44 | }#include "plants.h"
| ^~~~~~~
plants.cpp:48:5: error: redefinition of 'int res [10001]'
48 | int res[10001];
| ^~~
plants.cpp:2:5: note: 'int res [10001]' previously declared here
2 | int res[10001];
| ^~~
plants.cpp:49:5: error: redefinition of 'int n'
49 | int n;
| ^
plants.cpp:3:5: note: 'int n' previously declared here
3 | int n;
| ^
plants.cpp:50:6: error: redefinition of 'void init(int, std::vector<int>)'
50 | void init(int k, std::vector<int> r) {
| ^~~~
plants.cpp:4:6: note: 'void init(int, std::vector<int>)' previously defined here
4 | void init(int k, std::vector<int> r) {
| ^~~~
plants.cpp:56:5: error: redefinition of 'int compare_plants(int, int)'
56 | int compare_plants(int x, int y) {
| ^~~~~~~~~~~~~~
plants.cpp:10:5: note: 'int compare_plants(int, int)' previously defined here
10 | int compare_plants(int x, int y) {
| ^~~~~~~~~~~~~~