Submission #663401

#TimeUsernameProblemLanguageResultExecution timeMemory
663401YENGOYANComparing Plants (IOI20_plants)C++14
Compilation error
0 ms0 KiB
#include "plants.h" using namespace std; void init(int k, std::vector<int> r) { // x, y // int n = r.size(); return; } int compare_plants(int x, int y) { if(v[x] > v[y]) return 0; return 1; }

Compilation message (stderr)

plants.cpp: In function 'void init(int, std::vector<int>)':
plants.cpp:8:9: warning: unused variable 'n' [-Wunused-variable]
    8 |     int n = r.size();
      |         ^
plants.cpp: In function 'int compare_plants(int, int)':
plants.cpp:14:5: error: 'v' was not declared in this scope
   14 |  if(v[x] > v[y]) return 0;
      |     ^